How to Install a FiveM Script on QBCore, QBox and ESX (Step-by-Step)
A practical walkthrough for installing any FiveM resource: downloading it from Cfx.re, placing it correctly, handling dependencies and SQL, configuring it and fixing the most common errors.
Installing a new resource is one of the most common jobs on a FiveM server, and one of the most common reasons for "it doesn't work" support tickets. The good news: almost every installation follows the same steps, whether your server runs QBCore, QBox or ESX. This guide walks through them in order and covers the errors we see most often.
Step 1: Download the Right Files
If the script is escrowed, it isn't sent with your Tebex receipt as a zip file. It's granted to your Cfx.re account. Log in to the Cfx.re Portal with the same account you used at checkout, open your granted assets and download the latest version there. Open source scripts are usually delivered as a direct download.
Always install the latest version; older builds may expect older framework versions.
Step 2: Put the Resource in the Right Place
Extract the archive and copy the resource folder into your server's resources directory. Many servers group resources into bracket folders such as [standalone] or [qb]. That's fine, FiveM scans them automatically.
Two rules prevent most problems:
- Keep the folder name exactly as delivered. Other resources, and the script's own code, may refer to it by name, so renaming it can break exports.
- Make sure the folder directly contains
fxmanifest.lua. A common mistake is ending up withmy-script/my-script/fxmanifest.luaafter extracting.
Step 3: Install Dependencies First
Check the script's documentation or its fxmanifest.lua for dependencies. The usual ones are:
- Your framework:
qb-core(QBCore),qbx_core(QBox) ores_extended(ESX). ox_libfor UI helpers and callbacks.oxmysqlfor database access.
Install any missing dependency the same way, and keep each one up to date.
Step 4: Import the SQL (If There Is One)
If the resource ships with an .sql file, run it against your server's database before starting the script, using HeidiSQL, phpMyAdmin or your hosting panel's database tool. Missing tables are behind a large share of "the script loads but nothing saves" reports.
Step 5: Add It to server.cfg in the Right Order
Add the resource to server.cfg with ensure, below everything it depends on:
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure my-scriptFiveM starts resources in the order they appear. If a script starts before its framework or ox_lib, it throws errors about missing exports or nil values, even though everything is installed.
Step 6: Configure Before You Go Live
Open config.lua (and the locale files if you need another language). If the script supports several frameworks, set yours there first, then adjust prices, positions, keybinds and texts. On escrowed scripts these files are deliberately left editable.
Step 7: Restart and Read the Console
Restart the server, or run refresh and then ensure my-script from the server console or txAdmin. Then read both the server console and the in-game F8 console. Errors almost always name the missing piece.
Common Errors and What They Mean
- "You lack the required entitlement to use …": an escrowed script is running on a license key that doesn't belong to the account that bought it. Use a key from the purchasing Cfx.re account.
- "No such export" or "attempt to index a nil value": a dependency is missing or starts after the script. Check the
ensureorder. - "Couldn't find resource": the name in
server.cfgdoesn't match the actual folder name, orfxmanifest.luais one level too deep. - Database errors on start: the SQL file wasn't imported, or
oxmysqlisn't configured with your connection string.
Keep Your Server Fast
Every resource you add has a cost. After installing, open resmon in the F8 console and check the new resource's CPU time while it's idle and while it's in use. Our FiveM script optimization guide explains what healthy numbers look like.
Every Code X Art script comes with installation notes, and our team helps with installs on Discord. If something still won't start, open a support ticket from your dashboard with the console error and we'll take a look.
Building or upgrading your server?
Browse our ready-made scripts, or talk to us about a custom project for your community.
