FiveM server.cfg Explained (2026): Every Line and Setting

Short answer: server.cfg is the plain-text file FXServer runs when it starts. It binds the network endpoints (port 30120 over TCP and UDP by default), starts your resources with ensure in dependency order, sets the name, tags and language the server list shows, switches on OneSync, caps the player slots with sv_maxclients (48 without an Element Club subscription), picks the game build and holds your license key and permissions. Below is the official example from Cfx.re explained line by line, followed by the settings most servers add, how txAdmin changes the picture and the mistakes that stop a server from starting. Checked against the Cfx.re documentation on 20 October 2026.

Want your own FiveM server? At HostValues from €5.60 per month, online within minutes. View plans →

The official example server.cfg

The vanilla setup guide from Cfx.re ships this example (comments shortened):

endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
ensure rconlog

sv_scriptHookAllowed 0
#set rcon_password ""
sets tags "default"
sets locale "root-AQ"
#sets banner_detail "https://url.to/image.png"
#sets banner_connecting "https://url.to/image.png"
sv_hostname "FXServer, but unconfigured"
sets sv_projectName "My FXServer Project"
sets sv_projectDesc "Default FXServer requiring configuration"
#sv_enforceGameBuild 2802
#exec server_internal.cfg
#load_server_icon myLogo.png
set temp_convar "hey world!"
#sv_master1 ""

add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_principal identifier.fivem:1 group.admin

set onesync on
sv_maxclients 48
set steam_webApiKey ""
sv_licenseKey changeme

Lines starting with # are comments, and a # after a command starts a comment too. FXServer reads the file from top to bottom, so order matters: a resource can only use resources that were started before it, and a setting that appears twice keeps the value it got last.

Endpoints: the port players connect to

endpoint_add_tcp and endpoint_add_udp bind the server to an IP address and port. FiveM needs both protocols on the same port, and 30120 is the default. Keep 0.0.0.0 unless the machine has several network interfaces and you need one in particular. On a hosted server the port is assigned to you: on HostValues it is the port shown next to the IP address in the game panel, and both endpoint lines must use it. If players time out while the console looks healthy, a port mismatch is the first thing to check.

Resources: ensure, start and load order

ensure name starts a resource, or restarts it if it already runs, and it also accepts a category folder such as ensure [standalone]. start only starts a resource that is stopped. The seven default resources in the example are enough for an empty freeroam server; a roleplay framework replaces several of them. Whatever you run, start dependencies first: the database connector and shared libraries, then the framework, then the scripts that use it.

# database connector and shared library first
ensure oxmysql
ensure ox_lib
# then the framework
ensure es_extended
# then everything that depends on it
ensure [jobs]
ensure [standalone]

Long configurations are easier to manage in parts. exec resources.cfg runs another file relative to the server data folder, and exec @vMenu/config/permissions.cfg runs one from inside a resource. Which scripts are worth adding in the first place is covered in our guide to the best FiveM scripts and resources.

set, setr and sets: three kinds of convars

A convar is a configuration variable that scripts and the console can read. The command you use decides who can see it:

CommandWho can read itUse it for
setserver scripts onlyprivate settings such as the database connection string and API keys
setrserver and client scripts; only the server can change itsettings your client scripts need
setseveryone: the server list, the connect screen and the public info.jsonproject name, description, tags, locale, a Discord link

Never put a password or key in a sets line. Server information convars are exposed at http://your-server-ip:port/info.json, where anyone can read them.

Server list: name, description, tags, language and icon

  • sets sv_projectName and sets sv_projectDesc are what players see in the server list. Cfx.re asks for a name, not a list of keywords or tags; names that do not comply are cut off. Write the description as a sentence.
  • sv_hostname is the server-specific host name. The example notes that it is not usually shown in listings, so put your effort into the project name.
  • sets tags takes a comma-separated list such as "roleplay, economy, serious".
  • sets locale must be a real language code like "en-GB", "de-DE" or "pt-BR". The placeholder root-AQ is meant to be replaced.
  • load_server_icon loads a 96x96 PNG as the server icon; sets banner_detail and sets banner_connecting take image URLs for the info and connecting screens.
  • sv_master1 "" marks the server as private: the connect button in the server browser is disabled. It does not remove the server from the master list.

