Free tool

server.cfg Generator

Build a server.cfg with the endpoints, database line, default resources, framework start order and admin permissions already in the right places.

Free · Runs in your browser · Nothing is uploaded

Basics

Fill these in after downloading if you prefer. This page never sends them anywhere.

Database

Fill these in after downloading if you prefer. This page never sends them anywhere.

Framework

Folder names in [brackets] must match your resources folder.

Advanced

server.cfg

## Endpoints
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

## Database
set mysql_connection_string "mysql://root:@localhost:3306/fivem?charset=utf8mb4"

## Server info
sv_hostname "My FiveM Server"
sets sv_projectName "My Server"
sets sv_projectDesc "Serious roleplay"
sets tags "roleplay, economy"
sets locale "en-US"
sv_maxclients 48
sv_endpointprivacy true
sv_scriptHookAllowed 0
set onesync on
# load_server_icon logo.png
# Put a 96x96 PNG named logo.png next to server.cfg, then remove the # above.
sv_licenseKey "changeme"
# Optional: only needed for Steam. Get a key from steamcommunity.com/dev/apikey.
# set steam_webApiKey ""

## Default resources
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure hardcap

## Framework
# Folder names in [brackets] must match your resources folder.
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure [qb]
ensure [standalone]
ensure [voice]
ensure [defaultmaps]

## Permissions
add_ace group.admin command allow
add_ace group.admin command.quit deny
add_ace qbcore.god command allow

Warnings

  • Add your key from portal.cfx.re before starting.
  • The database password is empty. Add it before starting.

How to use

  1. Fill in the server name, project details and database connection.
  2. Pick your framework: ESX, QBCore or Qbox. The start order changes to match it.
  3. Add admins with the identifier from your server console. Use the Steam hex tool if you only have a SteamID64.
  4. Download server.cfg, drop it in the server folder, and add your license key and password if you left them out.

Questions

Where does server.cfg go?

In the main server folder, next to the resources folder. After you change it, restart the server from txAdmin or your console so the new settings load.

Why does start order matter?

A script that calls a framework export can only work after the framework is running. The generator puts oxmysql, ox_lib and the core first, then folder groups. Folder names in [brackets] must match the folders in your resources directory.

Where do I get the license key?

From portal.cfx.re, with the account that owns the server. The generator warns while the key is empty or still set to changeme. You can download the file first and fill the key in later.

Why is my admin line not working?

The identifier must match the one FiveM prints when the player joins, including the prefix (license:, steam:, discord: or fivem:). If a row was skipped, the warnings above the preview say which row and why.

Why is there a warning above 48 players?

More than 48 slots needs a Cfx.re subscription for the server. The file still builds, but the server will not accept the higher limit without it.

More free tools

Need a full server?

We build ESX, QBCore and Qbox servers, set up and tested.