ESX is the long-standing, most widely-used FiveM roleplay framework, with the largest library of community scripts. This guide covers how to install ESX (ESX Legacy) on your FiveM server.
Prerequisites
- A working FiveM server with a valid server.cfg.
- A MySQL/MariaDB database — see our database setup guide.
- OneSync enabled.
Step 1: Install oxmysql
ESX Legacy uses oxmysql as its database connector. Download it, place it in resources, and set your connection string in server.cfg. It must start before ESX.
Step 2: Install es_extended
- Download es_extended (ESX Legacy) from the official ESX GitHub.
- Place it in your
resourcesfolder (commonly under an[core]or[esx]folder). - Import its SQL file into your database (creates the users and related tables).
Step 3: Configure server.cfg (load order matters)
ensure oxmysql
ensure es_extended
# then your ESX resources / jobs / inventory
oxmysql must load first, then es_extended, then anything that depends on ESX. A wrong order is the most common cause of ESX failing to start.
Step 4: Add an inventory and resources
ESX works with many inventories — ox_inventory is the modern recommendation (see our best scripts guide). Add jobs, banking and HUD resources on top, each matched to ESX and ensured in server.cfg.
Verify it works
Start the server and watch the console — ESX prints its version and any errors point to the exact resource or table. If players spawn without money/identity, check that the SQL imported and oxmysql connected.
The fastest route is a managed FiveM server with a txAdmin ESX recipe that installs es_extended, oxmysql and the SQL automatically.
Frequently asked questions
What do I need to install ESX?
A FiveM server, a MySQL/MariaDB database, oxmysql, and es_extended (ESX Legacy). Import the SQL and ensure them in the right order.
Why won’t ESX start?
Usually load order (oxmysql must come before es_extended), a missing database connection, or un-imported SQL. Check the console for the exact error.
Is ESX or QBox better for beginners?
ESX — it’s simpler and has the largest library of ready-made scripts. QBox is the modern choice for new servers wanting active development.
Ready to play?
Run your own FiveM server with XGamingServer
Spin up an always-on FiveM server your friends can join in minutes — no port-forwarding, no tech headaches.




