FiveM Updated April 27, 2026

ESX and QBCore Frameworks: Overview and Installation

Comparison of the ESX and QBCore roleplay frameworks with installation steps for both.

FiveMESXQBCoreRoleplayFramework

Overview

ESX and QBCore are the two dominant roleplay frameworks for FiveM. Both provide a structured economy, job system, inventory, and player identity layer that dozens of community resources build on. Choosing one locks you into its ecosystem of compatible scripts, so evaluate each before committing to a server build.

ESX vs. QBCore at a Glance

Feature ESX QBCore
Age / maturity Older; very large resource library Newer; growing library
Database ORM oxmysql oxmysql
Config style Lua Config tables Lua Config and Shared tables
Job system es_extended core qb-core core
Community Very large; many free resources Large; active development
Performance Heavier on DB calls Generally more optimised

Both require MySQL or MariaDB. See Setting Up MySQL/MariaDB for FiveM before proceeding.

Installing ESX

1 — Install oxmysql

oxmysql is the database bridge used by both frameworks. Download the latest release from the oxmysql GitHub releases page and place it in resources/[standalone]/oxmysql/.

2 — Install es_extended

Download the latest ESX release. Place it in resources/[esx]/es_extended/.

Import the SQL schema:

mysql -u root -p fivem < es_extended/sql/es_extended.sql

3 — Configure the Connection String

In server.cfg:

set mysql_connection_string "mysql://user:password@localhost/fivem?charset=utf8mb4"

4 — Load Resources in server.cfg

ensure oxmysql
ensure es_extended

oxmysql must come before es_extended. All ESX-dependent resources must come after es_extended.

5 — Optional: Whitelist

In es_extended/config.lua, set:

Config.Whitelist = true
Config.WhitelistGrade = 0

See Setting Up a Server Whitelist for full whitelist configuration.

Installing QBCore

1 — Install oxmysql

Same as ESX — install oxmysql first.

2 — Install qb-core

Clone or download qb-core and place it in resources/[qb]/qb-core/.

Import the SQL schema:

mysql -u root -p fivem < qb-core/sql/qb-core.sql

3 — Configure the Connection String

In server.cfg:

set mysql_connection_string "mysql://user:password@localhost/fivem?charset=utf8mb4"

4 — Load Resources in server.cfg

ensure oxmysql
ensure qb-core

All QBCore-dependent resources must come after qb-core.

Adding Framework Resources

Both frameworks have large catalogs of compatible jobs, shops, garages, and utilities. When adding a resource:

  1. Read its README for SQL imports and dependency order.
  2. Import any SQL files before starting the resource.
  3. Add ensure resource-name to server.cfg after the framework ensure line.
  4. Restart the server and watch the txAdmin console for errors.

Common Issues

  • Resource fails to start on boot: Dependency was ensured out of order. Move it below the framework ensure line.
  • MySQL connection failed: Verify credentials and that MySQL is running before FXServer starts.
  • attempt to index a nil value (global 'ESX'): A script loaded before es_extended finished initializing. Use the ESX:PlayerLoaded event pattern or wait for ESX global.