Published on · last updated on
What ESX actually is
FiveM gives you an empty city. A framework turns it into a game with rules: ESX manages characters with names and account balances, hands out jobs with ranks, keeps an inventory and controls who may do what. Every RP script you install later requires one of these frameworks - that is why choosing one is the first decision you make.
The alternative is called QBCore and has a more modern structure. ESX, on the other hand, has the larger selection of ready-made scripts because it has been around longer. What you should not do: install both at the same time.
FiveM server hosting from €7.99 / month
Prepaid without a contract, DDoS protection up to 250 Gbit/s.
View plans & pricesRequirements
Before you upload the first file, three things should be in place:
- A database. No ESX without MySQL - characters and vehicles have to survive a restart. With us, it is included in every plan, see set up the database.
- A license key. Without it, FXServer does not even start, see Cfx.re license key.
- A plan for the folder structure. ESX consists of several resources that belong together - that is what category folders in square brackets are for.
If you want to skip the manual setup: txAdmin comes with deployer recipes that set up an ESX server automatically and fill the database at the same time. It is still worth knowing what happens in the process - and that is exactly what this page covers.
The building blocks and their order
ESX is not a single script but a stack. From bottom to top:
- The database connector. Usually oxmysql. It establishes the connection through which everything else talks - and therefore has to start first.
- The ESX core. The central resource that manages players, accounts and jobs.
- The core modules. Inventory, societies, menus and the libraries that practically every ESX script expects.
- Jobs and additional scripts. Everything that builds on the core - police, mechanics, shops, HUDs.
You reproduce this order in the server.cfg. FXServer starts resources in the order in which their ensure lines appear there. If a job comes before the core, it cannot find it at startup - and shows up red in the console.
Installation step by step
- Upload the files. Create a category folder in the
resourcesfolder -[esx]is common - and upload the core and modules into it. The connector goes into a folder of its own. How category folders work is explained in install resources. - Import the SQL. ESX comes with
.sqlfiles that create tables for players, jobs and items. Import them in phpMyAdmin before the server starts for the first time - otherwise the core creates players for whom there is no table. - Enter the connection. The connection string for the database belongs at the very top of the
server.cfg, even before the firstensureline. - Set the load order. First the connector, then the category folder with the core, then everything else.
- Start and watch. The live console shows every resource as it starts. If one is missing or reports an error, you see it immediately.
Typical pitfalls
- Mixing versions. A script for an older ESX version often does not run on a newer one. For every additional script, check which ESX version it was written for.
- Two connectors. If an old script still expects a different database connector, two quickly end up running in parallel. Decide on one and adapt the scripts.
- SQL forgotten. The server starts, but nobody can create a character - a classic case of a
.sqlthat was not imported. - Everything in one folder. Without category folders, the
server.cfggets messier with every resource. The structure pays off by the thirtieth script at the latest.
If the server becomes sluggish after an extension, the amount is rarely to blame - it is usually a single script. How to find it is explained in improve server performance.
Afterwards: permissions and operation
Once the core is in place, you next need admin rights for yourself and your team. ESX comes with its own groups that build on FiveM's ACE permission system - described in grant admin permissions.
And before the server goes public: make a backup of your database. Automatic backups are deliberately not part of the plan with us; instead, you can take a complete export yourself via phpMyAdmin at any time - which is the calmer way, especially when experimenting with frameworks.
Frequently asked questions
Rent a FiveM server for ESX
MySQL database with phpMyAdmin in every plan, full access to resources and server.cfg, txAdmin on request - prepaid, made in Germany.
View plans & pricesFiveM server hosting
from €7.99 / month
Prepaid without a contract, DDoS protection up to 250 Gbit/s, hosted in Frankfurt am Main.
View plans & pricesRead more
- FiveM server - overview
- Set up a QBCore server
- Database & phpMyAdmin
- Install resources
- server.cfg explained
- Set up txAdmin
- Rent a server with txAdmin
- Grant admin permissions
Discover more