How To Configure Your FiveM Server

Learn how to configure your FiveM dedicated server using server.cfg.

FiveM server configuration is handled through the server.cfg file. Here is an overview of the key settings.

Using Startup Settings

Open the Startup Page

Log in to the XGamingServer Panel and select your FiveM server. In the sidebar, click Startup.

Adjust Settings

The Startup page provides fields for common settings including license key, server name, max players, and more.

Restart Your Server

After making changes, restart from the Console page.

Editing server.cfg

Open Files

In the sidebar, click Files and open server.cfg.

Edit the Configuration

Here is an example of common server.cfg settings:

# Server Identity
sv_hostname "My FiveM Server"
sv_projectName "My Server Project"
sv_projectDesc "A custom FiveM server"

# License Key
sv_licenseKey "your_license_key_here"

# Network Settings
sv_maxclients 32
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

# OneSync (improved player synchronization)
onesync on

# Security
sv_scriptHookAllowed 0

# Resources
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap

# Permissions
add_ace group.admin command allow
add_ace group.admin command.quit deny
add_principal identifier.steam:110000xxxxxxxxx group.admin

Save and Restart

Save the file and restart your server.

Key Settings Explained

SettingDescription
sv_hostnameServer name in the browser
sv_maxclientsMaximum player count
sv_licenseKeyYour cfx.re license key
onesyncEnables improved sync for higher player counts
sv_scriptHookAllowedAllow ScriptHook (0 = disabled, 1 = enabled)
ensureStarts a resource when the server boots

⚠️ Warning: Keep sv_scriptHookAllowed set to 0 unless you specifically need it. Enabling it allows clients with modding tools to potentially exploit your server.

📝 Note: The ensure command loads resources in order. Make sure dependencies are loaded before resources that require them.

How is this guide?

40% Off — Limited TimeGet your Fivem server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page