FiveM Docs
Getting Started

Install ESX Legacy with txAdmin

Step-by-step guide to install ESX Legacy on a FiveM server with the official txAdmin recipe, including MariaDB setup, license key and what the recipe installs.

The fastest and most reliable way to install ESX Legacy is the official txAdmin recipe. txAdmin ships with every FiveM server build. The recipe downloads ESX and its dependencies, imports the SQL schema into your database and writes a ready-to-use server.cfg. A fresh install takes about 10 to 15 minutes.

If you cannot or do not want to use txAdmin, follow Manual installation instead.

Before you begin

RequirementNotes
cfx.re accountNeeded to log in to txAdmin and to create a server license key. Sign up at cfx.re.
MariaDBESX needs a MySQL-compatible database. Install MariaDB and remember the root password you set.
Windows or Linux machineThis guide shows Windows. On Linux the txAdmin part is identical.
Disk spacePlan for several GB: server build, resources, database and backups.
Open portPlayers connect on port 30120 (TCP and UDP) by default.

Do not use XAMPP

XAMPP bundles an old MySQL/MariaDB with defaults meant for local web development. It is a common source of crashes and lost data on FiveM servers. Install MariaDB on its own.

What the recipe installs

The ESX Legacy recipe (recipe.yaml in esx-recipes) runs these tasks in order:

  1. Downloads the default cfx resources into resources/[cfx-default] and removes their chat resource (the server uses the built-in system chat instead).
  2. Downloads server.cfg and the server icon esxLogo.png from the recipe repository.
  3. Connects to your database and imports [SQL]/legacy.sql from esx_core.
  4. Downloads esx_core into resources/[core] and the official addons into resources/[esx_addons].
  5. Downloads standalone resources into resources/[standalone]: oxmysql, ox_lib, pma-voice, bob74_ipl, sd-phone and sd-phone-props.
  6. Enables OneSync (the recipe sets $onesync: on).

The result is a complete roleplay server with jobs, shops, banking, housing, vehicles and a phone.

Installation

Download the server build

Download the latest FiveM server build ("artifacts") for Windows. You can use the official build list at runtime.fivem.net or the community mirror artifacts.jgscripts.com, which shows known-broken builds.

Server artifacts download page

On artifacts.jgscripts.com, click Windows to download the recommended build.

Windows download button

Extract the archive to a permanent folder, for example C:\FXServer\server.

Extracting the server files

Pick the final location now. txAdmin stores absolute paths, so moving the folder later means updating them by hand. Avoid OneDrive or other synced folders.

Open the extracted folder and run FXServer.exe. If your antivirus flags it, add an exception for the server folder.

FXServer.exe in the server folder

A browser tab opens with the txAdmin setup page. If it does not, the console prints the URL (usually http://localhost:40120) and a PIN. Click Link Account and log in with your cfx.re account.

Link your cfx.re account

Create a backup password. You need it if the cfx.re login is ever unavailable.

Create a backup password

Name the server and pick the ESX recipe

Enter a server name. It shows up in the FiveM server list and in sv_hostname.

Server name

As deployment type choose Popular Recipes, then select ESX Legacy.

Popular recipes

ESX Legacy recipe

Choose the data folder

txAdmin asks where to put the server data (resources, server.cfg, cache). Change the default to a short dedicated path such as C:\FXServer\esx-server.

Change the server data path

Create the folder in Explorer first if txAdmin complains that it does not exist, then save the path.

Save the server data path

Keep the server build (FXServer.exe) and the server data in separate folders. Then you can replace the build during an update without touching your resources.

Open the recipe deployer and enter the database

Continue to the Recipe Deployer.

Go to the recipe deployer

txAdmin asks for your database connection. Make sure the MariaDB service is running, then enter:

FieldTypical value
Hostlocalhost
Port3306
Usernameroot (or a dedicated user, see below)
Passwordthe password you chose when installing MariaDB
Database namefor example es_extended or esx_legacy

txAdmin builds the mysql_connection_string from these values and writes it into server.cfg.

Add your license key

On the Review Recipe page, paste a server license key.

Review recipe page

Create a key at portal.cfx.re with the same cfx.re account. One key per server.

Keep the key private

The license key identifies your server. Never post it in screenshots, support tickets or public repositories. If it leaks, revoke it on the portal and create a new one.

Run the recipe

Click Run Recipe. The download of the addons can take several minutes. When it finishes, txAdmin shows the generated server.cfg. Check the values (max players, locale, tags), then click Next and start the server.

Setup complete

After the installation

  1. Watch the first start. The console should show oxmysql connecting, es_extended starting and the ESX migrations running. A message like Server restart required! after migrations is expected on the first start; restart the server once.
  2. Join your server. In FiveM press F8 and type connect localhost:30120. You should see the ESX loading screen, then character creation from esx_multicharacter and esx_identity.
  3. Make yourself admin. txAdmin adds your account as a master admin in server.cfg. To get the ESX admin group in game, see Admin permissions.
  4. Create a dedicated database user. Running a public server as root is a bad idea. Create a user that only has rights on your ESX database and update the connection string. See server.cfg.
  5. Set up backups. Back up the database and the resources folder before every change. txAdmin can schedule restarts, but it does not back up your database.

Choosing the language

ESX picks its language from the esx:locale convar. If that is not set, it uses the language you selected in txAdmin (txAdmin-locale), and falls back to English. To force a language, uncomment this line in server.cfg:

server.cfg
setr esx:locale "de"

Common problems

ProblemCause and fix
Antivirus deletes or blocks FXServer.exeFalse positive. Add the server folder to the antivirus exclusions and extract again.
Recipe fails at connect_databaseMariaDB is not running or the credentials are wrong. Check the MariaDB service and try logging in with HeidiSQL using the same values.
Recipe fails while downloading addonsGitHub rate limit or a slow connection. Wait a few minutes and run the recipe again.
License key rejectedThe key belongs to another account or was revoked. Create a new one on the portal.
Server not in the server listPort 30120 is blocked (firewall or router) or the key is invalid. Players can still join with connect <ip>:30120.
Players are kicked with "ESX Requires Onesync Infinity"OneSync was switched off in the txAdmin settings. Set it back to on.

For more errors, see Troubleshooting.

Frequently asked questions

Independent documentation

esx-fivem.com is a community project and is not affiliated with the ESX Framework team. Facts on this page were checked against the upstream source. Official resources: docs.esx-framework.org and github.com/esx-framework.
Edit on GitHub

Last updated on

On this page