iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
server.cfg is the startup configuration file that tells FXServer which network ports to open, how the server appears in the browser, how many players it can support, which resources to start, and who has administrative permission. It is loaded when you start FXServer with +exec server.cfg. The safest way to edit it is to work by function—networking, identity, capacity, resources, permissions, and security—rather than treating it as an unexplained list of lines.
This guide explains the settings used in a current FiveM deployment, shows a maintainable configuration layout, and separates game-server settings from txAdmin’s own panel settings.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Lifewit Chilled Condiment Caddy with Stainless Steel Spoons & Tongs, 2 Pcs | $39.99 | Buy on Amazon |
What server.cfg does and when it is loaded
FXServer accepts commands and convars from the server console, RCon, the command line, configuration files, and ACL-authorized resources. A convar is a configuration variable that resources can set or read, and that administrators can also inspect from the console or an RCon client. If a value contains spaces, enclose it in quotation marks.
On a Linux installation using the standard directory layout, the official startup form is:
#1 Best Overall
- Ultimate Freshness & Flavor: The condiment caddy’s lower compartment ingeniously holds ice cubes or crushed ice, actively keeping vegetables, sauces, or fruits succulent and fresh for hours. Each top compartment features a removable lid for easy access
- Safe, Stylish & Complete with Accessories: Crafted from sturdy, BPA-free PET plastic, our condiment organizer offers food safety and elegant aesthetics. The set includes 2 metal clips and 5 metal spoons for grabbing and scooping fruits, vegetables, and sauces. The crystal-clear design provides a seamless view of contents, perfect for beautifully presenting fruits, salads, or any treats. (Note: Avoid direct contact with hot food.)
- Modular Capacity for Every Need: Each individual lidded compartment 5.7"(14.4cm) × 3.8"(9.7cm) × 2.4"(6.2cm) holds 2.5 cups, ideal for single servings. The complete set includes 5 removable compartments fitting perfectly into the main tray 15.7"(40.6cm) × 6.2"(15.8cm) × 5.1"(13cm), offering ample total capacity
- Effortless Cleaning & Clear View: Constructed from transparent plastic, this garnish tray offers a clear view of stored food and ice. After use, it conveniently rinses clean with water. For thorough hygiene and longevity, HAND WASHING is highly recommended. (Important: Not dishwasher safe.)
- Versatility for Every Celebration: This fruit tray transforms into your go-to server for family gatherings, picnics, BBQs, and indoor/outdoor parties! Use it as a convenient hot dog/pizza toppings station, stylish bar garnish caddy, vegetable/fruit tray, or a complete taco bar serving set
cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg
The command must run from the directory containing the intended configuration, or you must provide the correct path. If another file is being loaded, you may be editing a configuration that FXServer never reads.
A practical file layout
Keep related settings together and place secrets where they are easy to identify. A typical order is:
- Network endpoints
- License and public identity
- OneSync and player capacity
- Game build
- Core and framework resources
- Permissions and ACL rules
- Security, RCon, and included files
The order is not merely cosmetic. Resources may depend on other resources being started first, and administrators troubleshoot more quickly when each functional group is visible.
Network endpoints: making the server reachable
These two lines bind the game server to a TCP and a UDP endpoint:
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
endpoint_add_tcp creates the TCP listener and endpoint_add_udp creates the UDP listener. Each requires a valid address and an unused port. The standard example uses port 30120; change it when your host assigns a different port or another process already uses it.
What the address means
0.0.0.0 listens on all available network interfaces. It is appropriate for most single-interface servers. Bind to a specific local address only when the machine has multiple interfaces and you intentionally want traffic on one of them.
Ports outside server.cfg
The lines do not open a port in your provider’s firewall, cloud security group, router, or operating-system firewall. Allow the selected TCP and UDP port in every network layer between players and FXServer. If a provider gives you an allocated port, use that value in both endpoint lines instead of assuming that 30120 is available.
A port conflict usually appears as an FXServer startup error. Check for another FXServer instance, a different game service, or a stale process before changing unrelated settings.
License and public server identity
License key
sv_licenseKey "YOUR_KEY"
Replace YOUR_KEY with the key issued through the Cfx.re portal. The key authenticates the server; it is not a player-facing name and should never be pasted into screenshots, support tickets, public repositories, or logs. If you rotate the key, update the active configuration and restart FXServer.
Name and project fields
sv_hostname "My FiveM Server"
sets sv_projectName "My Project"
sets sv_projectDesc "A short sentence about the community"
sv_hostname is the server-specific name shown to players. The sets lines publish project metadata, so use a stable project name and a concise description that explains what the server is. Keep quotation marks around values containing spaces.
Recommended Free Tools
Public versus LAN mode
sv_lan true
Setting sv_lan true makes the server LAN-only and skips public-listing and license checks. Use it for a private local network or development test. Remove the setting or set it appropriately for a public server; otherwise the server will not behave like a normally listed community server.
OneSync and player slots
Choose player capacity and synchronization mode together. The current command reference allows sv_maxClients values from 1 through 2048.
| Setting | Meaning | When it is required |
|---|---|---|
onesync off |
Disables OneSync state awareness and entity routing. | Only for servers whose scripts and intended capacity do not need OneSync. |
onesync legacy |
Compatibility mode with older synchronization behavior. | Existing deployments that specifically require it; it is not recommended for new deployments because of performance and graphical issues. |
onesync on |
Full state awareness and entity routing. | Required for capacities above 64 and generally the correct choice for modern, larger servers. |
For example:
set onesync on
sv_maxClients 128
Values from 32 upward require OneSync to be enabled in either on or legacy mode. Values above 64 require onesync on. A higher slot number does not create performance by itself: CPU headroom, memory, network capacity, resource efficiency, entity counts, and script design determine whether the server can actually sustain that population.
How to choose a capacity
- Decide the largest population your hardware and scripts can support reliably.
- Set
sv_maxClientsto that target, staying within the 1–2048 range. - Select the minimum synchronization mode required by that number and by your resources.
- Restart and monitor server time, resource warnings, network behavior, and player reports before increasing the limit again.
Game build selection
sv_enforceGameBuild BUILD_NUMBER
sv_enforceGameBuild selects the GTA game build that the server requires. This matters when a resource depends on DLC assets, natives, or other content introduced in a newer build. Use a build supported by the actual resources and FXServer artifact you run. Do not copy a number from an unrelated template: build compatibility changes, so verify the current Cfx.re command reference and each resource’s documentation before enforcing one.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11If clients or resources report missing content after you change this setting, first confirm that the server artifact, client build expectations, and resource requirements all target the same game-build generation.
Starting resources with ensure
The ensure command starts a resource if it is stopped and restarts it when a resource restart command is issued. A standard vanilla configuration includes:
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
ensure rconlog
These are the default resources shown in the official setup, not a mandatory list for every production server. Frameworks and custom communities normally add their own resources and may remove components they do not use.
Load order and dependencies
Start foundational resources before the resources that consume them. A useful sequence is:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →- Vanilla core resources
- Framework and shared libraries
- Database or service adapters
- Maps, vehicles, and clothing packs
- Gameplay scripts and jobs
- Optional utilities and administration resources
Review each resource’s manifest and documentation for dependency names. The folder name used in ensure must match the resource directory, and that directory must contain a valid manifest. txAdmin recipes can add their own ensure entries, so inspect the recipe as well as your hand-edited file when diagnosing duplicate starts or missing dependencies.
Common resource failures
- “Could not find resource”: the folder is in the wrong directory or the name in
ensureis wrong. - Dependency errors: a required library is missing or appears later in the file.
- Repeated restarts: a script is crashing during startup; read its console error rather than adding more
ensurelines. - Works manually but not at boot: the resource may depend on another resource that has not started yet.
Permissions and ACE access control
FiveM’s ACE system grants permissions to principals and groups. A common setup pattern is:
add_principal identifier.fivem:1 group.admin
add_ace group.admin command allow
The identifier must match the administrator’s actual identifier, and the group name must be used consistently everywhere. The broad command allow rule gives that group permission to run commands, so limit membership to trusted administrators. For a smaller attack surface, grant only the command permissions a role needs instead of allowing every command.
Free tools Windows power users keep installed
One-click scans. No signup required.
Checking an ACL problem
- Confirm the player’s identifier appears exactly as written, including its prefix.
- Confirm the principal is assigned to the intended group.
- Check that the ACE rule names the same group and command.
- Reconnect or restart the relevant resource after changing permissions.
Do not treat a server-side script’s menu visibility as proof of authorization. The command or event must still be protected by an ACE check or equivalent server-side permission check.
Security and privacy settings
ScriptHook allowance
sv_scriptHookAllowed 0
The default example disables ScriptHook-based plugins. This setting controls the server’s allowance for those plugins, but it cannot guarantee that external plugins cannot be used. Keep it disabled unless a specific, trusted use case requires otherwise.
Endpoint privacy
sv_endpointPrivacy true
When true, this setting hides player IP addresses from public reports generated by the server. It is a privacy measure for reports and does not replace secure host administration, access control, or responsible log handling.
Protect every secret
- Keep
sv_licenseKeyprivate. - Protect database passwords, API tokens, and webhook credentials.
- Use file permissions or provider secret settings rather than committing secrets to a public repository.
- Redact secrets before sharing a configuration in a support ticket.
- Do not publish a complete server.cfg when a smaller, redacted excerpt will show the problem.
RCon and split configuration files
RCon
RCon provides remote console access and therefore deserves the same protection as an administrator account. The official example leaves its password line commented until an administrator intentionally enables it. If you need RCon, use a long unique secret, restrict network exposure to trusted addresses where your host allows it, and rotate the secret if it appears in a log or shared file. If you do not need remote console access, leave it disabled.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesIncludes with exec
exec permissions.cfg
exec resources.cfg
exec another-file.cfg loads commands from another configuration file. Splitting a large setup can make permissions and resource lists easier to review, but included files are part of the effective configuration. Keep them protected, use clear names, and inspect every included file when troubleshooting. A secret hidden in a secondary file is still exposed if that file is published.
What belongs in txAdmin instead
txAdmin is a web administration panel bundled with FXServer builds above 2524. It provides a CFG editor and validator, start/stop/restart controls, moderation tools, and management pages.
| Configuration area | Where to manage it |
|---|---|
| Game settings, resources, and network endpoints | server.cfg or files loaded with exec |
| Panel staff, moderation, and restart schedules | txAdmin’s settings and management pages |
| Current txAdmin host configuration | txAdmin’s host environment configuration, including TXHOST_* variables |
Do not add deprecated panel convars such as txAdminPort, txAdminInterface, or txDataPath to a new server.cfg without checking the release documentation for the txAdmin version you run. The current v8 host configuration uses TXHOST_* environment variables. The panel can validate a game configuration, but it does not move game resources or endpoints out of server.cfg.
A safe editing and startup checklist
- Back up the active files. Save the current server.cfg and every file loaded with
exec. - Confirm the launch path. Start from the directory containing the intended file and include
+exec server.cfg. - Validate endpoints. Check TCP and UDP syntax, provider-assigned ports, firewall rules, and port conflicts.
- Check identity. Confirm the hostname and project fields, and ensure LAN mode is not enabled accidentally.
- Verify authentication. Confirm the license key is present while keeping it redacted in shared output.
- Match OneSync to capacity. Check the slot threshold and synchronization mode before testing player joins.
- Review resources. Confirm folder names, manifests, dependencies, and startup order.
- Audit ACL rules. Remove unused principals and avoid broad administrator permissions for untrusted users.
- Use txAdmin’s validator. Correct syntax errors, then restart and read the first relevant console error rather than the last cascade of messages.
Troubleshooting by symptom
FXServer starts, but nobody can connect
Confirm that both endpoint lines use valid, available ports; that the provider and operating-system firewall allow those ports; and that players are using the externally reachable address and port. A server bound to a private interface or a port blocked upstream will appear healthy locally but remain unreachable.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The server is not in the browser
Check sv_hostname, sv_projectName, and sv_projectDesc. Make sure sv_lan is not true, endpoints are reachable, the license key is valid, and startup logs contain no endpoint or authentication error.
Players cannot join above a low limit
Inspect sv_maxClients and onesync together. A value of 32 or more needs OneSync; a value above 64 needs onesync on. Then confirm the server has enough CPU, memory, network capacity, and script headroom for the requested population.
A resource does not start
Check the exact folder name, the presence of its manifest, required dependencies, and the order of its ensure line. If txAdmin created the server from a recipe, inspect recipe entries for a second copy or a missing dependency.
Configuration changes seem ignored
Verify that you edited the file loaded by the startup command, including any exec files. Restart after changes that are read only at startup, and check the console for a syntax error that caused later lines to be skipped or rejected.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

