Private customers Business customers

The server.cfg explainedThe central configuration file of your FiveM server

The server.cfg is the blueprint of your FiveM server: it decides how it appears in the server list, how many players it allows, which resources start and who has admin rights. This guide goes through the file from top to bottom and explains why the order matters.

ensureACE permissionssv_hostnameLoad order

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:

  1. Network and identity - endpoints, server name, player count, tags.
  2. Database - the connection string, before any resource.
  3. Resources - all ensure lines in dependency order.
  4. 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 & prices

Identity: 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 locale and 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_scriptHookAllowed set to 0 - 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

It sits in the server directory next to the resources folder. You can edit it in the config editor of our web interface or via WebFTP and SFTP.

ensure starts a resource and restarts it if it is already running. start only starts it. In practice, ensure is the more robust choice.

For changes to the server name, player count or load order, yes. Individual resources can also be restarted selectively via the console.

As many as your concept needs - with us, the number is not a price barrier. In practice, the script load is the limiting factor, not the entry in the file.

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 & prices

FiveM server hosting

from €7.99 / month

Prepaid without a contract, DDoS protection up to 250 Gbit/⁠s, hosted in Frankfurt am Main.

View plans & prices

Go straight to checkout

Read more


Discover more