Hardening Your FiveM server.cfg
Your server.cfg is the front door to your FiveM server. A few directives set correctly keep it secure, performant, and easy to manage; a few set wrong invite trouble.
The essentials
Set endpoint_add_tcp/endpoint_add_udp for your port, sv_hostname for the browser name, sv_maxclients for slots, and sv_licenseKey with a free key from portal.cfx.re. The FiveM server.cfg Generator writes a fully commented, security-minded config for you.
OneSync and slots
Without OneSync a server tops out at 32 players. set onesync legacy goes to 64 and set onesync on to 2048, and on is also what modern frameworks expect. If txAdmin runs your server, set OneSync in Settings, FXServer instead: txAdmin passes it at launch and comments out any onesync line in server.cfg.
Your license key caps slots too. A free key allows 48; more needs a Cfx.re Element Club subscription on the account that owns the key, with Argentum allowing 64, Aurum 128 and Platinum 2048.
Secure RCON, keys, and permissions
Leave RCON off unless you really need it: no password means no RCON. If you do need it, write set rcon_password "long-random-value", since current servers only accept it with set in front, and never reuse that password. Keep your license key and any Steam web API key out of public repos. Grant staff powers with ACE permissions rather than blanket admin: build add_ace/add_principal lines with the FiveM ACE Permissions Generator.
Anti-cheat convars
sv_pureLevel 1 blocks modified game files while still allowing audio and known graphics mods, and set sv_filterRequestControl 1 stops players taking over vehicles other players are in. Both are safe first steps.
set sv_entityLockdown strict stops clients creating networked entities at all, and setr sv_stateBagStrictMode true lets only the server change state bags. They close bigger holes but break scripts that spawn or set state from the client, so test your resources before turning them on.
FiveM for GTAV Enhanced
FiveM for GTAV Enhanced has been in early access since July 2026, and its server.cfg differs. OneSync is always on, so there is no onesync line, and pure mode cannot be turned off. Only the latest game build runs, or sv_enforceGameBuild 1 for the base game, and sv_endpointprivacy is gone.
Voice moved from Mumble to a built-in voice server you start with voice_internal; setr sv_mumble true keeps older voice scripts working until they are ported. set sv_syncTickRate (1 to 120, default 60) trades CPU for lower latency. The server runs as cfx-server.exe, and Tebex escrowed resources do not run on Enhanced yet.
Load order
Resources start in the order they are ensured. Put frameworks and shared dependencies before the resources that rely on them, or you will chase startup errors that are really ordering problems.
FAQ
Does an old server.cfg work on FiveM for GTAV Enhanced?+
Mostly. Remove the onesync line and any older sv_enforceGameBuild pin (only the latest build, or 1 for the base game, runs), drop sv_endpointprivacy, and add voice_internal if you want voice chat. Lines Enhanced no longer uses, like onesync_enableBeyond, are ignored.
Why does txAdmin comment out my onesync line?+
txAdmin sets OneSync itself when it starts FXServer, from Settings, FXServer, OneSync, so it comments out any onesync line in server.cfg. Set it there instead.
Try the tools
All guides →FiveM server.cfg Generator
Build a fully commented, security-hardened server.cfg for FiveM, FiveM Enhanced or RedM, with admins and resources.
Launch tool →FiveM ACE Permissions Generator
Build add_ace and add_principal lines for FiveM server.cfg permissions.
Launch tool →fxmanifest.lua Generator
Build a FiveM/RedM resource manifest with the right fields and script blocks.
Launch tool →