OneSync and player slots

set onesync on gives the server full state awareness: it tracks players, vehicles and NPCs and decides which client gets which entity. legacy is a compatibility mode that Cfx.re does not recommend, and off leaves the server as a relay for the old peer-to-peer model. OneSync Infinity is on by default (onesync_enableInfinity) and is needed for large player counts; like the game build it can only be set at startup. onesync_population is true by default and is required for NPCs to spawn.

sv_maxclients accepts 1 to 2048. From 32 slots it requires OneSync on or legacy, above 64 OneSync on. Whether you may use those slots depends on your Cfx.re subscription:

SubscriptionPrice on fivem.netSlots
nonefreeup to 48
Element Club Argentum$15 per month plus VATup to 64
Element Club Aurum$25 per month plus VATup to 128 with OneSync Infinity
Element Club Platinum$50 per month plus VATup to 2048 with OneSync Infinity

Game build: sv_enforceGameBuild

This setting picks the GTA V game build your players load, and with it the DLC content your scripts and maps can use. Every build includes everything from the builds before it. It can only be set at startup. The most recent builds in the Cfx.re list:

BuildAliasUpdate
3095mp2023_02The Chop Shop
3258mp2024_01Bottom Dollar Bounties
3407mp2024_02Agents of Sabotage
3570mp2025_01Money Fronts
3751mp2025_02A Safehouse in the Hills
3889mp2026_01The Kortz Center Heist

Do not confuse the game build with the server build (the FXServer artifacts). Since 15 October 2026 players can no longer connect to servers on an artifact build older than 35245, whatever game build you enforce.

Security settings worth setting

  • sv_scriptHookAllowed 0 keeps Script Hook V clients out. Cfx.re does not recommend allowing them.
  • sv_pureLevel 1 blocks modified client files except audio files and known graphics mods; level 2 blocks all modified client files.
  • sv_endpointPrivacy true hides player IP addresses from the public reports the server outputs.
  • sv_enableNetworkedSounds false stops clients from routing networked sound events through the server, which the documentation notes are commonly abused. Leave it on only if a script needs it.
  • rcon_password: if it is not set, RCON is disabled. FXServer RCON runs over UDP. With txAdmin or a panel console you rarely need it, so leaving it unset is the safer default.

Permissions with ACE

add_ace principal object allow grants a permission and deny takes it away; add_principal child parent makes one principal inherit from another. The example line add_principal identifier.fivem:1 group.admin is a placeholder: replace it with your own identifier, for example identifier.license:..., identifier.fivem:... or identifier.discord:.... txAdmin keeps its own admin accounts in txData/admins.json, separate from these ACE rules.

License key and Steam key

sv_licenseKey holds the free key you create in the Cfx Portal (portal.cfx.re); the example value changeme will not authenticate. steam_webApiKey is only needed when you want Steam identifiers. Keep both out of public repositories.

On a HostValues server you enter the license key in the game panel, and the start command passes it to FXServer before server.cfg runs. A leftover sv_licenseKey changeme line in server.cfg runs afterwards and overrides your key, which shows up as "Could not authenticate server license key". Remove that line, or put your real key in it.

server.cfg when txAdmin runs the server

