Guide ยท Server Setup
A step-by-step walkthrough of installing any FiveM script โ download, upload to your server's resources folder, run the database migration, configure, and test. Works for ESX, QBCore, QBox, and standalone resources.
Before you start, make sure you have:
.sql migration.server.cfg and likely config.lua.If you've installed scripts before and just want the happy path:
server-data/resources/[script-name]/[script-name].sql into your database (if included)ensure [script-name] to server.cfgIf any of those steps aren't familiar, the full walkthrough below explains each one.
Every FiveM server has a server-data folder (sometimes called resources-folder or just the server root, depending on how you set it up). Inside it is a resources/ directory โ that's where every script, MLO, vehicle, and asset on your server lives.
Log into your provider's dashboard and open the file manager. Navigate to server-data/resources/ โ you'll usually see folders like [qb], [esx], [standalone], or resources from previous installs.
Connect via SFTP (FileZilla, WinSCP, Cyberduck) using your server's IP, SSH username, and password or key. Navigate to wherever you extracted the FiveM server โ usually ~/fivem-server/server-data/resources/ or similar.
server.cfg, resources/, and the server's state. If you're using a hosting provider from the marketplace, it's created for you. If you ran fivem.exe +exec server.cfg yourself, it's wherever you pointed that command.
resources/Every script you buy from the marketplace ships as a ZIP archive. Extract it locally first โ you should see a folder with the script's name containing files like fxmanifest.lua, client.lua, server.lua, a config.lua, and maybe a sql/ or ui/ subfolder.
Upload the entire script folder (not the ZIP, not the files inside it individually) into your server's resources/ directory. For organization, many server owners group scripts by framework:
server-data/
โโโ resources/
โโโ [qb]/
โ โโโ qb-core/
โ โโโ qb-inventory/
โ โโโ qb-policejob/
โโโ [esx]/
โ โโโ es_extended/
โ โโโ esx_policejob/
โโโ [standalone]/
โ โโโ ox_lib/
โโโ advanced-housing-script/ โ your new script goes here
The square-bracket folders (like [qb]) are just visual groupings โ FiveM scans subfolders automatically, so nesting works either way. Pick whatever matches your existing layout.
fxmanifest.lua from the folder root โ if the script's files are loose in resources/, the server won't find them.
Most ESX and QBCore scripts need to store data (player inventories, house ownership, vehicle keys, job payouts) and come with a .sql migration file โ typically in a sql/ subfolder or at the script's root.
Open your database client, connect to your FiveM database (the one your framework uses โ usually esx, qbcore, or a custom name in server.cfg), and import the .sql file. Most clients have an "Import" or "Run SQL File" option. From the command line:
mysql -u username -p your_database_name < sql/install.sql
After import, verify the new tables exist. If the script expects a houses table and it's not there, the script will crash on first use.
.sql file contains DROP TABLE IF EXISTS statements, it will wipe existing data in those tables. Back up your database before importing โ especially on a live server. Most managed hosting providers have a one-click database backup.
Scripts without a .sql file don't need database setup โ skip to the next step.
Open the script's config.lua (or config.js, or shared/config.lua โ location varies) in your text editor. Every well-built marketplace script exposes its behavior through a config file so you don't have to edit the actual logic.
What you'll typically configure:
Config.Framework = 'qb' or 'esx'. Pick the one your server runs.vector3(x, y, z) coordinates.police can access the police garage).ox_inventory, ox_target, or qb-phone.-- Example: advanced-housing-script/config.lua
Config = {}
Config.Framework = 'qb' -- 'qb' or 'esx'
Config.UseOxInventory = true -- set to false if you use qb-inventory
Config.StartingPrice = 50000 -- base house price
Config.KeysPerHouse = 3 -- how many keys each owner gets
Config.AllowShells = true -- interior shell system
Read the script's README before launching โ it usually calls out which config keys matter most and which integrations need extra setup.
server.cfgFiveM doesn't load resources automatically โ you have to tell it to start each one. Open server.cfg (it's in your server-data/ folder, alongside resources/) and add an ensure line for your new script.
# server.cfg โ order matters
# Framework first
ensure oxmysql
ensure es_extended # or qb-core
# Dependencies second
ensure ox_lib
ensure ox_inventory
ensure ox_target
# Your new script (goes AFTER its dependencies)
ensure advanced-housing-script
A few important rules about the load order:
ox_inventory, ox_inventory must appear first in server.cfg.es_extended or qb-core should be near the top, before anything that reads player data.ensure, not start. ensure means "start this, and restart it if it stops" โ which is what you want 99% of the time.ox_lib, oxmysql, ox_target, qb-menu), install that dependency first โ usually a free download from the official repo linked in the script's README. The marketplace script's fxmanifest.lua lists its dependencies under a dependency block.
Restart the server. How you do that depends on your setup:
restart advanced-housing-script in the server console works too, provided the script was already loaded once (first install still needs a full server restart to pick up the server.cfg change).Watch the console output as it boots. You're looking for the script's "started" line โ something like Started resource advanced-housing-script โ with no red error lines below it. If it errors, jump to the troubleshooting section.
Once the server's up, join it in-game and try the script's main feature โ buy a house, start a job, open the menu, whatever the script does. That's your real smoke test.
FiveM can't find the resource folder you listed in server.cfg. Check: (1) the folder name in resources/ exactly matches the ensure line (case-sensitive on Linux), (2) the folder is actually in resources/ and not one directory deeper, (3) the folder contains an fxmanifest.lua at its root.
Usually a missing or out-of-order dependency. Open the error in the console โ the line above the nil value error tells you what it tried to call. If it references ox_lib, ESX, QBCore, or similar, that framework/library isn't loaded before your script. Fix the ensure order in server.cfg.
The SQL migration didn't run. Go back to step 3, import the .sql file, and verify the tables exist in your database client before restarting the server.
Harmless warning if it's about a resource that is in your server.cfg โ sometimes happens when start is mixed with ensure. Convert all start entries to ensure to silence it.
Check the config. Most "it doesn't work" reports turn out to be a config toggle left at its default (wrong framework, feature disabled, location set to 0, 0, 0). Also verify that any UI component loaded โ open the browser console with F8 in-game and look for NUI errors.
Run resmon (client-side) and profile (server-side) โ both built into FiveM. If the new script is eating more than ~1 ms client-side or driving visible lag spikes, flag it to the seller. Performance regressions on marketplace gigs are revision-eligible.
Copy the exact error line from your server console, and message the seller from the gig's order page. Sellers fix install issues on their own gigs within the hour on average โ they've seen every edge case before. If the seller is unresponsive, escalate via support.
Once you've got the installation workflow down, a few directions to take your server from here:
resources/, the line goes in server.cfg.If the script is already known to FiveM (was in server.cfg when the server last booted), yes โ use restart <resource-name> in the server console. For a brand-new script that's never been loaded before, the server must restart once to pick up the new server.cfg line.
The install steps are identical โ same resources/ folder, same server.cfg, same SQL migration flow. The only difference is the config toggle inside config.lua and the framework-specific dependencies your script needs. Every marketplace script supports both.
Both are fork-compatible with QBCore and ESX respectively, so the same install steps work. Just set the framework toggle to the base name (qb or esx) in the script's config โ QBox/Legacy identify themselves as compatible with the base framework's API.
Remove the ensure line from server.cfg, optionally delete the folder from resources/, and restart the server. If the script wrote data to your database, you'll need to drop those tables separately if you want a clean state.
On the FiveM Market marketplace, no โ every listing is vetted before going live and sellers are removed if they ship malicious code. Outside the marketplace, yes: leaked scripts from forums and Discord drops regularly contain credential stealers, server wipers, or backdoors. Stick to vetted sources.