01
What you need before you start
A FiveM server runs on the Cfx.re platform. To start one, you need three things: a machine that runs the server software (the "artifacts" published by Cfx.re), a Cfx.re licence key tied to the server, and a legitimate copy of GTA V for every player who connects.
The key is created free of charge on the Cfx.re portal, with the account of the person who runs the server. It identifies your server to the platform; without it, the server will not start.
Before writing the first line of configuration, settle three points:
- the type of server: roleplay, racing, freeroam, friends only or public. A roleplay server needs a framework and a database; a racing server can do without;
- the number of players you expect at the same time, which sets the size of the machine;
- the resources (scripts, vehicles, maps) you want to use, and the framework they are written for.
Running the server on your own computer is fine for testing. For a community, it does not hold up: the server stops when the computer does, and your home connection's address is exposed to attacks.
02
The steps, from txAdmin to the first player
txAdmin is FiveM's official administration tool, shipped with the server. It starts and restarts the server, shows the console, manages players and sanctions, schedules restarts and installs a server from a "recipe", a ready-made template. It opens in your browser, on port 40120 by default.
- Open txAdmin and enter the first-time setup code, then link your Cfx.re account: it becomes the main administrator account.
- Choose a recipe: a basic server, or a full roleplay framework. The recipe downloads the resources, prepares the database and writes the
server.cfg.
- Enter the licence key if it is not already set, then start the server.
- Read the console: one line confirms the key has been authenticated, then the resources start one by one. Any red error at this stage should be fixed before going further.
- Connect: in FiveM, open the console with F8 and type
connect adresse:30120.
- Give yourself admin rights in the framework, then bring in a few testers before opening to the public.
Next, set up scheduled restarts: a roleplay server loaded with scripts benefits from restarting once or twice a day, at a quiet time, to start again with clean memory. txAdmin warns connected players before each restart.
03
Choosing a framework: ESX, QBCore or Qbox
A roleplay server almost always relies on a framework, which handles characters, money, jobs, inventory and vehicles. Three families dominate:
- ESX Legacy: the oldest and most widespread, with a huge number of compatible resources.
- QBCore: another very popular base, with its own ecosystem of "qb-…" resources.
- Qbox: more recent, built for performance, and compatible with a good share of QBCore resources.
The right choice depends mainly on the resources you plan to use: a resource written for ESX will not work as-is on QBCore, and vice versa. Many recent resources also rely on the "ox" libraries (ox_lib, ox_inventory, ox_target), which work with several frameworks.
Pick your framework before buying or developing scripts, and before opening to the public: switching later is almost like starting from scratch, because characters and the database do not carry over from one framework to another.
04
The server.cfg and resources
The server.cfg is the server's main configuration file. The lines you will touch most often:
sv_hostname: the name shown in the server list;
sets tags and sets locale "fr-FR": keywords and language, which help players find you;
sv_maxclients: the number of slots;
load_server_icon: the server logo, a 96 × 96 pixel PNG image;
sv_licenseKey: the licence key;
ensure nom_de_la_ressource: one line per resource to start.
A resource is a folder placed in resources/, with an fxmanifest.lua file that describes it. Folders in square brackets, such as [esx], are only there to keep things tidy.
To add a script: upload the folder, add its ensure line, restart, then read the console. Order matters: a resource starts after the ones it depends on (the database, then the framework, then the scripts). Add resources one at a time: when an error appears, you know where it comes from.
Vehicles and maps that use recent GTA V content sometimes require a specific game build: that is what sv_enforceGameBuild is for, as it enforces that build for every player.
05
The database and backups
Frameworks store characters, accounts and inventories in a MariaDB (or MySQL) database, linked to the server by the oxmysql resource. The connection string is set in the server.cfg. To view or fix data by hand, software such as HeidiSQL connects to the database from your computer.
The database holds the server's whole life: characters, money, purchased vehicles, properties. A backup of the files without the database is not enough to restore a roleplay server. Back up both together, and always before updating the framework or a script that changes tables.
Our FiveM plans include 2 to 4 databases depending on the tier: one for the server, the others for a test server or tools. They are backed up with the rest of the server.
06
Players, OneSync and performance
By default, FiveM listens on port 30120, over TCP and UDP. This address:port pair is what your players type to connect, or what the server list displays.
Beyond 32 players, OneSync mode must be enabled (set onesync on): it synchronises the world through the server and lets you host more people. It is free up to 48 players; beyond that, Cfx.re requires a key linked to a Patreon subscription.
A server's resource usage depends first on the number of players online at the same time, then on the weight of the resources. In practice, it is almost always the scripts that weigh the most:
- in game, the
resmon 1 command (F8 console) shows each resource's processing time: a well-written resource stays close to zero when idle;
- remove unused resources rather than letting them start;
- choose optimised vehicles and maps: very heavy textures lengthen players' loading times;
- keep an eye on memory throughout the day: if it climbs and never comes back down, a resource is holding on to it. A scheduled restart limits the damage until you find it.
07
Server security
- No "leaked" resources: paid scripts copied and shared for free often contain backdoors that hand control of your server to a stranger. Using them also breaches Cfx.re's terms.
- Encrypted ("escrow") resources bought from the official store are tied to the buyer's Cfx.re account and only work with a licence key from that account. If you plan to buy some, ask support before purchasing.
- Cheat menus: leave
sv_scriptHookAllowed at 0 to refuse players who use ScriptHook.
- Named admin accounts: one txAdmin account per administrator, with only the rights they need, never a password shared in a Discord channel.
- The database closed to the public: its port must not be open to the whole Internet.
- DDoS protection: a successful roleplay server often ends up under attack, sometimes from banned players. The topic is covered in detail in the guide protecting a game server against DDoS attacks.
08
Your FiveM server with CloudFive
- Ready in about 30 seconds after payment: the server is created, the licence key set and Anti-DDoS Premium active. Port 30120 is protected from delivery.
- txAdmin included, with its first-time setup code shown in the client area.
- ESX Legacy, QBCore, Qbox or a basic server in one click, from the official recipes: the database is created and filled, the
server.cfg completed. The server's content is replaced, after a backup.
- Artifacts: the installed version, the available versions, and a button to roll back to the previous one if an update breaks a script. A backup is made first.
- Beyond 48 players, the Patreon-linked key is provided and managed by us, at no extra cost.
- Ryzen 9 9950X and DDR5 on every tier, NVMe storage, in France: around 16 players on Starter, 32 on Essentiel, 64 on Avantage, 96 on Performant and 128 on Expert, with typical resources. You can change tier without reinstalling or losing data.
Plans have no commitment, support answers 7 days a week, and the team helps you move over from another host. Prefer the Wild West? RedM runs on the same platform: see the guide creating a RedM server.
09
Frequently asked questions
Does the Cfx.re licence key cost anything?
No, the basic key is free and is created on the Cfx.re portal. Only servers with more than 48 players require a key tied to a Patreon subscription; on our plans, it is supplied at no extra cost.
Should I choose ESX or QBCore?
Choose based on the resources you want to use: they are written for a specific framework. ESX Legacy has the largest catalogue, QBCore and Qbox are more recent bases. Decide before opening: switching framework afterwards is almost like starting from scratch.
How do I connect to my FiveM server?
Open FiveM, press F8 and type connect followed by the server's address and port, for example connect 203.0.113.42:30120. Once the server is online, it also appears in the server list.
Why is my FiveM server lagging?
Most often because of a resource that is too demanding, not the number of players. The resmon 1 command, in the F8 console, shows each resource's processing time: remove or replace those that stay high when idle, then check the server's memory.