server.cfg, explaining what each setting does and how to configure it for your server.
Understanding server.cfg
Theserver.cfg file is the main configuration file for your FiveM server. It:
- Sets server identity (name, license, tags)
- Configures database connections
- Defines server resources to load
- Sets gameplay variables
- Configures admin permissions
The server.cfg file is located in your server root directory. Changes require a server restart to take effect.
Essential Configuration
These settings are required for the server to start.License & Identity
server.cfg
1
Get FiveM License
Generate at Cfx.re Portal
2
Get Steam API Key
Generate at steamcommunity.com/dev/apikey
3
Replace placeholders
Replace
YOUR_LICENSE_KEY_HERE and YOUR_STEAM_API_KEY with your actual keysNetwork Configuration
server.cfg
0.0.0.0= Listen on all network interfaces30120= Default FiveM port (change if needed)- Both TCP and UDP are required
- Adjust
sv_maxclientsbased on your server capacity - Consider: 8GB RAM supports ~48 players, 16GB supports ~80+
- More players = more database load and network bandwidth
Using a different port
Using a different port
If port 30120 is taken:Don’t forget to:
- Open the new port in firewall
- Update port forwarding
- Players connect with:
connect your_ip:30121
Database Configuration
server.cfg
mongodb_auth_url- Connection string for authentication databasemongodb_auth_database- Database name for auth (default:auth)mongodb_game_url- Connection string for game datamongodb_game_database- Database name for game data (default:fivem)
mysql_connection_string- Full connection URL with credentialsmysql_slow_query_warning- Warn about queries taking longer than X msmysql_ui- Enable web UI for database inspection
Environment & Mode
server.cfg
Discord Webhooks
Configure Discord webhooks for server logging:server.cfg
admin_webhook
admin_webhook
Logs admin actions:
- Noclip usage
- Teleports
- Give item commands
- Player kicks/bans
connection_webhook
connection_webhook
Logs player connections:
- Join events with identifiers
- Leave events
- Connection failures
log_webhook
log_webhook
General server logs:
- Resource starts/stops
- Database events
- System messages
kill_webhook
kill_webhook
Logs player deaths/kills:
- Killer and victim info
- Weapon used
- Death location
pwnzor_webhook
pwnzor_webhook
Anti-cheat detections:
- Suspicious activity
- Detected cheats
- Automated bans
error_webhook
error_webhook
Server errors:
- Lua errors
- Database errors
- Critical failures
1
Open Discord Server Settings
In your Discord server, go to Server Settings > Integrations
2
Create Webhooks
Click “Create Webhook” or “Webhooks” > “New Webhook”
3
Configure Webhook
- Name it (e.g., “Mythic Logs”)
- Select channel
- Copy webhook URL
4
Add to server.cfg
Paste URL in appropriate webhook setting
API Configuration
server.cfg
- Connects to external Mythic web panel (if available)
- Used for whitelist management, bans, server stats
- Optional - leave as default if not using
Server Listing
server.cfg
sv_master1 ""= Hidden from public server list (recommended during setup)- Remove or comment out to appear in server browser
tags= Searchable tags in server browsersv_projectName= Name shown in server listsv_projectDesc= Description shown in server list
Game Build & Security
server.cfg
3095= Current recommended build for Mythic Framework- Ensures all players use compatible game version
- Update this if framework requires newer build
sv_endpointPrivacy true= Hides server IP from clientsv_scriptHookAllowed 0= Blocks Script Hook V (anti-cheat)
Voice Configuration
server.cfg
voice_useNativeAudio= Use FiveM’s built-in voice systemvoice_useSendingRangeOnly= Optimize bandwidth by limiting range
Mythic Framework includes voice integration. These settings optimize voice chat performance.
ACE Permissions
server.cfg
server.cfg
1
Start the server
Start your server (even if it has errors)
2
Join the server
Connect with FiveM client
3
Check console
In server console, type:
status4
Find your identifiers
Look for your name in the output, copy your identifiers
5
Add to server.cfg
Add
add_principal identifier.TYPE:ID group.admin to server.cfgServer Branding
server.cfg
- Image URL (must be HTTPS)
- Recommended size: 1920x1080
- Supported formats: PNG, JPG
- File:
logo96.pngin server root - Size: 96x96 pixels
- Format: PNG
Resource Loading
server.cfg
The actual resource loading is done in
configs/resources.cfg. This keeps server.cfg cleaner and easier to manage.Network & Performance Tuning
server.cfg
net_tcpConnLimit= Max TCP connections (increase for 48+ players)onesync= Not needed for Mythic (uses custom sync)profile_skfx= Performance profiling (0 = off)
Complete Example Configuration
Here’s a complete, production-ready server.cfg:View Complete server.cfg Example
View Complete server.cfg Example
server.cfg
Configuration Checklist
Before starting your server, verify:1
License keys configured
- FiveM license key added
- Steam Web API key added
2
Database strings updated
- MongoDB connection strings correct
- MySQL connection string correct
- Passwords changed from defaults
3
Admin permissions added
- At least one admin identifier added
- Identifiers are correct (tested via
statuscommand)
4
Server identity set
- Hostname customized
- Project name/description set
- Tags configured
5
Optional settings
- Discord webhooks configured (optional but recommended)
- Branding/logos added (optional)
- Environment set correctly (dev/prod)
Next Steps
Configuration complete! Now start your server:First Start
Start your Mythic Framework server for the first time
Troubleshooting
Common issues and solutions