What a server.cfg actually is
When the FiveM artifacts start, they read one file: server.cfg. Everything the server knows about itself is in there — the name it advertises, the port it binds, the licence key that registers it with Cfx, how many slots it claims, and the list of resources it starts. There is no auto-discovery: a resource can sit in resources/ perfectly installed, with a valid manifest and every file in place, and if no line in server.cfg starts it, the server runs without it and says nothing at all.
The file is a sequence of console commands, executed top to bottom, exactly as if you had typed them into the server console in that order. That is the mental model worth keeping: not a configuration document the server reads as a whole, a script. Order is not cosmetic in a script.
Why load order decides whether a server boots
Resources start in the order the config lists them, and a resource that starts too early — before something it depends on — does not wait, retry or fail loudly. Put ox_inventory above ox_lib and the inventory comes up with a wall of attempt to index a nil value errors. Restart it by hand and it works, because by then ox_lib is running — so the server is fine for the session and breaks again at the next restart.
Ordering is also not something you can see: a list of ensure lines looks equally plausible in any sequence. So this tool reads each resource's fxmanifest.lua for its dependencies and provide entries, infers the implicit ones nobody declares, sorts what it can — and tells you what it cannot. A dependency cycle is named with both halves rather than silently dropped, and a block it could not order is headed NOT ORDERED.
What ensure actually does
Three commands start a resource and they are not interchangeable:
start— start it if it is not running; if it already is, this does nothing.ensure— start it, and restart it if it is already running. This is what makes a config safe toexecagain on a live server, and what almost every line should be.restart— restart something already started, and nothing at all if it is not.
Two lines that do nothing, silently
ensure [cars] starts every resource inside a folder literally named [cars], brackets and all, as a unit, in whatever order the server finds them — which throws away any order you worked out. And if no folder of that exact name exists, the line does nothing, logs nothing, and can sit in a config for years. This tool writes the members individually and notes the folder they came from in a comment.
The console also tokenises on whitespace, so a folder called my police pack turns ensure my police pack into a request for a resource called my. The server does not find one, never starts your pack, and logs nothing useful. FiveM's own resource scanner will not load a folder with a space in its name either, so the fix is always to rename the folder.
sv_enforceGameBuild and stale builds
sv_enforceGameBuild pins every connecting client to a GTA V build — 2802 is Los Santos Drug Wars, December 2022 — and the build decides which game content the client has loaded when it joins. Some resources need content or native behaviour from a specific era, and pinning is how you keep them working.
The failure mode is the quiet kind. A vehicle or map pack streaming assets added in a DLC newer than the pinned build does not error, does not warn, and does not appear in any log: the content is not there on the client, so the model fails to load and the owner spends an evening checking their stream folder. Nothing in the pack is wrong — the config pinned the server three years into the past. The dropdown here lists every build with the DLC that shipped it, and flags one three or more releases behind the latest.
OneSync, sv_maxclients, and the 32-player wall
sv_maxclients is what you advertise. What you get depends on OneSync: with set onesync off the server caps at 32 players regardless of the number in the config, and nothing announces the cap. So a config claiming 64 slots with OneSync off is a server that fills at 32 and an owner who cannot work out why. set onesync on lifts it; legacy is the older implementation and is still what some older frameworks expect.
This tool does not quietly rewrite your slot count: ask for 64 with OneSync off and the file says 64 while the report tells you the server will run 32 — silently correcting one of the two numbers is how the config and the reality end up disagreeing. Values the artifacts cannot accept are clamped, and every clamp is printed above the output and repeated as a comment inside the file itself.
The characters that break a config file
A hostname is the one field where users type whatever they like, and server.cfg is a format with sharp edges. A # outside quotes starts a comment. A ; separates two console commands. A backslash inside quotes escapes the next character — so a hostname ending in a backslash escapes its own closing quote and the rest of the file becomes one long string. There is no line continuation, so a newline pasted into a value ends the directive early.
Every value this tool writes is quoted, backslashes are doubled before quotes are escaped (the other order double-escapes what it just wrote), and the two characters the format cannot carry — newlines and control characters — are replaced with a space and reported rather than written and hoped for. Losing a character loudly is the only honest option when the file cannot hold it.
# What a generated config looks like # ── What the server browser shows ── sv_hostname "Bob's #1 \"Best\" Server" sets sv_projectName "Bob's RP" sets sv_projectDesc "Serious roleplay, 2016 onward" # ── Slots and state awareness ── sv_maxclients 64 set onesync on # ── Keys — treat this file as a secret once these are filled in ── sv_licenseKey "cfxk_..." # set steam_webApiKey "none" # rcon_password "" # ── Your resources ── # Each resource starts after everything it depends on. ensure oxmysql ensure ox_lib ensure es_extended ensure ox_inventory
Merging into a config you already run
A config maintained for two years has notes in it worth more than anything a generator writes: a comment explaining why one resource is pinned below another, an exec line pointing at a hand-maintained whitelist, a convar somebody added for a resource nobody else runs. So paste your current config in. The form fills itself in from it first — your hostname, your port, your slot count, your onesync setting. Change what you want changed; the directives you changed are rewritten in place, keeping any trailing comment and the keyword your file spells them with. The ensure block is refilled in dependency order, a duplicate start line is commented out rather than deleted, and everything else comes back byte for byte.
What the patch shows you, and what a merge cannot see
Every line that is different in the output is listed above it: what your file said, what the patch writes, one row each — including a directive added because your config did not have it at all. And one limit, stated plainly: a config that execs another file has half its load order somewhere this tool cannot read, and it says so rather than reporting on the half it can see as if that were the whole. The same goes for a resource installed outside the folder you dropped — it looks unstarted from here, and the report says that is what it is guessing.
Frequently asked questions
What is a server.cfg in FiveM?
server.cfg is the file the FiveM server artifacts read at boot. It sets the server's name, port, slot count and licence key, and — the part that matters most — it lists which resources start and in what order. The server has no other idea of what to run: a resource sitting in resources/ with no start line in server.cfg simply never loads.
Does the order of ensure lines matter?
Yes, and it is the single most common reason a working folder of resources produces a server that does not work. Resources start in the order server.cfg lists them. If ox_inventory starts before ox_lib, its calls into ox_lib's exports run before those exports exist, so the resource comes up broken — and restarting it by hand afterwards fixes it, which is why the fault survives a week of testing.
What is the difference between ensure, start and restart?
start starts a resource if it is not already running. ensure starts it, and restarts it if it is already running, which makes a config safe to exec twice. restart only restarts something already started. ensure is what almost every config should use.
What does sv_enforceGameBuild do?
It pins the server to a specific GTA V game build, which decides which DLC content the client loads. A resource that streams a vehicle or a map from a DLC newer than the pinned build loads nothing at all in game, with no error in any log. A stale sv_enforceGameBuild is one of the most confusing ways for a correct pack to do nothing.
Why does my server only allow 32 players?
Because OneSync is off. Without OneSync the server caps at 32 slots whatever sv_maxclients says, and nothing in the log mentions the cap — the number you advertise and the number you have are simply different. set onesync on lifts it.
Is this CFG generator safe to use with my licence key?
The whole tool runs in your browser tab. No folder, config or key is uploaded, and there is no server to upload it to. The form is saved in this browser's local storage so a refresh does not lose what you typed, including the licence key — there is a button to clear that if the machine is not yours.
Will it overwrite my existing server.cfg?
No. Paste your current config in and the output becomes a patch of it. The form fills itself in from whatever your config already sets, so a setting you do not touch is written back exactly as it stands; every line that does end up different is listed above the output, both what your file said and what the patch writes. Your comments, exec lines and custom convars come back byte for byte, and nothing is written to disk until you download the file yourself.
