Guide ยท Server Setup

How to Install Scripts on a FiveM Server

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.

What You'll Need

Before you start, make sure you have:

  • Access to your FiveM server files โ€” either via SFTP, a web-based file manager (most managed hosting providers include one), or direct disk access if you're self-hosting.
  • A database client โ€” HeidiSQL, DBeaver, phpMyAdmin, or the CLI. Only needed if the script ships with a .sql migration.
  • A text editor โ€” VS Code, Sublime, Notepad++. You'll edit server.cfg and likely config.lua.
  • The script you want to install โ€” grab one from the Scripts marketplace or a custom commission. The rest of this guide assumes you already have the ZIP in hand.
๐Ÿ’ก Tip If you're on managed hosting (Cloud Hosting, VPS), your provider usually gives you a web file manager and a one-click server restart. That covers the "upload" and "restart" steps of this guide without touching SFTP.

Quick Reference

If you've installed scripts before and just want the happy path:

  1. Extract the script into server-data/resources/[script-name]/
  2. Import [script-name].sql into your database (if included)
  3. Add ensure [script-name] to server.cfg
  4. Restart the server and watch the console for errors

If any of those steps aren't familiar, the full walkthrough below explains each one.

1Access Your Server Files

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.

If you're on managed hosting

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.

If you're self-hosting (VPS or dedicated)

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.

๐Ÿ“ Where is "server-data"? It's the folder that contains 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.

2Upload the Script to 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.

โš ๏ธ Don't skip this Upload the folder containing the script, not the individual files. FiveM reads fxmanifest.lua from the folder root โ€” if the script's files are loose in resources/, the server won't find them.

3Import the Database Migration (if included)

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.

๐Ÿ’ก Tip If the .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.

4Configure the Script

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:

  • Framework toggle โ€” Config.Framework = 'qb' or 'esx'. Pick the one your server runs.
  • Locations / coordinates โ€” if the script places NPCs, blips, or interaction points, they're configured as vector3(x, y, z) coordinates.
  • Prices, rewards, cooldowns โ€” numeric values tuned to your server's economy.
  • Job restrictions โ€” which jobs can use which features (e.g., only police can access the police garage).
  • Integrations โ€” dependency toggles for things like 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.

5Add the Script to server.cfg

FiveM 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:

  • Dependencies load before the scripts that use them. If your housing script needs ox_inventory, ox_inventory must appear first in server.cfg.
  • Framework resources load first. es_extended or qb-core should be near the top, before anything that reads player data.
  • Use ensure, not start. ensure means "start this, and restart it if it stops" โ€” which is what you want 99% of the time.
โš ๏ธ Missing dependency? If a script depends on something you don't have (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.

6Restart the Server & Test

Restart the server. How you do that depends on your setup:

  • Managed hosting โ€” click "Restart" in the dashboard.
  • txAdmin โ€” "Restart Server" button in the web panel.
  • Self-hosted / VPS โ€” stop the server process and relaunch it with your usual startup command.
  • In-game โ€” if you're admin and have live resource reloads enabled, 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.

Troubleshooting

"Couldn't find resource X" on boot

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.

"Module not found" / "attempt to index a nil value"

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.

Database errors ("Table X doesn't exist")

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.

"Resource X is not on ensure list"

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.

Script loads but the feature does nothing

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.

Performance hit after install

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.

Still stuck?

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.

Next Steps

Once you've got the installation workflow down, a few directions to take your server from here:

  • Browse more scripts โ€” the Scripts marketplace has 1,200+ pre-made gigs across jobs, crime, economy, vehicles, housing, and activities.
  • Level up the hosting โ€” if you're getting lag under load, check out managed Cloud Hosting, VPS, or dedicated servers built for FiveM.
  • Add weapons, vehicles and MLOs โ€” every weapon pack, vehicle, and MLO installs the same way as a script. The folder goes in resources/, the line goes in server.cfg.
  • Commission custom work โ€” need something that doesn't exist yet? Hire a developer to build it on spec.
  • Stuck on install? Every gig has direct seller chat on its page, and the support center covers the common ones with working fixes.

FAQ

Can I install scripts without restarting the server?

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.

Does the install process differ between ESX and QBCore?

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.

What if I'm running QBox or ESX Legacy?

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.

How do I uninstall a script?

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.

Can a paid script contain malware?

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.