Published on · last updated on
Structure in four blocks
A well-kept server.cfg reads from top to bottom like a start sequence. This structure has proven itself:
- Network and identity - endpoints, server name, player count, tags.
- Database - the connection string, before any resource.
- Resources - all
ensurelines in dependency order. - Permissions and license - ACE groups, admins and the license key.
If you stick to this order, you find errors in minutes instead of hours - because the live console works through the file in exactly this order.
FiveM server hosting from €7.99 / month
Prepaid without a contract, DDoS protection up to 250 Gbit/s.
View plans & pricesIdentity: how your server appears
These values decide how your server comes across in the server list:
sv_hostname- the name in the list. Short, unambiguous, without a jumble of symbols.sv_maxclients- your player count. With us, there is no price barrier; the plan figures are recommendations.sets tags- keywords such as roleplay or drift that players filter by.sets localeand a description - helpful if you are looking for players who speak a particular language.load_server_icon- your server image, 96x96 pixels as a PNG.
The endpoint lines endpoint_add_tcp and endpoint_add_udp have to match the port of your server. When moving from another provider, this is one of the places that is easily overlooked.
ensure: the load order
Every active resource needs a line, and the order of these lines is the start order:
ensure oxmysql
ensure [esx]
ensure [jobs]
ensure my_hud
A category folder in square brackets starts all resources inside it - that keeps the file readable even with a hundred scripts. The rule behind it is simple: whatever is needed starts first. So the database connector, then the framework, then everything that builds on it. If a job comes before the core, the console reports a missing dependency at startup.
Besides ensure, there is start. The difference: ensure restarts the resource if it is already running and is therefore the more robust choice. More on handling resources is in install resources.
Permissions via the ACE system
FiveM handles permissions via ACE. The principle: groups receive rights, players are assigned to groups.
add_ace group.admin command allow
add_principal identifier.discord:123456789012345678 group.admin
The player's Steam, Discord, license or FiveM identifier serves as the ID. How to read them and which groups make sense is explained in detail in grant admin permissions.
License and security
Two lines belong in every server.cfg:
sv_licenseKey- your key from the Cfx.re Portal. Without it, the server does not start, see create a license key.sv_scriptHookAllowedset to0- prevents players from smuggling in cheats via script hooks. Practically mandatory for roleplay servers.
Treat your license key and the database login details like a password: anyone who shares the server.cfg in a screenshot on Discord shares both.
Editing and applying changes
With us, you edit the file directly in the config editor of the web interface, alternatively via WebFTP or SFTP. Changes take effect after a restart - for individual resources, a targeted restart via the console is enough.
If you use txAdmin, the same file remains authoritative; it is just run by txAdmin instead of directly by the server. You can then edit it in both interfaces - it is the same file.
A tip from practice: make a copy before larger changes. A server.cfg grows with the project, and a server that no longer starts after thirty new lines is back online in a minute with a working copy.
Frequently asked questions
Rent your own FiveM server
Config editor for the server.cfg, live console, MySQL database included and 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
- Update artifacts
- Install resources
- Grant admin permissions
- Cfx.re license key
- Database & phpMyAdmin
- Set up txAdmin
- Improve server performance
Discover more