A roleplay server is built on a framework: it handles characters, money, jobs, inventory and cars. We'll compare the three most widely used ones (ESX Legacy, QBCore and Qbox), help you choose, and walk you through installing one with a txAdmin recipe, including setting up admins.
What you'll need
What a framework is#
A framework is a set of resources that gives the server the basic “RP game”: character creation, cash and bank money, jobs and grades, inventory, vehicle ownership and saving to the database. Other scripts (jobs, shops, phone, garages) then build on the framework's functions.
What this means in practice:
- A script is written for a specific framework. A script for ESX won't run on QBCore without changes, and vice versa. So always look for the version of a script made for your framework.
- Switching frameworks on a running server is hard. Moving to another one means a new database and replacing your scripts. So choose carefully right at the start.
- A framework needs a database and the
oxmysqlresource.
A server without a framework (freeroam, drift, racing) can run on the basic txAdmin recipe (FiveM Basic Server).
Basic terms#
| Term | What it means | Where it's stored |
|---|---|---|
| Character | A player can have several characters, each with their own name, money and job. They pick one in the multicharacter screen after connecting. | ESX users table, QBCore and Qbox players table |
| Identifier | How the framework recognizes the player. Usually the Rockstar license (license). | With the character in the database |
| Accounts | Cash, bank, and possibly dirty money or crypto. | With the character |
| Job and grade | The character's job (police, EMS, mechanic) and grade with a salary. The boss manages employees. | ESX jobs and job_grades tables, QBCore and Qbox configuration |
| Gang | The gang equivalent of a job. | QBCore and Qbox |
| Items | Things in the inventory: definitions (name, weight) and how many the character has. | ESX items table, configuration files for ox_inventory and QBCore |
| Society | A job's company account that salaries can be paid from. | Depends on the framework and banking script |
| Owned vehicles | Cars bought by the character, their plates and upgrades. | ESX owned_vehicles table, QBCore and Qbox vehicle tables |
If you understand this, it's easier to find problems: when money or a car “disappears”, it's a database record you can look up and fix (for example in HeidiSQL).
Comparison#
| ESX Legacy | QBCore | Qbox | |
|---|---|---|---|
| Origin | The oldest of the three, developed over many years. | A standalone framework, inspired by ESX. | Started as a fork of QBCore, with rewritten code. |
| Core (resource) | es_extended | qb-core | qbx_core |
| Libraries | esx_lib, ox_lib, oxmysql | oxmysql, its own qb-* | ox_lib, oxmysql |
| Inventory | built into ESX, optionally ox_inventory | qb-inventory | ox_inventory |
| Targeting (interaction) | depends on scripts | qb-target | ox_target |
| Database | MariaDB (recommended) | MySQL or MariaDB | MariaDB 10.9.0 or newer only |
| Scripts for another framework | no | no | most QBCore scripts work through the built-in bridge |
| Admin permissions | player group (/setgroup) | ACE groups qbcore.god, qbcore.admin, qbcore.mod | ACE groups group.admin, group.mod, group.support |
| txAdmin recipe | ESX Legacy | QBCore Framework | Qbox Framework |
| Documentation | docs.esx-framework.org (opens in a new window) | qbcore.org/docs (opens in a new window) | docs.qbox.re (opens in a new window) |
How to choose#
- Want the most ready-made scripts and guides? ESX Legacy. It's the most widespread, and you'll find scripts for it for almost anything.
- Want a modern base and QBCore scripts? Qbox. It uses the
ox_lib,ox_inventoryandox_targetlibraries, has stricter code and runs most QBCore scripts through its bridge without changes. - Have specific paid scripts for QBCore? QBCore, or Qbox (check with the script author that it works on Qbox).
- Building a server with your own scripts from scratch? Pick the one whose documentation suits you best. Knowing your framework well matters more than which one you choose.
The safest approach: deploy the framework as a trial, try it out in the game and only then buy scripts.
Before installing#
- Create an empty database in the Database tab (for example
fivem, Allowed connections from%). Keep the Database name, User, Host and Password details open. - Have your license key ready (it starts with
cfxk_). - Make a backup if you already have something on the server (Backups tab, guide) and export the database (guide). A new deployment is saved to a new folder, but a recipe with Delete Database turned on would delete the database.
- Check the artifacts. Frameworks require a current server version. Update an old server following Updating artifacts.
Qbox and the database version
Qbox officially supports only MariaDB 10.9.0 and newer. You can find the database server version after the first start in the console, in the […] Database server connection established! line (in the square brackets). If the version is lower or it's MySQL, contact us.
Installing with a txAdmin recipe#
The procedure is the same for all three frameworks; only the recipe and a few settings after installation differ. If you've already deployed another server in txAdmin, start a new wizard in Settings › FXServer with the Reset button next to the Server Data Folder field. txAdmin returns to the Setup page and doesn't delete the existing files.
- On the txAdmin Setup page, enter a Server Name and click Next.
- For Deployment Type, choose Popular Recipes.
- Choose the recipe according to the tab below.
- Keep the suggested data folder, click Save and then Go to Recipe Deployer.
- In Step 1: Review Recipe, click Next.
- In Step 2: Input Parameters, fill in the Server Registration Key, and after clicking Show/Hide Database options (advanced) also the database: Database Host (the IP from the Host field), Database Port (the port from the Host field), Database Username, Database Password, Database Name. The Delete Database switch is on by default; make sure it's set to Off. Every field is explained in detail in the txAdmin guide.
- Click Run Recipe and wait for it to finish. Large recipes take several minutes.
- In Step 4: Configure server.cfg, check that
endpoint_add_tcpandendpoint_add_udphave the port from the Connection address line in the Network tab (the recipe may write the default30120). Then adjust the settings according to the tab below and click Save & Run Server.
ESX
Recipe: in the Popular Recipes list, choose ESX Legacy.
What the recipe installs: the es_extended core and other resources in the [core] folder (characters, menus, identity, multicharacter), add-ons in the [esx_addons] folder (jobs, bank, shops, garages …), oxmysql, ox_lib, the pma-voice voice chat and the bob74_ipl interior maps.
Settings in server.cfg after deployment:
| Line | What it does | What to set |
|---|---|---|
sv_hostname and sets sv_projectName | The server name (in the console and in the server list). | Your name. |
sets locale "root-AQ" | The server language in the list. | Your language, for example sets locale "en-US" or sets locale "cs-CZ" |
#setr esx:locale "en" | The ESX language. When it's commented out, ESX uses the language set in txAdmin. | Uncomment it and set your language ("en" for English, for example "cs" for Czech), or leave the language to txAdmin. |
#setr esx:identifier "license" | Which identifier ESX uses to recognize players. | Don't change it. Changing it on an established server “loses” all characters. |
sv_enforceGameBuild | Game build (DLC). | Keep the value from the recipe unless your scripts require a higher one. |
add_ace resource.es_extended command.add_principal allow and similar | Allows ESX to assign groups. | Don't delete. |
Security settings from the recipe
The ESX recipe also turns on the protective options sv_enableNetworkedSounds false, sv_, sv_ and sv_filterRequestControl 2. They block common cheater tricks, so keep them. They're explained in the server.cfg guide.
QBCore
Recipe: in the Popular Recipes list, choose QBCore Framework.
What the recipe installs: the qb-core core, dozens of qb-* scripts in the [qb] folder (multicharacter, inventory, police, EMS, garages, phone, HUD, admin menu …), oxmysql, the pma-voice voice chat and maps.
Settings in server.cfg after deployment:
| Line | What it does | What to set |
|---|---|---|
sets locale "root-AQ" | The server language in the list. | Your language, for example sets locale "en-US" or sets locale "cs-CZ" |
setr qb_locale "en" | The QBCore language. | en for English, or another language code, for example cs (the core has Czech, some scripts don't). |
setr UseTarget false | Whether scripts use interactions through qb-target (the eye) or key prompts. | false to start with, true if you want target-based interactions. |
sv_enforceGameBuild 3095 | Game build (DLC). | Keep the value from the recipe. |
add_principal qbcore.god group.admin and others | The QBCore admin group hierarchy. | Don't delete. |
On its first start, QBCore builds some resources (yarn output in the console). Let it finish, even if it takes several minutes, and don't restart the server in the meantime.
Qbox
Recipe: in the Popular Recipes list, choose Qbox Framework.
What the recipe installs: the qbx_core core, qbx_* scripts (management, police, EMS, garages, properties, HUD, admin menu …), the ox_lib, ox_target, ox_inventory, ox_doorlock and oxmysql libraries, and the npwd phone. The settings are split across the server.cfg, permissions.cfg, ox.cfg, voice.cfg and misc.cfg files.
Settings after deployment:
| File and line | What it does | What to set |
|---|---|---|
server.cfg: sets locale "root-AQ" | The server language in the list. | Your language, for example sets locale "en-US" or sets locale "cs-CZ" |
ox.cfg: setr ox:locale "en" | The language of ox_lib and the scripts that use it (including qbx_core). | en for English, or another language code, for example cs. |
server.cfg: setr qb_locale "en" | The language for QBCore scripts running through the bridge. | The same language code as for ox:locale. |
server.cfg: setr qbx:enableBridge "true" | The bridge for scripts written for QBCore. | Keep true if you use QBCore scripts. |
server.cfg: set qbx:discordLink "discord.gg/qbox" | The Discord link the server shows to players. | A link to your Discord. |
server.cfg: set qbx:max_jobs_per_player 1 | How many jobs a character can have. | More if you want multijob. |
ox.cfg: setr inventory:slots 50, setr inventory:weight 85000 | The number of inventory slots and carrying capacity (in grams). | According to your server rules. |
server.cfg: setr loadscreen: | The loading screen is closed by the multicharacter. | Change to false only with a custom multicharacter that doesn't close the screen. |
First steps after installing: admin permissions#
An admin in txAdmin and an admin in the framework are two different things. During deployment, txAdmin adds the main admin to the group.admin group in server.cfg (the line add_principal identifier.). The frameworks build on this as follows:
ESX
ESX stores the group directly with the character in the database (user, admin …). The main admin from txAdmin is recognized automatically thanks to the group.admin group. To make another player an admin, use this in the game or in the server console:
setgroup <PLAYER_ID> adminsetgroup– the ESX command for changing a group (in the game with a slash:/setgroup).<PLAYER_ID>– the player's server ID (the number you see in the player list in txAdmin, or in the game).admin– the group. To make them a regular player again, set theusergroup.
The group is saved to the database and stays after a restart. A player can check their group with the /group command.
QBCore
QBCore uses the ACE groups qbcore.god (everything), qbcore.admin and qbcore.mod. Add an admin permanently with a line in server.cfg (in CFG Editor if you use txAdmin):
add_principal identifier.license:<PLAYER_LICENSE> qbcore.godidentifier.– the player's license. Find it in txAdmin: Players, click the player, IDs tab.license: <PLAYER_ LICENSE> qbcore.god– the highest group. For fewer permissions, useqbcore.adminorqbcore.mod.
In the game, you can also add a permission with the /addpermission <PLAYER_ID> god command or in the admin menu (/admin › Player Management › player › Permissions). A permission added this way only lasts until the player disconnects or the server restarts; it's permanent only through server.cfg.
Qbox
Qbox uses the ACE groups group.admin, group.mod and group.support (defined in permissions.cfg). Add an admin permanently with a line in permissions.cfg or server.cfg:
add_principal identifier.license:<PLAYER_LICENSE> group.adminidentifier.– the player's license from txAdmin (Players › player › IDs tab). You can also uselicense: <PLAYER_ LICENSE> identifier..fivem: <FIVEM_ ID> group.admin– full permissions.group.modgets the menu and moderator actions,group.supportonly support.
Open the admin menu in the game with the /admin command. The /addpermission command exists, but it's deprecated and only lasts until the player disconnects.
Restart the server after editing server.cfg or permissions.cfg.
On Qbox, the core admin commands (for example /addpermission, /setjob, /car) first require you to enter /optin. You can turn this off with the requireOptIn = false option in qbx_.
What to set first#
Each framework has a main configuration file with the economy, spawn and characters. Edit it while the server is stopped, or restart the server in txAdmin after editing. You'll find the files in the deployment folder under resources.
ESX
File resources/:
| Setting | What it does | Default value | When to change it |
|---|---|---|---|
Config. | The money a new character starts with, per account (bank, money = cash, black_money). | { bank = 50000 } | According to your server economy. Applies to new characters only. |
Config. | Items for a new character (a table), or false. | false | A starter pack (phone, water, food). |
Config.DefaultSpawns | Coordinates where a new character appears. Several rows = random pick. | one position in the city | A custom spawn (airport, train station). |
Config. | Which groups may use which ESX admin command (setjob, car, setgroup …). | owner and admin | Give moderators only some of the commands. |
File resources/:
| Setting | What it does | Default value |
|---|---|---|
Config.Slots | How many characters each player can create. Add slots for individual players with the /setslots command. | 3 |
Config.CanDelete | Whether a player can delete their character. | true |
QBCore
File resources/:
| Setting | What it does | Default value | When to change it |
|---|---|---|---|
QBCore. | Money types and starting amounts (cash, bank, crypto). | { cash = 500, bank = 5000, crypto = 0 } | According to your economy. A money type you've added doesn't disappear from the database, even if you remove it from the configuration. |
QBCore. | How often (in minutes) players get paid. | 10 | A longer interval = a slower economy. |
QBCore. | The first spawn location (vector4(x, y, z, heading)). | near the airport | A custom spawn. |
QBCore., ThirstRate | How fast food and drink deplete. | 4.2, 3.8 | A lower number = slower. |
QBCore. | Closes the server to everyone without permission. | false | Maintenance. |
QBCore.Config.Server.PVP | Whether players can shoot each other. | true | Servers without PvP. |
QBCore. | The list of admin groups (each must have add_ace/add_principal in server.cfg). | { 'god', 'admin', 'mod' } | Custom groups (for example leo). |
Qbox
File resources/:
| Setting | What it does | Default value | When to change it |
|---|---|---|---|
money.moneyTypes | Money types and starting amounts. | { cash = 500, bank = 5000, crypto = 0 } | According to your economy. A money type you've added doesn't disappear from the database. |
money.paycheckTimeout | Paycheck interval in minutes. | 10 | According to your economy. |
characters. | How many characters each player has. | 3 | More characters for everyone. |
characters. | Exceptions for specific players by license. | a sample line | More characters for selected players (VIP). |
requireOptIn | Core admin commands require /optin. | true | false if it bothers your admins. |
File resources/: characters. (custom multicharacter), characters. (players can delete characters), characters. (choosing an apartment after creating a character).
Money and items are stored in the database. Changing the starting values only affects newly created characters; existing ones stay as they are.
Compatible scripts#
- Download the version for your framework. Many authors offer one script for several frameworks with an option in
config.lua(for exampleConfig.Framework = 'esx','qb'or'qbx'). - The ox libraries (
ox_lib,ox_inventory,ox_target) work with both ESX and Qbox. Before installing a second inventory, be clear about which one you use. Two inventories at once don't work. - QBCore scripts on Qbox run through the bridge if they use
qb-corein the documented way. Scripts that access QBCore database tables directly don't work. - Conflicts: two scripts with the same function (two HUDs, two garages, two phones) usually get in each other's way. Turn off the original one (comment out its
ensureor move it out of the category).
Installing individual scripts is covered in FiveM resources.
Manual installation (advanced)#
A recipe automatically does what you'd otherwise do by hand:
- Downloads the framework core and its dependencies (
oxmysql,ox_lib…) in specific versions. - Imports the framework's SQL file into the database.
- Prepares
server.cfgwith the rightensureorder, ACE permissions and the connection string.
Choose manual installation only when you want every version under your control. Follow the framework's official documentation and keep the order: oxmysql › libraries › core › scripts. On a StormHost server, the recipe is much faster; uploading hundreds of files by hand through the Files tab is tedious (support can set up SFTP for large files).
Updating the framework#
- Back up the files (Backups tab) and export the database (HeidiSQL, guide).
- Read the release notes (changelog) on the framework's GitHub. Look mainly for database changes (
.sqlmigration files) and configuration changes. - Stop the server.
- Replace the folders of the updated resources with the new ones. Download your
config.luafiles beforehand and compare them with the new ones after the update (new options may be missing). - Run the migration SQL if the release includes it.
- Start the server and watch the console. Then check your character, money and inventory in the game.
Don't update only the core without the other parts of the framework. The versions of es_extended and the [esx_addons] scripts (or qb-core and qb-*) should go together.
Verification#
- The console (or Live Console in txAdmin) shows
Database server connection established!, and the framework core loads without red errors. - After connecting in the game, character creation or selection appears.
- The
/groupcommand (ESX) or opening the/adminmenu (QBCore, Qbox) confirms you have admin permissions.
Troubleshooting#
Look up messages you can't find here in Common FiveM server errors.
Task Failed: Response code 403 (rate limit exceeded)#
The recipe downloads dozens of repositories from GitHub, and GitHub has temporarily limited the number of requests. Wait about an hour and run the deployment again.
The deployment fails with a database error#
The details don't match the Database tab (the host from the Host field, not localhost; the database name exactly as in the list). Typical messages and how to fix them are in Database for FiveM.
ESX = nil (or attempt to index a nil value (global 'ESX'))#
The script has no access to ESX: either it starts before es_extended, or it uses the old way of loading ESX. Put its ensure below es_extended and update both es_extended and the script to the current version.
No such export GetCoreObject in resource qbx_core#
A QBCore script is calling the Qbox core directly. On Qbox, it should call exports['qb-core']: (through the bridge). Check that the bridge is on (setr qbx:enableBridge "true"), and fix the script or download the Qbox version.
Native … is not supported#
The framework or a script uses a function your server version doesn't know yet. Update the artifacts to the latest version (guide).
A player is stuck on the loading screen#
- Most often an error in the multicharacter script or the database. Look at the server console and the client console (F8).
- Qbox with a custom multicharacter: set
setr loadscreen:.externalShutdown false - QBCore after the first deployment: wait for the resource build (
yarn) to finish.
ESX Multicharacter couldn't connect to the database#
The database connection doesn't work. Check set mysql_connection_string in server.cfg and the Database server connection established! line in the console.
Admin commands don't work#
- QBCore and Qbox: the
add_principal …line with the correct identifier is missing, or you added it and didn't restart the server. - ESX: the player doesn't have the
admingroup. Check with/groupand set it withsetgroup.
Summary
- Choose your framework up front: ESX Legacy has the most scripts, Qbox the most modern base plus compatibility with QBCore scripts, and QBCore is the classic with its own
qb-*scripts. - Installation: empty database, txAdmin › Popular Recipes › recipe, database details from the Host field, Run Recipe, Save & Run Server.
- After installing, set the server language (
sets locale) and the framework language, and add admins permanently throughserver.cfg(QBCore, Qbox) orsetgroup(ESX). - Download scripts in the version for your framework. Back up files and the database before updating.