FiveM server.cfg Generator
Build a complete, ready-to-run server.cfg for FiveM, FiveM for GTAV Enhanced or RedM. Every line is commented, the defaults are the safe ones, and only base resources that actually ship with the server get started. Fill in the form and copy or download. Everything runs in your browser, with no login.
- Free
- No sign-up
- No ads
Server identity
How your server appears in the browser. Blank optional fields are left out of the file.
Server listing
Optional extras for how the server looks in the server browser. Blank fields are left out.
Networking & OneSync
The endpoint port, player cap, sync mode and game build. Invalid numbers show an error and are skipped in the file.
Security
Sane defaults that beat a bare config: RCON off unless you set a password, IPs hidden, ScriptHook off.
Anti-cheat hardening
Optional. Each one blocks a common cheat, and the stricter ones can break scripts that rely on that behavior, so test before going live.
Resources
The base resources that ship with the FiveM server, emitted as ensure lines in load order. Add your own below.
Admins & ACE permissions
Each admin is added to group.admin, which is granted every command. Pick the identifier type and paste the value.
# #### ##### #### ##### ##### ### # #### ##### # # # # # # # # # # # # # # # ## # # # # # # ## # # ##### # # # #### # # # # # # # # # # # # # # # # # # ## # #### ##### #### ##### # # # ##### #### ##### # # # Generated with the Digital Den server.cfg generator - https://dgden.com/cfg # # ==== SERVER IDENTITY ==== # Name shown in the server browser. Supports ^0-^9 colour codes. sv_hostname "My FiveM Server" # Project name shown on the loading/info panel. sets sv_projectName "My FiveM Server" # Short project description shown next to the name. sets sv_projectDesc "A server built with Digital Den tools." # Locale controls date and number formatting in some resources. sets locale "en-US" # Tags help players find your server. Comma separated. sets tags "roleplay, economy, custom" # ==== NETWORKING ==== # Game endpoints. 0.0.0.0 binds every interface; normally only change the port. endpoint_add_tcp "0.0.0.0:30120" endpoint_add_udp "0.0.0.0:30120" # Maximum player slots: 32 without OneSync, 64 with legacy, 2048 with on. sv_maxclients 48 # ==== ONESYNC ==== # txAdmin sets OneSync when it starts the server and comments out any onesync # line in this file. Choose "on" in txAdmin: Settings, FXServer, OneSync. # ==== SECURITY ==== # Server license key. Generate one for free at https://portal.cfx.re # The server will not start until this is a real key (not "changeme"). sv_licenseKey "changeme" # Optional Steam Web API key from https://steamcommunity.com/dev/apikey # Enables the steam: identifier. Leave as "" if you do not use it. set steam_webApiKey "" # RCON is disabled (no rcon_password set). This is the safer default. # Only enable RCON if you genuinely need it, then use a long random password. # Hides player IP addresses from client-side resources and most logs. sv_endpointprivacy true # ScriptHookV / native trainers. Keep false on live servers, it is a cheat vector. sv_scriptHookAllowed false # ==== RESOURCES ==== # Use the chat resource bundled with the server. Turn off if you install a custom chat. set resources_useSystemChat true # Base resources start first, in load order. ensure starts a resource or restarts it. # Loads maps and the gametype that uses them ensure mapmanager # The chat box and chat message API ensure chat # Spawns players into the world ensure spawnmanager # Minimal freeroam gametype. Swap for your framework ensure basic-gamemode # Enforces the sv_maxclients player limit ensure hardcap # ==== Admins / ACE permissions ==== # No admins configured yet. Add identifiers above to grant ACE admin access.
Save this as server.cfg in your server data folder and replace changeme with your real license key. In txAdmin, open Settings, FXServer and point CFG File Path at the file, and set OneSync to on there.
What you get
Security-sane defaults. RCON stays disabled unless you set a password, sv_endpointprivacy is on to hide player IPs, and sv_scriptHookAllowed is off so trainers cannot attach. An optional strict identity check sets sv_authMaxVariance and sv_authMinTrust, and optional anti-cheat settings cover pure mode, entity lockdown, control requests and state bags.
Readable and grouped. Every section has a # ==== HEADER ==== and a comment on each non-obvious directive, so you can actually maintain the file six months later.
Only resources that exist. The base resources match the ones Cfx.re's own templates start for FiveM, FiveM Enhanced or RedM, in the same order, so the console is not full of "Couldn't find resource" errors. Admin ACE lines come last.
Tip: keep your real sv_licenseKey and any rcon_password out of public repos and screenshots. Treat server.cfg like a secret.
Key server.cfg directives
FXServer runs each line of server.cfg as a console command from top to bottom, so order matters: endpoints and core convars first, then your resources and admin permissions. These are the directives you will touch most.
| Directive | Purpose |
|---|---|
load_server_icon | Loads a 96x96 PNG from the server data folder as the server icon. |
sets banner_detail / banner_connecting | Banner images for your server’s page in the server browser and for the connecting screen. |
sets sv_appearAllowlisted | Shows a lock icon in the server browser, and sets sv_allowlistInstructions says how to get in. txAdmin sets both from its Whitelist settings. |
sv_master1 "" | Makes the server private: the Connect button in the server browser is disabled, but the server stays listed. |
endpoint_add_tcp / endpoint_add_udp | Bind the game port, e.g. "0.0.0.0:30120". Both TCP and UDP lines are required. |
sv_hostname | Server name shown in the server browser. Supports ^0–^9 colour codes. |
sv_maxclients | Player slot limit, 1–2048. Over 32 needs OneSync, over 64 needs onesync on, and over 48 needs an Element Club subscription on the license key’s account. |
set onesync | Sync mode: on (full server-side state awareness), legacy (compatibility mode for old scripts), or off (peer-to-peer, 32 slots). With txAdmin, set it in txAdmin instead. |
sv_enforceGameBuild | Lock players to a DLC build such as 3889 (The Kortz Center Heist) so newer vehicles, maps and clothing load, or 1 for the base game. Enhanced runs only the latest build or 1. RedM uses 1491. |
set sv_syncTickRate | Enhanced only: how often the sync thread runs, 1–120 times a second (default 60). Higher cuts latency and costs CPU. |
voice_internal | Enhanced only: starts the built-in voice server that replaced Mumble. setr sv_mumble true keeps old Mumble voice scripts working. |
set gamename rdr3 | Runs the server as RedM instead of FiveM. |
sv_licenseKey | License key from portal.cfx.re. The server will not start without a valid key. |
set steam_webApiKey | Optional Steam Web API key that enables the steam: player identifier. |
set rcon_password | Turns RCON on with this password. Leave it out to keep RCON off. Current servers need the set in front. |
sv_pureLevel | Blocks modified game files: 1 allows audio and known graphics mods, 2 blocks all of them. Always on in Enhanced. |
set sv_entityLockdown | Limits the entities clients can create: relaxed, strict, or full on Enhanced. |
set sv_filterRequestControl | Stops players taking control of entities others control, from 1 (occupied vehicles) to 4 (every request). |
setr sv_stateBagStrictMode | Lets only the server change entity and player state bags. |
add_ace / add_principal | Grant a group commands (add_ace group.admin command allow), then add an identifier to it (add_principal … group.admin). |
ensure / start | Load a resource. ensure starts it, restarting it first if it is already running; start just starts it once. |
FiveM server.cfg, explained
What is server.cfg in FiveM?+
server.cfg is the plain-text configuration file every FiveM (and RedM) server reads on startup. It sets your server name, network endpoints, player limit, OneSync mode, license key, security convars, admin permissions, and the list of resources to start. The server runs each line as a console command from top to bottom, so order matters: endpoints and core convars come first, then your resources.
How do I use the generated server.cfg?+
Copy or download the file, save it as server.cfg in your server data folder (next to the resources directory), then paste your real license key from portal.cfx.re over "changeme". With txAdmin, point Settings, FXServer, CFG File Path at the file. Without it, start FXServer with the file, for example FXServer.exe +exec server.cfg on Windows or ./run.sh +exec server.cfg on Linux. Everything in this tool runs in your browser, nothing is uploaded.
Does it work for FiveM for GTAV Enhanced?+
Yes. Pick FiveM Enhanced at the top. Enhanced, in early access since July 2026, always runs OneSync, supports only the latest game build (or 1 for the base game), keeps pure mode on, and replaced Mumble with a built-in voice server you start with voice_internal. The generator leaves out the lines Enhanced dropped, like onesync and sv_endpointprivacy, offers the new sv_syncTickRate, and starts only the base resources Cfx.re’s Enhanced recipe uses. The server runs as cfx-server.exe instead of FXServer.exe, and Tebex escrowed resources do not run on it yet.
How is this different from the server.cfg txAdmin sets up?+
txAdmin recipes give you a working starting file for a specific framework. This generator builds the file around your own choices instead: FiveM, FiveM Enhanced or RedM, a locked game build, OneSync mode, RCON left off unless you deliberately enable it, sv_endpointprivacy on to hide player IPs, sv_scriptHookAllowed off for live servers, an optional strict identity check, your admin ACE lines and your own resource list, with a comment on every line explaining what it does.
Why does txAdmin comment out the onesync line?+
txAdmin starts FXServer with OneSync already set from its own settings (Settings, FXServer, OneSync), so it comments out any onesync line it finds in server.cfg and warns you. Pick txAdmin at the top of this tool and the file leaves the line out and says where to set it. Running FXServer yourself? Pick Plain FXServer and the file gets set onesync on.
How do I make my server show as allowlisted or private?+
Tick the allowlist box to add sets sv_appearAllowlisted true, which puts a lock icon next to your server in the browser, plus sets sv_allowlistInstructions with how to get in. With txAdmin, set Allowlist Mode in Settings, Whitelist instead, since txAdmin manages those two convars. sv_master1 "" makes a server private: the Connect button is disabled, but the server stays in the list, so it cannot hide a server.
Should I put an RCON password in server.cfg?+
Usually no. RCON is an old remote-console protocol that sends traffic in the clear and is a common target for brute-force attacks, so the safest default is to leave rcon_password unset, which disables RCON entirely. This tool omits the line when you leave the field blank. If you truly need remote console access, set a long, random password and never reuse it anywhere else. Write it as set rcon_password "your-password", since current FXServer builds only accept it with set in front.
Which anti-cheat settings should I turn on?+
On FiveM Legacy, start with pure mode 1: it blocks modified game files but still allows audio and known graphics mods. Then add sv_filterRequestControl 1 so players cannot take over vehicles others are in. Entity lockdown and state bag strict mode stop more cheats, but they also break scripts that spawn entities or set state from the client, so turn them on only after testing your resources. Enhanced keeps pure mode on for everyone.
Do I need OneSync for more than 32 players?+
Yes. Without OneSync a server tops out at 32 slots. onesync legacy goes to 64 and onesync on to 2048. Your license key sets a limit too: a free key allows 48 slots, and more needs a Cfx.re Element Club subscription (Argentum 64, Aurum 128, Platinum 2048). This generator warns when your player count is above what your settings allow, so you do not ship slots that players cannot actually join.
Related tools
All tools →Learn how it works
📖Hardening Your FiveM server.cfg8-min guideMore in FiveM & RedM Tools.
Need custom FiveM or RedM development?
The studio behind this free tool builds custom bots, game servers and websites.