Guide for server owners · 7 min read · updated Nov 12, 2026
server.cfg explained line by line
Short answer
server.cfg tells the server which ports to listen on, how many players it holds, its license key, whether OneSync is on, which game build to use, which resources to start and who is an admin. Lines starting with # are comments.
The lines in a FiveM server.cfg that every owner should understand: ports, slots, the license key, OneSync, the game build, resources and permissions.
Ports
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"The server listens on port 30120 for both TCP and UDP. Open both in your firewall.
Name and slots
sv_hostname "My City | Serious RP"
sets sv_projectName "My City"
sets sv_projectDesc "Serious roleplay, whitelisted"
sv_maxclients 48The project name and description show in the server browser.
License key
sv_licenseKey "your key here"Get it from the Cfx.re portal. Never post it in Discord or on GitHub.
OneSync
set onesync onNeeded for more than 32 players and by most modern scripts. See What OneSync is.
Game build
sv_enforceGameBuild 3258Forces a newer GTA V build, which unlocks newer cars, clothing and map areas. Players download it on first join.
Resources
ensure oxmysql
ensure ox_lib
ensure my_garageensure starts a resource. Order matters: start libraries before the scripts that use them.
Admins
add_ace group.admin command allow
add_principal identifier.fivem:123456 group.adminSee ACE permissions explained.
Next guideWhat OneSync is and when you need itServer owners, 4 min read