Install QBCore or ESX on a FiveM server
Choose between QBCore and ESX Legacy, deploy the framework with the txAdmin recipe or by hand, connect the MariaDB database through oxmysql and fix the most common startup errors.
By Salem ASSADI • Published 5 November 2026 • Updated 25 November 2026 • Related plan: FiveM server
Why this guide
A "vanilla" FiveM server provides no money, no jobs and no inventory: those systems come from a roleplay framework. The two most widely used are QBCore and ESX Legacy. Installing them is not complicated, but three things must line up for everything to start: the Cfx.re license key, the MariaDB database and the resource load order in server.cfg. A single mistake in any of them is enough to fill the console with red errors.
This guide covers choosing between the two frameworks, the prerequisites, deployment with the txAdmin recipe (the method recommended by both QBCore and ESX), manual installation, oxmysql and OneSync configuration, and troubleshooting. It is based on a server hosted at RXCORP and managed from the Pelican panel, but the steps apply to any FXServer server.
QBCore or ESX Legacy: how to choose
Both frameworks do essentially the same thing (managing players, money, jobs and items) and both rely on oxmysql for SQL access. The differences lie in how they are organized and in their ecosystems.
| Criterion | QBCore | ESX Legacy |
|---|---|---|
| Core resource | qb-core | es_extended |
| Where jobs and items are defined | Shared Lua files in qb-core/shared/ (jobs, items, vehicles…) | Mostly in the database (jobs, job_grades, items tables) |
| Players table | players | users |
| Resource prefix | qb- (qb-inventory, qb-phone…) | esx_ (esx_identity, esx_billing…) |
| Ecosystem | Many recent scripts, forks such as Qbox | The oldest script catalog, free and paid |
In practice, three questions settle most cases:
- Which scripts do you want to buy or reuse? Check that they exist for the framework you are targeting. Many Tebex scripts ship in both ESX and QBCore versions, but not all of them.
- Who will manage the content? With ESX, adding a job is often done in SQL (phpMyAdmin). With QBCore, you edit a Lua file and then restart the resource.
- Do you already have an existing database? The two SQL schemas are incompatible: migrating from one framework to the other means starting over on the data side.
Do not mix the two on the same server: an ESX script does not call the same exports as a QBCore script, and compatibility bridges add yet another source of errors.
Prerequisites
- A Cfx.re license key, free, generated on portal.cfx.re (the old Keymaster,
keymaster.fivem.net, redirects there). Sign in with your Cfx.re account, create a server key and enter your server's IP address. This key is required to start FXServer. - A MariaDB database. The FiveM Dev and Starter plans include one database, the Pro RP plan includes two (see the FiveM plans page). Create it in your server's "Databases" tab on panel.rxcorp.me: the host, port, username, password and database name are displayed there. Write them down, you will need them for every method.
- txAdmin, built into FXServer. On our servers, two ports are allocated: one for the game and one for the txAdmin web interface. The txAdmin port is assigned by the panel; check your server's network tab to find yours.
- Recent server artifacts (FXServer builds). Use the version recommended by Cfx.re or the latest stable version: current frameworks and their dependencies (oxmysql, ox_lib) often require a minimum build.
Step 1: first access to txAdmin
- Start the server from the Pelican console. On first launch, txAdmin prints a URL and a one-time PIN code in the console.
- Open
http://SERVER-IP:TXADMIN-PORTin your browser, enter the PIN, then link your Cfx.re account and set an administrator password. - The setup wizard then offers several deployment types. Choose Popular Recipes.
Step 2: deploy with the txAdmin recipe (recommended method)
A txAdmin recipe is a YAML file that describes every installation operation: downloading GitHub repositories, extracting them, creating folders, running SQL scripts and generating server.cfg. QBCore and ESX Legacy each publish their own official recipe, which guarantees a set of resources that have been tested together.
- Select the QBCore Framework or ESX Legacy recipe.
- Keep the data folder suggested by txAdmin unless you have a specific reason not to.
- Paste your Cfx.re license key when the wizard asks for it.
- At the database step, enter the exact host, port, username, password and database name shown in the panel. On shared hosting, your user is generally not allowed to create new databases: enter the name of the database you already created rather than a made-up name.
- Start the deployment. txAdmin shows the log of each task; an error at the SQL step almost always points to incorrect credentials.
- At the end, txAdmin presents the generated
server.cfg. Review it, save, then start the server.
The recipe imports the framework's SQL schema automatically: you do not need to run anything in phpMyAdmin.
Step 3: manual alternative
Manual installation is mainly useful for adding a framework to an existing server or for keeping precise control over each resource. It is done through the panel's file manager or over SFTP.
Place the resources
In the resources folder, create a category folder in square brackets: [qb] for QBCore, [esx] for ESX. The brackets tell FXServer that this is just a grouping, not a resource. Download the resources from each framework's official GitHub repositories, and place oxmysql (the "release" build, not the raw source code) in resources or in a [standalone] folder.
resources/
├── [cfx-default]/
├── [standalone]/
│ └── oxmysql/
└── [qb]/
├── qb-core/
├── qb-multicharacter/
└── qb-spawn/
Import the SQL
Each framework provides a .sql file at the root of its core resource or repository (for example qbcore.sql for QBCore), and many add-on resources provide their own. Open phpMyAdmin from the panel, select your database, go to the Import tab, then import the framework's file first and the add-on resources' files afterwards.
Configure oxmysql
oxmysql reads its connection from the mysql_connection_string convar. Two syntaxes are accepted; pick only one.
# URI syntax
set mysql_connection_string "mysql://utilisateur:motdepasse@hote:3306/nom_base?charset=utf8mb4"
# key=value syntax
set mysql_connection_string "server=hote;port=3306;database=nom_base;userid=utilisateur;password=motdepasse"
If the password contains special characters (@, :, /, #), prefer the key=value syntax or encode those characters in the URI. Documentation is available in the oxmysql repository.
Step 4: a clean server.cfg and ensure order
FXServer starts resources in the order of the ensure lines. The rule is simple: oxmysql first, then libraries (ox_lib if your scripts use it), then the framework core, then everything else. A resource that calls the framework before it is loaded fails at startup. Example for QBCore:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_hostname "Mon serveur RP"
sv_maxclients 48
sv_licenseKey "VOTRE_CLE_CFX"
set onesync on
set mysql_connection_string "mysql://utilisateur:motdepasse@hote:3306/nom_base?charset=utf8mb4"
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure hardcap
ensure oxmysql
ensure qb-core
ensure [qb]
ensure [standalone]
For ESX Legacy the logic is the same: replace qb-core with es_extended and [qb] with [esx]. Replace 30120 with the game port assigned by the panel if it is different. If you used the recipe, keep its order and add your own scripts at the end of the file.
Do not declare the same resource twice (once on its own and once through its category): it does not always cause an error, but it makes the load order hard to follow.
Step 5: enable OneSync
QBCore and ESX Legacy are designed to run with OneSync, FiveM's server-side synchronization system. The set onesync on line enables full mode (formerly called OneSync Infinity), which is required beyond 32 players and expected by most recent scripts. The maximum number of slots allowed depends on the terms attached to your Cfx.re key; refer to the official FiveM documentation. In terms of resources, the Starter plan targets 15 to 32 RP players and the Pro RP plan 48 to 64+ players with OneSync, based on the hardware detailed on the infrastructure page.
Troubleshooting common errors
oxmysql cannot connect
- ECONNREFUSED or timeout: the host or port is wrong. Do not use
localhostout of habit; copy the exact host shown in the panel's "Databases" tab. - Access denied: wrong username or password, or a special character not properly escaped in the URI.
- Unknown database: the database name does not match the one in the panel.
- Check that there is only one
set mysql_connection_stringline and that it is placed beforeensure oxmysql.
Resources do not start
- "Couldn't find resource": the folder name does not match the name in
ensure. A folder downloaded from GitHub is often calledqb-core-mainor similar: rename it. - Missing dependency: read the resource's
fxmanifest.lua(dependenciesline) and install whatever is missing. - Export error or null framework object: the resource starts before the framework core or was written for the other framework. Review the
ensureorder. - In txAdmin, the resources tab and the
resmoncommand in the client console help identify stopped or resource-hungry resources.
Wrong server artifact version
A message saying a resource requires a newer server build, or natives that cannot be found, indicates artifacts that are too old. Update FXServer to the recommended version from the startup variables (Startup tab) in the panel, then restart. Conversely, if a very recent build causes problems, go back to the recommended version rather than the very latest one.
SQL errors about missing tables
An error such as Table 'nom_base.users' doesn't exist (ESX) or one referring to players (QBCore) means the SQL schema was not imported, or was imported into a different database. The same symptom appears for add-on resources whose .sql file you did not import. Import the relevant file through phpMyAdmin into the database specified in mysql_connection_string, then restart the resource.
Going further
Once the framework is running, connect once, then grant yourself admin rights using the framework's method (ACE permissions for QBCore, a database group for ESX). Then add your scripts one at a time, restarting after each addition: it is the most reliable way to identify a faulty resource. The official QBCore and ESX Legacy documentation covers the configuration of each module in detail.
To host your project, check out the RXCORP FiveM server plans (txAdmin and MariaDB included) or browse our other guides. For any questions, support is available on Discord or at [email protected].