Guide
FiveM server.cfg Essentials for a Stable Launch
The server.cfg settings that matter on a new FiveM roleplay server: endpoints, keys, OneSync, ensure order, and the lines that cause the first-night crash.
Kyros2 min read
server.cfg is the server. Everything else is resources it agreed to start. A messy cfg boots anyway, which is why people discover the mistake at 8 p.m. with a full queue.
Identity and access
Set the hostname, the project description, and tags players will actually search. Point sv_licenseKey at the key for the same Cfx.re account that owns your escrowed packs. A key from a different account is the entitlement error in the install guide.
Bind the endpoint you mean to publish, and set sv_maxclients to a number you have tested. A 128 slot listing on a box that fell over at 40 is a marketing problem. The soft launch is where you learn the real number.
OneSync on, population under control
A roleplay server in 2026 runs OneSync. Turn it on in the cfg and read the OneSync explainer before you copy a population line from a 2019 tutorial. High ped and vehicle densities feel alive in an empty session and choke the client once 80 players are spawning cars of their own.
Ensure order is a dependency list
Start dependencies before the resources that need them. A reliable shape:
- Database (
oxmysql) and library (ox_lib) - Framework core
- Inventory
- Jobs, housing, vehicles
- Weapon packs and other streaming assets
- Maps and MLOs
- Chat, HUD, and small scripts that assume the above exist
ensure [folder] starts a folder in filesystem order, which is not the same as dependency order. Name the resources that matter. Keep the folder name you downloaded. Renaming an escrowed resource is a good way to get an error that looks like a bad purchase.
The lines that save a night
setsfor tags and a locale, so the server says what it is in the list.- A steam or Discord identifier requirement only if you actually use it. Forcing an identifier you do not check just blocks players at the door.
- Ace permissions for a small admin group, not for every moderator's Steam ID pasted at the bottom over time.
sv_scriptHookAllowed 0so client-side menus are not invited.
Leave a comment above any line you changed, with the date and the reason. Future you, at midnight, will not remember why entity lockdown is set the way it is.
What does not belong in the cfg
Database passwords in a file you paste into tickets. A hundred ensure lines for resources you removed months ago. Exec permissions for a script a donor sent you. The cfg is read by the process and, sooner or later, by other humans. Treat it that way.
Restart from the cfg on purpose
After changes, restart the whole server once and read the console from the top. refresh and ensure are for iteration. Launch night uses a full boot, a backup from the ops guide, and a cfg you could hand to another developer without a narration.
The framework choice and the checklist live in how to start a server. The cfg is the page that makes that checklist true.