Free tool

FiveM server.cfg generator

Build a clean server.cfg for your FiveM server in a minute: ESX, QBCore, Qbox or standalone, with database, admin rights and voice settings.

Framework
Database

Shown in the Databases tab of the game panel. The host is filled in for you.

server.cfg
# server.cfg made with the EliteStarHosting generator
# https://elitestarhosting.com/tools/fivem-server-cfg-generator

## Network
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_endpointprivacy true

## Server
# Name, tags, banner and icon are set in the Cfx.re Portal (portal.cfx.re), no longer here.
sv_maxclients 48
sv_licenseKey "changeme"
set steam_webApiKey "none"
sv_scriptHookAllowed 0
sv_enforceGameBuild 3258

# OneSync (needed above 48 slots): set it in txAdmin, which manages it.
# set onesync on

## Database (oxmysql)
set mysql_connection_string "mysql://username:[email protected]:3306/database?charset=utf8mb4"

## Voice (pma-voice)
setr voice_useNativeAudio true
setr voice_useSendingRangeOnly true
setr voice_defaultCycle "GRAVE"

## Resources (QBCore), started in this order
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure [qb]
ensure [standalone]
ensure pma-voice
ensure [defaultmaps]

## Admins
add_ace group.admin command allow
add_ace group.admin command.quit deny
# add_principal identifier.fivem:1234567 group.admin

Everything is generated in your browser: nothing you type is sent to us.

What is the server.cfg?

The server.cfg is the main configuration file of every FiveM server. It sets the port, the number of slots, your license key, the database connection and which resources start, in which order. A resource that is not started with ensure in the server.cfg does not run, and starting resources in the wrong order is one of the most common reasons a server does not work.

Server name, tags and banner

Since October 2026 the name, tags, banner and icon your server shows in the FiveM server list are set in the Cfx.re Portal, not in the server.cfg. That is why the generator leaves out sv_hostname and the tags. Set them at portal.cfx.re after your server is online.

OneSync and txAdmin

More than 48 slots needs OneSync. If your server runs with txAdmin, as it does with us, set OneSync in txAdmin's settings: txAdmin manages it and comments out onesync lines in the server.cfg. The generator therefore only adds OneSync as a comment.

FAQ

Questions about the FiveM server.cfg

Still have a question? Join our Discord for support!

Where do I put the server.cfg?
Is my license key sent anywhere?
Which database details do I fill in?
Why does my server not start after changing the server.cfg?

Looking for a FiveM server?

txAdmin, a MySQL database and DDoS protection included, on Ryzen 9 9950X hardware in the Netherlands.