When txAdmin is enabled, FXServer starts without +exec server.cfg and txAdmin runs the configuration of its own server profile instead. A recipe from the txAdmin deployer writes that file, including sv_licenseKey, into the profile folder under txData. Two consequences: edit that file (txAdmin's CFG Editor opens it in the browser), not a server.cfg somewhere else, and check its endpoint lines, because recipes usually write the default port 30120. On a hosted server change both lines to the port from your panel. Setting up txAdmin itself is explained in our txAdmin setup guide.

Common errors and what they mean

  • "Failed to start resource" and no resources found: the server was started from the wrong folder. Start it from the server data folder that contains resources.
  • Nothing starts and players get "timed out": per the Cfx.re docs the usual cause is a missing +exec server.cfg; on a hosted server also check the endpoint port.
  • "no license key was specified" or "Could not authenticate": one of the two problems above, an empty key, or a placeholder line that overrides the key from the panel.
  • A resource complains about a missing export or dependency: it starts before the resource it needs. Move its ensure line down.
  • oxmysql reports "Access denied" with the right password: oxmysql passes %-encoded characters in a mysql:// URL through literally. Use the user=...;password=...;host=...;port=3306;database=... form with the raw password instead.

A cleaned-up starting template

endpoint_add_tcp "0.0.0.0:30120"   # use the port from your panel
endpoint_add_udp "0.0.0.0:30120"

sv_hostname "My FiveM Server"
sets sv_projectName "My Roleplay Community"
sets sv_projectDesc "Serious roleplay with an EU evening schedule"
sets tags "roleplay, economy, serious"
sets locale "en-GB"
load_server_icon logo.png

set onesync on
sv_maxclients 48
# sv_enforceGameBuild 3407   # only if your scripts or maps need it

sv_scriptHookAllowed 0
sv_endpointPrivacy true
sv_pureLevel 1

set mysql_connection_string "user=fivem;password=YOURPASSWORD;host=YOURHOST;port=3306;database=fivem"

exec resources.cfg
exec permissions.cfg

sv_licenseKey "YOUR-KEY-FROM-PORTAL.CFX.RE"

Restart the server after changing server.cfg: the file is read at startup, and some settings, such as the game build and OneSync Infinity, can only be set then. Prefer filling in a form? Our free FiveM server.cfg generator builds a starting file you can paste into the File managers tab.

At a glance

  • Default port: 30120, TCP and UDP on the same port. The txAdmin web panel listens on TCP 40120 by default.
  • Slots: up to 48 without a subscription, with OneSync Infinity. Element Club Argentum allows 64, Aurum 128 and Platinum 2048.
  • Required: a free license key from portal.cfx.re and, since 15 October 2026, server artifacts on build 35245 or newer.
  • Load order: database connector and shared libraries first, then the framework, then the scripts that use it.
  • FiveM server at HostValues: from €5.60 per month with VAT included (Garbage Man, 4GB RAM, small groups of up to around 16 players); Bus Driver (8GB, €11.20) for 32 to 48 players with a framework; MySQL database and txAdmin included, DDoS protection, set up automatically after payment, cancellable monthly.

Your FiveM server at HostValues

On a HostValues FiveM server you edit server.cfg in the File managers tab or over SFTP (the login details are under Settings), create the database under Databases and import SQL with phpMyAdmin; txAdmin is included. Plans start at €5.60 per month with VAT included for Garbage Man (4GB RAM, suitable for small groups of up to around 16 players), Bus Driver (8GB, €11.20) handles 32 to 48 players with a framework, and Cab Driver (16GB, €22.40) and Boss (20GB, €28.00) are made for large communities. All plans are cancellable monthly, are set up automatically after payment and include DDoS protection. Support is available every day from 10:00 to 22:00 by ticket and on Discord.

Frequently asked questions

Where is the FiveM server.cfg file?

In the server data folder, next to the resources folder; on a vanilla setup you start FXServer from that folder with +exec server.cfg. When txAdmin runs the server, the file that counts is the server.cfg in the folder of your txAdmin server profile under txData.

What is the difference between ensure and start?

start only starts a resource that is stopped. ensure starts it if it is not running and restarts it if it is, which is why server.cfg files almost always use ensure.

How many slots can a FiveM server have?

Up to 48 without a subscription, with OneSync Infinity. Element Club Argentum raises that to 64, Aurum to 128 and Platinum to 2048 with OneSync Infinity. Above 32 slots OneSync must be on or legacy, above 64 it must be on.

Do I have to restart the server after editing server.cfg?

Yes. FXServer reads server.cfg when it starts, and settings such as sv_enforceGameBuild and onesync_enableInfinity cannot be changed while it runs.

Get your own FiveM server

From €5.60 per month. Online within minutes, cancel monthly, DDoS protection included.

View plans Order now

New to HostValues? Use code WELKOM10 for 10% off your first order.


Still stuck? Open a support ticket and our team will help you out.

Back to the blog