How to Install ESX Legacy Framework on Your FiveM Server
Install ESX Legacy on your FiveM server using the txAdmin recipe or manually — includes database setup, server.cfg configuration, and common issues.
ESX Legacy is the leading open-source roleplay framework for FiveM. It provides a complete RP foundation: player identity, multicharacter system, jobs (police, EMS, taxi, mechanic), economy with bank accounts, inventory, vehicle ownership, garages, properties, clothing, and more.
Prerequisites
Before installing ESX you need:
- A MySQL database — create one in the Databases tab on the XGamingServer Panel. See Database Setup
- OneSync enabled — ESX 1.7.5+ requires it. Set
set onesync onin server.cfg - oxmysql — the MySQL connector ESX depends on (the txAdmin recipe installs this automatically)
Install ESX
The txAdmin recipe is the easiest method — it downloads and configures everything automatically.
Open txAdmin Server Deployer
Access txAdmin through your panel (usually via the Console or a direct txAdmin URL). Go to Server Deployer → Popular Recipes.
Select "ESX Legacy"
Find the recipe authored by "ESX Framework" and select it. The recipe automatically downloads and installs:
- Default FiveM resources (chat, spawnmanager, hardcap)
- oxmysql (MySQL connector)
- [core] — 16 core ESX resources (es_extended, identity, inventory, multicharacter, etc.)
- [esx_addons] — 32 addon resources (police job, ambulance, taxi, vehicle shop, garages, etc.)
- bob74_ipl (interior props)
- pma-voice (voice chat)
- Preconfigured
server.cfg
Configure the database connection
During the recipe setup, you'll be prompted for the MySQL connection string. Use the credentials from your Databases tab:
mysql://dbuser:dbpassword@127.0.0.1/dbname?waitForConnections=true&charset=utf8mb4Replace dbuser, dbpassword, and dbname with your actual database credentials from the panel.
If your database password contains special characters (
;,/,?,@,&,=,+,$,#), URL-encode them or the connection will fail.
Complete the recipe
The recipe imports legacy.sql into your database (creates 24 tables for players, vehicles, jobs, economy, etc.) and deploys the server. Follow the remaining prompts.
Start the server
Once the recipe completes, start the server. ESX is fully installed and ready.
Download ESX core
Download the latest release from github.com/esx-framework/esx_core. Extract the [core] folder into your server's resources/ directory.
Download ESX addons
Download from github.com/esx-framework/ESX-Legacy-Addons. Extract the [esx_addons] folder into resources/.
Download oxmysql
Download the latest release ZIP from github.com/overextended/oxmysql/releases. Extract to resources/[standalone]/oxmysql/.
Import the database
In the Databases tab on the panel, create a database if you haven't already. Then import [SQL]/legacy.sql from the esx_core download into your database. This creates 24 tables including users, owned_vehicles, jobs, items, billing, and more.
Configure server.cfg
Add these lines to your server.cfg (via Files in the sidebar):
set onesync on
set mysql_connection_string "mysql://dbuser:dbpassword@127.0.0.1/dbname?waitForConnections=true&charset=utf8mb4"
# Default resources
ensure chat
ensure spawnmanager
ensure hardcap
# ACE permissions for ESX
add_principal group.admin group.user
add_ace group.admin command allow
add_ace group.admin command.quit deny
add_ace resource.es_extended command.add_ace allow
add_ace resource.es_extended command.add_principal allow
add_ace resource.es_extended command.remove_principal allow
add_ace resource.es_extended command.stop allow
# MySQL
ensure oxmysql
# ESX
ensure es_extended
ensure [core]
ensure [esx_addons]Start order matters —
oxmysqlmust start beforees_extended.
Start the server
Start from Console. Watch for any database connection or resource errors.
ESX Resource Structure
Key Configuration
After installing, you can customize ESX in [core]/es_extended/shared/config/main.lua:
| Setting | Default | Description |
|---|---|---|
Config.Locale | "en" | Language |
Config.StartingAccountMoney | { bank = 50000 } | Starting bank balance for new characters |
Config.MaxWeight | 24 | Max inventory weight |
Config.EnablePaycheck | true | Enable job paychecks |
Config.PaycheckInterval | 7 * 60000 | Paycheck frequency (7 minutes) |
Config.EnableSocietyPayouts | false | Pay from society account instead of server |
Config.Identifier | "license" | Player identifier type |
Common Issues
| Problem | Fix |
|---|---|
| Database connection failed | Check the connection string. Special characters in the password must be URL-encoded |
| "Table not found" errors | legacy.sql wasn't imported. Import it into your database via phpMyAdmin or the panel |
| ESX not loading | Check that oxmysql starts before es_extended in server.cfg |
| OneSync errors | Add set onesync on to server.cfg — required for ESX 1.7.5+ |
mysql-async errors | ESX Legacy uses oxmysql, not mysql-async. Remove mysql-async if present |
| AUTH_SWITCH_PLUGIN_ERROR | MySQL 8+ issue. Set the database user to use mysql_native_password authentication |
Related Guides
How is this guide?

How to Install ELS (Emergency Lighting System) on Your FiveM Server
Install ELS-FiveM to sync emergency vehicle lights and sirens across all players on your FiveM RP server.
How to Install EUP (Emergency Uniforms Pack) on Your FiveM Server
Install EUP on your FiveM RP server for detailed police, fire, EMS, and military uniforms.