The server.cfg file is the heart of your FiveM server configuration. This guide breaks down every setting and explains how to configure your Mythic Framework server for optimal performance and security.
File Location
MythicFramework/
└── server.cfg
Basic Settings
Server Identity
# Server name as it appears in the server browser
sv_hostname "^5Mythic ^7Roleplay Server"
# Tags for server browser filtering
sets tags "roleplay, mythic, economy, jobs"
# Server description
sets sv_projectName "Mythic Framework"
sets sv_projectDesc "Professional FiveM Roleplay Server"
# Server language
sets locale "en-US"
Purpose: Display name in the FiveM server browserFormat: Supports FiveM color codes (^0-^9)Example: sv_hostname "^5Mythic ^7Roleplay ^3[EU]"
Best Practices:
Keep it concise (under 50 characters)
Use color codes sparingly for readability
Include region if applicable [EU], [NA], [OCE]
Purpose: Server language/regionCommon Values:
en-US - English (United States)
en-GB - English (United Kingdom)
de-DE - German
fr-FR - French
es-ES - Spanish
License and API Keys
# FiveM license key (REQUIRED)
sv_licenseKey "your_license_key_here"
# Steam Web API key (REQUIRED for Steam auth)
set steam_webApiKey "your_steam_api_key_here"
# Discord Guild ID (for Discord integration)
set discord_guild_id "your_discord_guild_id"
Never share your license or API keys publicly! Store them securely and never commit them to public repositories.
Get FiveM License Key
Visit https://keymaster.fivem.net
Log in with your FiveM account
Click “New Server”
Generate a key for your server IP
Copy the key to sv_licenseKey
Get Discord Guild ID
Enable Developer Mode in Discord (User Settings → Advanced)
Right-click your Discord server
Click “Copy ID”
Paste into discord_guild_id
Network Configuration
# Server endpoint (IP:Port)
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
# Maximum players
sv_maxclients 48
# Enforce GameBuild (prevents version mismatches)
sv_enforceGameBuild 2802
endpoint_add_tcp/udp Defines the IP and port your server listens on. 0.0.0.0 = Listen on all network interfaces30120 = Default FiveM port (can be changed)
sv_maxclients Maximum concurrent players. Recommendation: Start with 32-48 for testing. Scale up to 64-128 for production based on server resources.
sv_enforceGameBuild Enforces specific GTA V game build. 2802 = Current recommended buildPrevents players with outdated game versions from joining.
Database Configuration
# MongoDB connection string
set mongodb_url "mongodb://username:password@localhost:27017/mythic"
set mongodb_database "mythic"
# MySQL connection string (oxmysql)
set mysql_connection_string "mysql://username:password@localhost:3306/mythic?charset=utf8mb4"
Discord Webhooks
# Admin logs webhook
set discord_admin_webhook "https://discord.com/api/webhooks/..."
# Connection logs webhook
set discord_connection_webhook "https://discord.com/api/webhooks/..."
# Kill logs webhook
set discord_kill_webhook "https://discord.com/api/webhooks/..."
# Error logs webhook
set discord_error_webhook "https://discord.com/api/webhooks/..."
# Anti-cheat logs webhook
set discord_pwnzor_webhook "https://discord.com/api/webhooks/..."
Environment Configuration
# Environment (dev/prod/test)
set environment "prod"
# Debug mode (verbose logging)
set debug_mode "false"
# Enable OneSync (REQUIRED for Mythic Framework)
set onesync on
# OneSync population (enables OneSync Infinity)
set onesync_enabled true
set onesync_population true
Options:
dev - Development (verbose logging, hot reload)
prod - Production (optimized, minimal logging)
test - Testing (feature flags enabled)
Effect: Controls logging verbosity and feature flags throughout the framework.
Required: YES - Mythic Framework requires OneSync InfinityPurpose: Enables server-side entity management and increased player slotsConfiguration: set onesync on
set onesync_enabled true
set onesync_population true
Never disable OneSync - the framework depends on it.
Options: true or falseWhen Enabled:
Verbose console logging
Database query logging
Event monitoring
Performance profiling
Use Cases:
Troubleshooting issues
Development and testing
Performance optimization
Disable in production for performance.
# Server thread management
set sv_threadSleep 0
# Script runtime budget (ms per tick)
set sv_scriptHookAllowed 0
# Enable server profiling
set sv_enableProfiling true
sv_threadSleep Default: 0 (no sleep)Controls server tick rate. Lower = higher performance but more CPU usage. Recommendation: Keep at 0 for production servers.
sv_scriptHookAllowed Default: 0 (disabled)Allows ScriptHook (modding tool). Should be disabled on production servers for security.
sv_enableProfiling Default: falseEnables performance profiling. Useful for diagnosing performance issues. Enable when troubleshooting, disable in production.
Security Settings
# Disable script hook (security)
set sv_scriptHookAllowed 0
# Enable ACE permission system
add_ace resource.mythic-admin command allow
# Require Steam authentication
sv_authMaxVariance 1
sv_authMinTrust 1
# Rate limiting
set sv_filterRequestControl 4
Critical Security Settings:
Never enable script hook (sv_scriptHookAllowed 0)
Require Steam auth for player identity verification
Enable rate limiting to prevent spam/DoS
Use ACE permissions for admin access control
Admin Permissions
# Add admins by identifier
add_ace identifier.steam:110000XXXXXXXX admin allow
add_ace identifier.license:XXXXXXXXXXXXXXXX admin allow
# Create admin group
add_ace group.admin command allow
add_ace group.admin admin allow
# Add principals to groups
add_principal identifier.steam:110000XXXXXXXX group.admin
Resource Loading
# Ensure core resources in order
ensure mythic-base
ensure mythic-pwnzor
ensure mythic-queue
ensure mythic-loadscreen
ensure mythic-characters
# ... (all other resources)
Complete Example
View Full server.cfg Example
# ====================================
# MYTHIC FRAMEWORK - SERVER CONFIG
# ====================================
# === BASIC SETTINGS ===
sv_hostname "^5Mythic ^7Roleplay Server"
sets tags "roleplay, mythic, economy, jobs"
sets locale "en-US"
sv_maxclients 48
# === AUTHENTICATION ===
sv_licenseKey "your_license_key_here"
set steam_webApiKey "your_steam_api_key_here"
set discord_guild_id "your_discord_guild_id"
# === NETWORK ===
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
sv_enforceGameBuild 2802
# === DATABASE ===
set mongodb_url "mongodb://username:password@localhost:27017/mythic"
set mongodb_database "mythic"
set mysql_connection_string "mysql://username:password@localhost:3306/mythic?charset=utf8mb4"
# === DISCORD WEBHOOKS ===
set discord_admin_webhook "https://discord.com/api/webhooks/..."
set discord_connection_webhook "https://discord.com/api/webhooks/..."
set discord_kill_webhook "https://discord.com/api/webhooks/..."
set discord_error_webhook "https://discord.com/api/webhooks/..."
set discord_pwnzor_webhook "https://discord.com/api/webhooks/..."
# === ENVIRONMENT ===
set environment "prod"
set debug_mode "false"
# === ONESYNC (REQUIRED) ===
set onesync on
set onesync_enabled true
set onesync_population true
# === PERFORMANCE ===
set sv_threadSleep 0
set sv_scriptHookAllowed 0
set sv_enableProfiling false
# === SECURITY ===
sv_authMaxVariance 1
sv_authMinTrust 1
set sv_filterRequestControl 4
# === PERMISSIONS ===
add_ace resource.mythic-admin command allow
add_ace group.admin command allow
add_ace group.admin admin allow
# Add your admin identifier here
add_principal identifier.steam:YOUR_STEAM_ID group.admin
# === RESOURCES ===
# Database (MUST load first)
ensure oxmysql
# Core Framework
ensure mythic-base
ensure mythic-pwnzor
# ... (additional resources)
Validation Checklist
Before starting your server, verify:
License Keys
✅ FiveM license key added
✅ Steam API key added
✅ Keys are valid and not expired
Database
✅ MongoDB connection string correct
✅ MySQL connection string correct
✅ Databases created and accessible
✅ Authentication credentials valid
Network
✅ Correct IP and port configured
✅ Firewall allows traffic on port
✅ Port forwarding configured (if needed)
Security
✅ Script hook disabled
✅ Steam auth required
✅ Admin permissions configured
✅ Discord webhooks use HTTPS
OneSync
✅ OneSync enabled
✅ OneSync population enabled
✅ onesync_enabled set to true
Next Steps
Important: After making changes to server.cfg, you must restart the server for them to take effect. Some settings cannot be changed while the server is running.