How to Configure the server.cfg File in FiveM
Learn how to properly set up your FiveM server’s core configuration, including server name, player slots, security keys, and resource loading.
Architecting Your Server Core
The server.cfg file is the most important file on your server.
It controls:
- What resources load
- How your server appears publicly
- Player limits and permissions
- Security and authentication
If this file is messy or incorrect, your server will:
- Fail to start
- Load resources incorrectly
- Appear unprofessional in the server list
A clean, well-structured server.cfg is essential for stability and growth.
Difficulty
Intermediate
Estimated Time
~10 minutes
Where to Find server.cfg
You can find it in your server’s root directory:
/server.cfg
Edit it using:
- Your hosting panel file manager
- Or SFTP/FTP access
Identity & Branding (First Impressions Matter)
This is what players see in the server browser. If this looks bad, fewer people will join.
Basic Server Info
sv_hostname "EUGAMEHOST RP | High Performance | Custom Assets"
sets sv_projectName "EUGAMEHOST Roleplay"
sets sv_projectDesc "A premium roleplay experience powered by EUGAMEHOST."
sets tags "roleplay, police, economy, qbcore"
sv_maxclients 48
What Each Setting Does
- sv_hostname → Your main server name (most visible)
- sv_projectName → Secondary title (used in newer UI)
- sv_projectDesc → Description players see before joining
- tags → Helps players find your server via search
- sv_maxclients → Max number of players allowed
Server Icon (Branding Boost)
load_server_icon logo.png
Requirements:
- File must be 96x96 pixels
- Must be a
.png - Placed in your server root folder
This makes your server instantly look more professional.
Authentication & Security (Required)
Without this, your server will not work publicly.
License Key (Mandatory)
sv_licenseKey "YOUR_LICENSE_KEY_HERE"
Get your key from:
???? https://keymaster.fivem.net/
Steam API Key (Recommended)
set steam_webApiKey "YOUR_STEAM_API_KEY"
Used for:
- Player identification
- Some frameworks and scripts
Resource Loading (The Most Important Section)
FiveM loads resources in order.
If you get the order wrong:
- Scripts will break
- Database won’t connect
- Features won’t work
Correct Load Order (Keep This Structure)
Follow this exact order to avoid problems:
1. System Essentials
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
These are core systems required for the server to function.
2. Database
ensure oxmysql
This must load before any script that uses a database.
If this fails → your entire server breaks.
3. Core Framework
ensure qb-core
Or:
ensure es_extended
This is your server’s foundation (economy, jobs, player data, etc.)
4. Voice System
ensure pma-voice
Handles all in-game voice communication.
5. Scripts & Features
ensure [scripts]
Includes:
- Jobs
- UI systems
- Admin tools
6. Assets (Cars, Maps, Clothing)
ensure [cars]
ensure [maps]
ensure [clothing]
Using bracket folders lets you load everything at once.
Example Clean server.cfg
# Identity
sv_hostname "EUGAMEHOST RP | High Performance"
sets sv_projectName "EUGAMEHOST Roleplay"
sets sv_projectDesc "Premium FiveM experience powered by EUGAMEHOST"
sets tags "roleplay, qbcore, police"
sv_maxclients 48
load_server_icon logo.png
# Security
sv_licenseKey "YOUR_KEY_HERE"
set steam_webApiKey "YOUR_STEAM_KEY"
# Core Systems
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
# Database
ensure oxmysql
# Framework
ensure qb-core
# Voice
ensure pma-voice
# Scripts & Assets
ensure [scripts]
ensure [cars]
ensure [maps]
ensure [clothing]
Common Mistakes to Avoid
- Putting resources in the wrong order
- Forgetting to add your license key
- Loading scripts before the database
- Not using category folders (
[cars],[scripts]) - Overloading server.cfg with hundreds of individual
ensurelines
Best Practices
Keep It Clean
Group resources logically. If it’s messy, you will struggle to scale.
Use Category Folders
Instead of:
ensure car1
ensure car2
ensure car3
Use:
ensure [cars]
Faster, cleaner, scalable.
Test After Changes
Every time you edit server.cfg:
- Restart server
- Check console for errors
- Join and test features
Don’t Guess — Read Errors
If something breaks, your console will tell you exactly why.
Ignoring logs is the fastest way to waste hours.
This file is the backbone of your server. Get this right early, and everything else becomes easier to build, scale, and maintain.
Host Your FiveM Server from £4.20/Month
Ultra-low latency. Instant setup. 30Tbps Anycast DDoS protection.
Everything you need to run a stable, secure RP server.
Start Your Server Today