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 on in 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 DeployerPopular 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=utf8mb4

Replace 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 mattersoxmysql must start before es_extended.

Start the server

Start from Console. Watch for any database connection or resource errors.

ESX Resource Structure

es_extended
esx_identity
esx_multicharacter
esx_inventory
esx_skin
skinchanger
esx_menu_default
esx_menu_dialog
esx_menu_list
esx_notify
esx_progressbar
esx_textui
esx_context
esx_chat_theme
esx_loadingscreen
cron

Key Configuration

After installing, you can customize ESX in [core]/es_extended/shared/config/main.lua:

SettingDefaultDescription
Config.Locale"en"Language
Config.StartingAccountMoney{ bank = 50000 }Starting bank balance for new characters
Config.MaxWeight24Max inventory weight
Config.EnablePaychecktrueEnable job paychecks
Config.PaycheckInterval7 * 60000Paycheck frequency (7 minutes)
Config.EnableSocietyPayoutsfalsePay from society account instead of server
Config.Identifier"license"Player identifier type

Common Issues

ProblemFix
Database connection failedCheck the connection string. Special characters in the password must be URL-encoded
"Table not found" errorslegacy.sql wasn't imported. Import it into your database via phpMyAdmin or the panel
ESX not loadingCheck that oxmysql starts before es_extended in server.cfg
OneSync errorsAdd set onesync on to server.cfg — required for ESX 1.7.5+
mysql-async errorsESX Legacy uses oxmysql, not mysql-async. Remove mysql-async if present
AUTH_SWITCH_PLUGIN_ERRORMySQL 8+ issue. Set the database user to use mysql_native_password authentication

How is this guide?

40% Off — Limited TimeGet your Fivem server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page