Your FiveM server config is a single file, server.cfg, that FXServer runs line by line every time it starts. It sets the ports, the player slots, the license key, which resources start and in what order, who is admin, and whether the server is public, private or allowlisted. Below is where to find it, what every important line does, and how to set up a private or whitelisted FiveM server without breaking it.
Where is the FiveM server.cfg?
The server.cfg file sits in your server data folder, the one FXServer is started from with +exec server.cfg. In a vanilla install that’s server-data\server.cfg, kept apart from the server binaries. With txAdmin it’s in the data folder you picked during setup, and txAdmin has its own CFG editor that checks the file before saving.
- Vanilla Windows:
C:\FXServer\server-data\server.cfg(if you followed Cfx.re’s folder layout) - Vanilla Linux:
~/FXServer/server-data/server.cfg - txAdmin: the server data folder chosen in the setup wizard; edit it from txAdmin’s CFG editor
- On a host: usually the top level of the file manager. With GTA 5 server hosting on GameTeam you can edit it in the panel’s file manager or ask the copilot to make the change.
Can’t find one at all? A config called server.cfg.txt is the usual culprit when Windows hides file extensions.
How server.cfg works: set, sets, setr and exec
Each line is a console command. Most set a convar (configuration variable), and the prefix decides who can see it. Commands like ensure start resources in the order they appear, and exec pulls in another config file, so large servers often split their settings into several files.
| Prefix | What it does | Example |
|---|---|---|
set |
Server-only convar. Scripts on the server can read it; players can’t. | set mysql_connection_string "..." |
setr |
Replicated convar: client scripts can read it too, only the server can change it. | setr qb_locale "en" |
sets |
Server-info convar: shown on the server’s info page in the list and in /info.json. |
sets Discord "https://discord.gg/yourinvite" |
exec |
Runs another cfg file, relative to the data folder or inside a resource with @. |
exec @vMenu/config/permissions.cfg |
Some settings are read only at startup (sv_enforceGameBuild, onesync_enableInfinity, increase_pool_size). Changing them in a running server’s console does nothing; edit the file and restart.
A complete FiveM server config example
This is a clean starting server.cfg built from Cfx.re’s example and the default txAdmin templates. Framework servers add their own lines (a database connection string and their resources), but the skeleton stays the same.
# Network: where players connect. Change the port only if you need to.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
# Your key from the Cfx.re Portal (Servers > Registration Keys)
sv_licenseKey "your-key-here"
# Slots and sync. 48 is free; more needs an Element Club tier.
set onesync on
sv_maxclients 48
# Lock the GTA V DLC build (startup only)
sv_enforceGameBuild 3751
# Default resources, started in this order
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
# Security
sv_scriptHookAllowed 0
#set rcon_password "change-me"
# Show your Discord on the server info page
sets Discord "https://discord.gg/yourinvite"
# Admins
add_ace group.admin command allow
add_ace group.admin command.quit deny
add_principal identifier.fivem:1 group.admin
# Uncomment to hide the server's connect button while you build
#sv_master1 ""
FiveM server settings that matter
These are the lines worth knowing by heart. Values come from Cfx.re’s server command reference.
| Setting | What it does |
|---|---|
endpoint_add_tcp / endpoint_add_udp |
Address and port the server listens on. Default 0.0.0.0:30120; both protocols are needed. |
sv_licenseKey |
Your server registration key. Without it you get “no license key was specified”. |
sv_maxclients |
Slots, 1 to 2048. 32 or more needs OneSync; above 64 needs onesync on. Past 48 you need an Element Club tier, and the value doesn’t change on its own after subscribing. |
set onesync on |
Server-side state awareness. off falls back to GTA’s peer-to-peer model; legacy is a compatibility mode Cfx.re doesn’t recommend. |
onesync_population |
NPC traffic and pedestrians (default true). Some RP servers turn it off and spawn their own. |
sv_enforceGameBuild |
Which GTA V DLC build players load, e.g. 3407 (Agents of Sabotage), 3751 (A Safehouse in the Hills), 3889 (The Kortz Center Heist). Each build includes all earlier content. |
sv_scriptHookAllowed |
Allows Script Hook V clients. Default off; Cfx.re calls turning it on a security risk. |
sv_pureLevel |
Blocks modified client files. 1 allows audio and known graphics mods, 2 blocks all. |
sv_entityLockdown |
How strict the server is about entities clients create: inactive (default), relaxed, strict. |
sv_endpointPrivacy |
Hides player IP addresses from the server’s public reports. |
rcon_password |
Turns RCON on (it runs over UDP). Unset means RCON is off. |
steam_webApiKey |
Needed only if you want Steam identifiers for players. |
sv_tebexSecret |
Connects your Tebex store, the only payment route Cfx.re allows. |
sv_lan |
LAN-only: not listed and no license key check. For local testing. |
Server name, description and logo
Your FiveM server name no longer goes in server.cfg. Cfx.re deprecated sv_hostname, sets sv_projectName, sets sv_projectDesc and load_server_icon, and the default txAdmin templates now point you to portal.cfx.re/servers for the name, description, tags, locale, icon and banners. If your old config still sets them, the Portal values are the ones that count.
FiveM server name ideas (and the rules)
Good FiveM server names are short, easy to type into Discord search and clear about the vibe. Before you pick one, know the two rules that actually bite:
- No Rockstar property. Rockstar’s Creator Platform License Agreement says you may not use its trademarks, logos or elements of its games as part of a server’s name or branding. Keep “GTA”, “Rockstar” and the game’s own logos out of it.
- A name, not a list. Cfx.re asks for a name without tags or keyword lists; non-compliant names get cut off in the server list. Put “serious RP, economy, custom cars” in the tags and description instead.
Some patterns that work, to mix with words of your own:
- Invented place + type: a fictional town, county or district of your own, then “RP”, “Roleplay” or “Life”.
- Tone first: a word that sets expectations (Serious, Chill, Hardcore, Late Night) plus a short place word (Bay, Ridge, Harbor, County).
- Mode-led: for non-RP servers, lead with the mode: Drift, Street Racing, Zombie Survival, Police Sim.
- Your crew’s name: if the server grows out of an existing Discord, keep the name players already know.
Then search the FiveM server list and Discord for it before you commit; a name another big server already uses will send your players to them. Any website for the server also needs a contact email and a disclaimer that it isn’t approved, sponsored or endorsed by Rockstar Games.
How to make a FiveM private server
A FiveM private server is one strangers can’t join from the server list. Uncomment sv_master1 "" and the server appears as private with its connect button disabled; your group still joins by direct connect (F8 → connect address:30120). It doesn’t remove the server from the list, and it doesn’t stop anyone who has the address.
- Hide the connect button while you build:
sv_master1 "" - Keep it entirely local:
sv_lan true(LAN-only, no listing, no key check) - Let only approved players in: use a whitelist (next section). That’s the only option that actually checks who connects.
GTA V Online private server vs a FiveM private server
People searching for a GTA 5 Online private server usually want one of two things. GTA Online’s private sessions still run on Rockstar’s servers, with Rockstar’s missions, economy and rules; you can’t host GTA Online yourself. A FiveM private server is your own GTA V server: your map edits, your scripts, your rules, and only the people you let in. If what you want is your own world for friends, FiveM is the route.
How to whitelist a FiveM server
Whitelisting (Cfx.re now says “allowlisting”) means only approved players can connect. FiveM has two halves to it: a flag that makes your server look allowlisted in the server list, and a system that actually enforces it, which is usually txAdmin or your framework.
- Enforce it. txAdmin’s whitelist system has four modes: Discord member, Discord role, approved license, or admin-only. Its Discord bot also has a command to whitelist players, which suits servers that interview in Discord.
- Show it. Add these so players see the lock icon and know how to apply:
sets sv_appearAllowlisted true sets sv_allowlistInstructions "Apply in our Discord: https://discord.gg/yourinvite" - Restart and test with an account that isn’t on the list.
Whitelisted FiveM servers aren’t better or worse by default; Cfx.re’s own note says allowlisting only describes how access is controlled. It does keep you off the featured server list, which only picks servers anyone can join with one click.
Admin permissions in server.cfg
FiveM permissions use ACEs (access control entries) and principals. You give a group the right to run commands with add_ace, then put players into that group with add_principal and one of their identifiers.
add_ace group.admin command allow # admins can run every command
add_ace group.admin command.quit deny # ...except shutting the server down
add_principal identifier.fivem:1 group.admin
add_principal identifier.steam:110000112345678 group.admin
test_ace group.admin command.quit in the console tells you whether a permission resolves the way you expect. Resources with their own permission files, like vMenu, load them with exec.
ESX or QBCore: which framework config?
Neither is “better” in the abstract. Cfx.re lists ESX, ND, QBCore, Qbox and vRP and supports none of them directly. The practical choice is the scripts you want: many resources are written for one framework, while those tagged standalone run on any. In server.cfg both ESX and QBCore add a set mysql_connection_string line for the database, need onesync on, and must start their database resource and core (oxmysql, then es_extended or qb-core) before the scripts that depend on them.
F8 commands every FiveM player and admin should know
F8 opens the FiveM client console. These user commands work for everyone, on any server:
| Command | What it does |
|---|---|
connect <ip:port> |
Joins a server directly (also takes a cfx.re/join/... link) |
disconnect |
Leaves the server and returns to the main menu |
quit |
Closes FiveM immediately |
cl_drawfps true |
Shows an FPS counter |
cl_drawperf true |
Shows FPS, ping, packet loss, CPU and GPU use |
resmon true |
Resource monitor: CPU and memory per resource, the quickest way to spot a heavy script |
bind keyboard F9 "command" |
Binds a command to a key |
On txAdmin servers, admins type tx in F8 to open the in-game admin menu.
When a config change doesn’t work
- Nothing changed after editing: the server needs a restart, and startup-only settings ignore console changes entirely.
- Server shows as private: the
#in front ofsv_master1 ""was removed. - Can’t go past 48 slots: no Element Club tier on the key’s account, or
sv_maxclientswasn’t raised afterwards. - New name or icon not showing: those come from the Cfx.re Portal now, not from the file.
- A script fails on start: its
ensureline comes before something it depends on. Move it below the framework. - “No license key was specified”: the key line is missing, or FXServer wasn’t started with
+exec server.cfgfrom the right folder.
For the full install, ports and artifacts, see how to make a FiveM server; for adding resources safely, how to add mods to a FiveM server.
Skip the config: let the copilot edit server.cfg
Every change above is a line in a text file, and one wrong quote or out-of-order ensure can stop the city from starting. With GTA 5 server hosting on GameTeam you can still open server.cfg in the file manager, or just tell the AI copilot what you want: “set 48 slots, hide the server while we build and show our Discord on the server page”. It writes the lines, restarts the server and reads the console to confirm everything started. You pay per GB of RAM, from $0.49/GB a week, with no charge per slot.
FAQ
Where is the FiveM CFG file?
In the server data folder FXServer starts from, named server.cfg. On txAdmin it’s in the data folder chosen at setup and editable from txAdmin; on a host it’s in the file manager.
Can I change the server config while the server is running?
Many convars can be set from the server console, but the file is only read at startup, and some settings (like sv_enforceGameBuild) only apply after a restart. Edit the file, then restart.
Can a FiveM server have a password?
FiveM’s standard settings don’t include a join password. To limit who gets in, use an allowlist through txAdmin or your framework, and sv_master1 "" if you also want the connect button hidden.
Do server names have to be unique?
Not technically, but a name another server already uses sends your players to the wrong place. Search the server list first, and keep Rockstar’s trademarks out of it.
