Skip to main content
This guide walks you through every section of server.cfg, explaining what each setting does and how to configure it for your server.

Understanding server.cfg

The server.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

3

Replace placeholders

Replace YOUR_LICENSE_KEY_HERE and YOUR_STEAM_API_KEY with your actual keys
Never share your license key publicly! Anyone with your key can impersonate your server. Treat it like a password.

Network Configuration

server.cfg
Endpoint Configuration:
  • 0.0.0.0 = Listen on all network interfaces
  • 30120 = Default FiveM port (change if needed)
  • Both TCP and UDP are required
Player Slots:
  • Adjust sv_maxclients based on your server capacity
  • Consider: 8GB RAM supports ~48 players, 16GB supports ~80+
  • More players = more database load and network bandwidth
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 Settings:
  • mongodb_auth_url - Connection string for authentication database
  • mongodb_auth_database - Database name for auth (default: auth)
  • mongodb_game_url - Connection string for game data
  • mongodb_game_database - Database name for game data (default: fivem)
MySQL Settings:
  • mysql_connection_string - Full connection URL with credentials
  • mysql_slow_query_warning - Warn about queries taking longer than X ms
  • mysql_ui - Enable web UI for database inspection
See Database Setup for detailed connection string configuration.

Environment & Mode

server.cfg
Environment Modes:
Always use dev mode during setup and development. Switch to prod for live servers to improve performance and reduce log spam.

Discord Webhooks

Configure Discord webhooks for server logging:
server.cfg
Webhook Types:
Logs admin actions:
  • Noclip usage
  • Teleports
  • Give item commands
  • Player kicks/bans
Logs player connections:
  • Join events with identifiers
  • Leave events
  • Connection failures
General server logs:
  • Resource starts/stops
  • Database events
  • System messages
Logs player deaths/kills:
  • Killer and victim info
  • Weapon used
  • Death location
Anti-cheat detections:
  • Suspicious activity
  • Detected cheats
  • Automated bans
Server errors:
  • Lua errors
  • Database errors
  • Critical failures
Creating Discord Webhooks:
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
You can use the same webhook URL for all types, or create separate channels for organization. Separate channels help with Discord rate limiting on busy servers.

API Configuration

server.cfg
Purpose:
  • 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
Visibility:
  • sv_master1 "" = Hidden from public server list (recommended during setup)
  • Remove or comment out to appear in server browser
  • tags = Searchable tags in server browser
  • sv_projectName = Name shown in server list
  • sv_projectDesc = Description shown in server list

Game Build & Security

server.cfg
Build Enforcement:
  • 3095 = Current recommended build for Mythic Framework
  • Ensures all players use compatible game version
  • Update this if framework requires newer build
Security:
  • sv_endpointPrivacy true = Hides server IP from client
  • sv_scriptHookAllowed 0 = Blocks Script Hook V (anti-cheat)
Always keep sv_scriptHookAllowed 0 unless you have a specific reason. Script Hook V can be used for cheating.

Voice Configuration

server.cfg
Voice Settings:
  • voice_useNativeAudio = Use FiveM’s built-in voice system
  • voice_useSendingRangeOnly = Optimize bandwidth by limiting range
Mythic Framework includes voice integration. These settings optimize voice chat performance.

ACE Permissions

server.cfg
Adding Admins:
server.cfg
Finding Your Identifiers:
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: status
4

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.cfg
Recommended: Use Discord ID for admin permissions. It’s consistent across server wipes and easy to verify.
MongoDB Admin Permissions Required: In addition to ACE permissions, admin users must also have their character set to admin or owner role in the MongoDB database. Add this to the character document:
Without this MongoDB role, admin commands will not work even with ACE permissions configured.

Server Branding

server.cfg
Banner Requirements:
  • Image URL (must be HTTPS)
  • Recommended size: 1920x1080
  • Supported formats: PNG, JPG
Icon Requirements:
  • File: logo96.png in 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
Advanced Settings:
  • 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:
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 status command)
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
Save a backup of your configured server.cfg before starting. If something goes wrong, you can quickly restore your settings.