How to Install ESX on FiveM (ESX Legacy Setup Guide)

How to install ESX (ESX Legacy) on FiveM — oxmysql, es_extended, database SQL, and the server.cfg load order.

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

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

  1. Download es_extended (ESX Legacy) from the official ESX GitHub.
  2. Place it in your resources folder (commonly under an [core] or [esx] folder).
  3. 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.

99.9%Uptime SLA
< 5 minInstant setup
24/7Human support
DDoSProtected
Instant setup Your server is live in minutes with a one-click control panel.
Mods & plugins Install mods, plugins and workshop content in a few clicks.
DDoS protected Enterprise DDoS mitigation keeps your server online 24/7.
Low-latency hardware Premium CPUs & NVMe SSDs for lag-free multiplayer.
Free backups Automatic backups so your world is never lost.
Real human support Gamers helping gamers — 24/7, no bots, no scripts.

Pick your FiveM plan & play in minutes

See all plans
Starter $8.40/mo 4 GB RAM Renews $12/mo Buy now
Rookie $17.50/mo 8 GB RAM Renews $25/mo Buy now
Pro $24.50/mo 12 GB RAM Renews $35/mo Buy now