In this guide 7 sections
- Where do FiveM scripts go? The resources folder
- How do I add a script to server.cfg with ensure?
- What does fxmanifest.lua do?
- Which dependencies do FiveM scripts need, and in what order?
- How does installing differ on ESX, QBCore, Qbox and standalone?
- How do escrow-protected FiveM scripts differ?
- Common FiveM script errors and how to read the console
Learning how to install FiveM scripts looks trivial: download, copy the folder, done. And sometimes it is. But when a resource does not start, the console fills with red errors or the script only half works, the cause is almost always in one of four places: the folder structure, the ensure line in server.cfg, the fxmanifest.lua or a missing dependency. This tutorial covers the whole installation process, the differences between frameworks and the typical errors with their fixes, so installing any resource takes two minutes instead of two hours.
Where do FiveM scripts go? The resources folder
Every FiveM resource lives inside the resources folder of your server data. On a txAdmin install that is your data folder, for example server-data/resources. Each script is its own folder with an fxmanifest.lua at its root, and category folders in square brackets only group resources.
resources/
├── [standalone]/
│ ├── ox_lib/
│ └── oxmysql/
├── [qb]/
│ ├── qb-core/
│ └── qb-inventory/
└── my_script/
├── fxmanifest.lua
├── client/
├── server/
└── config.lua
Two golden rules when copying a new script:
- Watch out for the double folder. Unzipping an archive often leaves you with
my_script/my_script/fxmanifest.lua. FiveM looks for the manifest at the root of the resource folder, so if it sits one level deeper the resource never shows up. - No spaces or odd characters in the name.
my script v2 (final)is a recipe for errors. Use simple names such asmy_script.
Folders in square brackets like [standalone] or [qb] are only organisational categories: FiveM walks through them looking for resources, but they are not resources themselves.
How do I add a script to server.cfg with ensure?
Copying the folder is not enough. FXServer only starts the resources you list with ensure in server.cfg, using the exact folder name. Order matters: dependencies must start before the scripts that use them, so ox_lib has to come before anything that requires it.
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure my_script
The name after ensure is the folder name, not the zip file name or the commercial name of the script. If my_script needs ox_lib, the ox_lib line must go first. You can also start a whole category with ensure [qb], which is handy when you group many resources.
A trick to avoid restarting the server for every test: from the console (or from txAdmin) you can run ensure my_script live to start or restart just that resource. If you do not have a server running yet, start with our guide on how to make a FiveM server.
What does fxmanifest.lua do?
The fxmanifest.lua is the resource’s spec sheet. It tells FXServer which files to load and where to run them: client, server or both. A modern manifest declares fx_version, game, the script lists and any dependencies. Reading it tells you at a glance what a script needs to work. A modern one looks like this:
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
author 'Your Name'
description 'Example of a modern manifest'
version '1.0.0'
shared_scripts {
'@ox_lib/init.lua',
'config.lua',
}
client_scripts {
'client/*.lua',
}
server_scripts {
'@oxmysql/lib/MySQL.lua',
'server/*.lua',
}
dependencies {
'ox_lib',
'oxmysql',
}
The essentials of each block:
fx_version 'cerulean'is the current manifest version. If you see__resource.luainstead offxmanifest.lua, the resource is ancient: it may barely work, and it is a red flag about its quality.shared_scriptsrun on both client and server (typical for configs),client_scriptsonly on the client andserver_scriptsonly on the server. A client native called from a server script produces the classic “attempt to call a nil value”.- The
@prefix imports a file from another resource:@ox_lib/init.lualoads the ox_lib library into this script. That is why ox_lib must be installed and started first. dependenciesdeclares which resources must exist and be started. If one is missing, the server refuses to start the resource and tells you in the console.
As an installer you will rarely edit the manifest, but being able to read it shows you what the script needs.
Which dependencies do FiveM scripts need, and in what order?
Most modern scripts depend on two or three base resources: oxmysql for the database, ox_lib for UI and utilities, and sometimes a specific inventory such as ox_inventory. The script documentation always lists them. Install them first and place them earlier in server.cfg.
A healthy start order is: database (oxmysql), then libraries (ox_lib), then the framework core (qb-core, es_extended or qbx_core), then inventory and framework modules, and last the third-party scripts. If your inventory is still undecided, our guide to the best FiveM inventory compares the most used options.
How does installing differ on ESX, QBCore, Qbox and standalone?
The mechanical process is identical for every framework. What changes is the integration: configs, SQL imports and framework-specific resource names. Standalone scripts are the cleanest, while ESX, QBCore and Qbox scripts usually need a config review and sometimes a database import before first start.
- ESX Legacy: scripts usually ship a
config.luawhere you adjust jobs, prices and permissions, and sometimes a.sqlfile you must import into your database before the first start. Check that the script targets ESX Legacy and not old versions (1.2 or earlier), whose events no longer exist. See the ESX scripts. - QBCore: similar, with the quirk that many resources expect specific names of other qb resources (for example
qb-targetorqb-menu). If you renamed core folders, you will have to adjust configs. See the QBCore scripts. - Qbox: compatible with much of the QBCore ecosystem through its bridges, but always check that the script declares support for
qbx_core. See the Qbox scripts. - Standalone: the cleanest install, with no framework in between. At most, ox_lib dependencies. Ideal for HUDs, loading screens or utilities. See the standalone scripts.
Many quality scripts are multi-framework: they detect the framework on start or let you pick it in the config. If you are unsure which base is right for the long run, our QBCore vs ESX vs Qbox comparison will settle it.
How do escrow-protected FiveM scripts differ?
Paid scripts often ship protected with FiveM’s Asset Escrow: part of the files are encrypted and only run on servers whose license key belongs to the Cfx.re account that owns the asset. Installing an escrow script is the same as installing an open one, with two caveats about account and editable files.
- You must have bought it with the same Cfx.re account that generates your server license.
- You can only edit the files the author left outside the encryption (usually
config.luaand folders marked as editable).
If the console shows authorisation errors when starting an encrypted resource, the problem is almost always the account or the key, not the script. Our FiveM Keymaster guide explains how licenses and assets are tied to your account.
Common FiveM script errors and how to read the console
The server console, or the Live Console tab in txAdmin, tells you exactly what fails if you read it calmly. The three most common errors are a resource that is not found, a manifest problem and a missing dependency, and each has a quick fix.
- The resource does not start and does not even appear: almost always the double folder after unzipping, a name with spaces or a missing
fxmanifest.lua. The typical message isCouldn't find resource my_script. fx_versionerror: messages likeresource is not compatibleor complaints about the manifest point to an old resource or a corrupt manifest. Check thatfx_version 'cerulean'(or at least a valid version) andgame 'gta5'exist.- Missing dependency:
Could not start dependency ox_lib for resource my_scriptmeans exactly that: install the dependency or fix the order of yourensurelines.
For any red script error, the first line of the message points to the exact file and line (@my_script/server/main.lua:42). That tells you whether the fault is in your config (the usual case) or in the resource code.
Installing a script well is half the job; the other half is installing scripts worth having. Browse the scripts for QBCore, ESX, Qbox and standalone setups, and check each product page for its installation notes.
Frequently asked questions
Where do I put a script on a FiveM server?
Put the script folder inside the resources directory of your server data, for example server-data/resources. The folder must contain fxmanifest.lua at its root, not one level deeper. Then add ensure followed by the folder name to server.cfg and restart or ensure the resource.
Why does my FiveM script not start?
Most of the time it is a double folder after unzipping, a folder name with spaces, a missing fxmanifest.lua, a missing dependency such as ox_lib or oxmysql, or a wrong ensure order. Read the first red line in the console, which names the file and line.
Does the order of ensure lines in server.cfg matter?
Yes. Dependencies must start before the resources that use them. A healthy order is database (oxmysql), libraries (ox_lib), the framework core, inventory and framework modules, and finally third-party scripts. A wrong order produces dependency errors on startup.
Can I install a FiveM script without restarting the server?
Yes. Run ensure followed by the resource name in the server console or in txAdmin to start or restart only that resource. A brand-new resource folder may need a refresh first, and changes to server.cfg itself still need a restart.
Cube Resources scripts go on sale on November 4. If this guide helped, we will let you know the day the store opens.
The store opens in
The store opens on November 4, 2026 at 16:00 CET (Madrid time).
Get notified on launch day
Leave your email and we will write once, when the store opens.