The server.cfg file is the heart of every FiveM server — it sets your server name, max players, license key, which resources load, and who has admin power. Get it right and your server boots clean; get it wrong and it won’t start at all. Here’s every important section explained.
Identity and basics
sv_hostname "My FiveM RP Server"
sv_maxclients 48
sets locale "en-US"
sets tags "roleplay, economy, custom"
sv_maxclients can go up to 2048 on modern builds, but your real limit is your hardware — busy RP servers are CPU-bound, so size sensibly.
The license key
sv_licenseKey yourCfxKeyHere
This is the free Cfx.re key. Without it the server refuses to start — see our license key guide.
Starting resources with ensure
Resources are loaded with the ensure command (preferred over the older start, because ensure also restarts a resource if it’s already running). Order matters — dependencies must come before the resources that need them:
ensure mapmanager
ensure spawnmanager
ensure sessionmanager
ensure chat
ensure hardcap
# frameworks and your own resources after the basics
ensure es_extended
Admin permissions (ACE)
FiveM controls admin power through the ACE permission system in server.cfg:
add_ace group.admin command allow
add_principal identifier.fivem:1234567 group.admin
Getting ACE syntax right is fiddly — our free ACE permissions generator builds the exact add_ace / add_principal lines for you, and the ACE permissions guide explains the model.
Endpoints and OneSync
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
set onesync on
OneSync is required for servers above 32 slots and enables server-side entity control used by most modern frameworks.
Build it without the typos
One wrong quote or a misordered ensure can stop the whole server from booting. Our free server.cfg generator produces a valid file with your name, slots, endpoints, and resource list filled in. On XGamingServer FiveM hosting you can edit it in the panel or through txAdmin and restart in one click — the configuration guide has the details.
FAQ
ensure vs start — which should I use? Use ensure. It starts the resource and restarts it if it’s already running.
My server won’t start. Check the license key, look for a missing/misordered ensure, and watch the console for the first error line.
How many players can I run? Up to 2048 with OneSync, but CPU is the real ceiling — size to your hardware.
Sources: Cfx.re Docs — Setting up a server.



