How to Configure Your Left 4 Dead Server
Learn how to configure your Left 4 Dead dedicated server using server.cfg and startup parameters.
Left 4 Dead server configuration is managed through the server.cfg file and optional startup parameters. The server runs on the Source engine, so it uses standard Source dedicated server commands and ConVars.
Configuration File
The main configuration file is server.cfg, located in the left4dead/cfg/ directory. This file is executed every time the server starts or a new map loads.
Open the XGamingServer panel
Log in to the XGamingServer panel and stop your Left 4 Dead server.
Navigate to Files
In the sidebar, click Files.
Open server.cfg
Navigate to left4dead > cfg and open server.cfg. If the file doesn't exist, create it.
Add your settings
Add or modify your desired settings (see the reference tables below).
Save and restart
Click Save and start your server.
Essential Server Settings
These are the most commonly configured settings for server.cfg:
| Command | Description | Example |
|---|---|---|
hostname | Server name shown in the browser | hostname "My L4D Server" |
sv_password | Password required to join | sv_password "secret123" |
rcon_password | Password for remote console access | rcon_password "admin123" |
maxplayers | Maximum player count | maxplayers 8 |
sv_lan | LAN-only mode (0 = internet, 1 = LAN) | sv_lan 0 |
sv_region | Server region for browser filtering | sv_region 0 |
sv_contact | Admin contact email | sv_contact "admin@example.com" |
Region Codes
The sv_region value determines where your server appears in regional filters:
| Value | Region |
|---|---|
0 | US East |
1 | US West |
2 | South America |
3 | Europe |
4 | Asia |
5 | Australia |
6 | Middle East |
7 | Africa |
255 | World (all regions) |
Gameplay Settings
| Command | Description | Default |
|---|---|---|
sv_cheats | Enable cheat commands (0 = off, 1 = on) | 0 |
mp_friendlyfire | Enable friendly fire (0 = off, 1 = on) | 0 |
mp_autoteambalance | Auto-balance teams in Versus mode | 1 |
sv_alltalk | All players hear each other regardless of team | 0 |
sv_pausable | Allow the game to be paused | 0 |
sv_voiceenable | Enable voice chat | 1 |
mp_disable_autokick | Disable automatic idle kicks | 0 |
Network and Performance Settings
| Command | Description | Recommended |
|---|---|---|
sv_maxrate | Maximum bandwidth per client (bytes/sec) | 0 (unlimited) |
sv_minrate | Minimum bandwidth per client (bytes/sec) | 3500 |
sv_maxupdaterate | Maximum update packets per second to clients | 30 |
sv_minupdaterate | Minimum update packets per second to clients | 10 |
sv_maxcmdrate | Maximum command packets per second from clients | 30 |
sv_mincmdrate | Minimum command packets per second from clients | 10 |
fps_max | Server tick rate cap | 300 |
net_maxfilesize | Maximum file download size (MB) | 64 |
💡 Tip: For the best experience, set
sv_maxupdaterateandsv_maxcmdrateto30for standard servers. Higher values consume more bandwidth but provide smoother gameplay for clients with good connections.
Example server.cfg
Here's a complete example configuration file:
// Server Identity
hostname "My Left 4 Dead Server"
sv_password ""
rcon_password "YourSecureRCON"
sv_region 0
sv_lan 0
// Player Settings
maxplayers 8
mp_friendlyfire 0
sv_alltalk 0
sv_voiceenable 1
// Network Settings
sv_maxrate 0
sv_minrate 3500
sv_maxupdaterate 30
sv_minupdaterate 10
sv_maxcmdrate 30
sv_mincmdrate 10
// Server Behavior
mp_disable_autokick 1
sv_pausable 0
sv_cheats 0
sv_consistency 1
// Logging
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1Startup Parameters
Startup parameters are configured in the Startup tab on the XGamingServer panel. Common parameters:
| Parameter | Description | Example |
|---|---|---|
+map | Starting map | +map l4d_hospital01_apartment |
+maxplayers | Maximum player count | +maxplayers 8 |
+sv_lan | LAN mode | +sv_lan 0 |
-port | Server port | -port 27015 |
-tickrate | Server tick rate | -tickrate 30 |
-ip | Bind to a specific IP | -ip 0.0.0.0 |
+exec | Execute a config file on start | +exec server.cfg |
📝 Note: Parameters with
+set ConVars on startup. Parameters with-set engine options. The+exec server.cfgparameter ensures your config file runs on server start — without it, your settings inserver.cfgmight not load.
Additional Config Files
You can create additional config files in the left4dead/cfg/ directory for different purposes:
| File | Purpose |
|---|---|
server.cfg | Main configuration, runs on every map change |
autoexec.cfg | Runs once on server start before server.cfg |
motd.txt | Message of the Day shown to joining players |
mapcycle.txt | Map rotation list (one map per line) |
banned_user.cfg | Banned Steam IDs |
banned_ip.cfg | Banned IP addresses |
💡 Tip: Use
motd.txtto welcome players to your server. You can include HTML formatting for a polished look. The MOTD appears as a popup when players join.
If you get stuck at any time, you can join our Discord.
How is this guide?
How to Change Your Left 4 Dead Server Name
Learn how to change the hostname displayed in the server browser for your Left 4 Dead dedicated server.
How to Connect to Your Left 4 Dead Server
Learn how to find your server IP and connect to your Left 4 Dead dedicated server using the console or server browser.