With the right configuration, you can make your Left 4 Dead 2 server exactly the way you want it: with your own name, a password, your favorite campaign as the starting map, the right game mode, and rules such as difficulty or AllTalk. In this guide, we’ll show you which settings are available, where to find them in ZapX, and what you can customize in your own configuration file.
Your Left 4 Dead 2 server reads its settings from two sources:
- Startup parameters: Set the server name, server password, player count, starting map, game mode, and Steam Game Server Login Token in ZapX under the Configuration tab in Startup parameters.
- Configuration files: Add all other server commands (Cvars), such as difficulty, AllTalk, or a Steam group, to the
custom.cfgfile in theleft4dead2/cfgfolder. Open the file in the Files tab.
Your server rewrites the left4dead2/cfg/server.cfg file every time it starts. It contains the server name, server password, and RCON password, and then runs your custom.cfg. So:
Don’t edit server.cfg manually; your changes will be lost the next time the server starts. Always put your own settings in custom.cfg. If the file doesn’t exist yet, simply create it in the left4dead2/cfg folder.
Because custom.cfg runs last, its settings take precedence, even over the startup parameters. So only set the server name (hostname) and server password (sv_password) in the startup parameters. If you also add them to custom.cfg, the values in the file will apply instead of the ones in the panel.
After you save the startup parameters, ZapX will offer to restart the server. Changes to custom.cfg also take effect only after a restart.
| Startup parameter | Description |
|---|---|
| Server name | Your server’s name in the server list. Default: ZAP Left 4 Dead 2 Server |
| Server password | Password required to join. Leave blank for an open server. |
| Max. players | The number of players who can play on your server at the same time. Default: 8 |
| Starting map | The map your server starts on. Default: c1m1_hotel (Dead Center) |
| Game mode | The game mode your server starts in: coop (default), realism, versus, survival, or scavenge |
| Steam server token (GSLT) | A Game Server Login Token from Steam that allows your server to appear in the server list. See Create a GSLT |
For the starting map, game mode, and GSLT, your server accepts only letters, numbers, and _, ., /, and -. It removes other characters, such as spaces, when it starts. For the server name and server password, it removes quotation marks.
Set the game mode in the Game mode field. Your server passes it as mp_gamemode when it starts:
| Game mode | Value |
|---|---|
| Campaign (Co-op) | coop |
| Realism (Co-op with tougher rules) | realism |
| Versus | versus |
| Survival | survival |
| Scavenge | scavenge |
The Max. players setting is only the upper limit. The game mode determines how many players can actually play: 4 in Co-op and Realism, and 8 in Versus, split between two teams.
For Starting map, enter the name of the first map in a campaign, without the file extension. Here are the first maps of the official campaigns:
| Campaign | First map |
|---|---|
| Dead Center | c1m1_hotel |
| Dark Carnival | c2m1_highway |
| Swamp Fever | c3m1_plankcountry |
| Hard Rain | c4m1_milltown_a |
| The Parish | c5m1_waterfront |
| The Passing | c6m1_riverbank |
| The Sacrifice | c7m1_docks |
| No Mercy | c8m1_apartment |
| Crash Course | c9m1_alleys |
| Death Toll | c10m1_caves |
| Dead Air | c11m1_greenhouse |
| Blood Harvest | c12m1_hilltop |
| Cold Stream | c13m1_alpinecreek |
| The Last Stand | c14m1_junkyard |
Survival and Scavenge don’t work on every map; they require maps that support these modes. If you select either of these modes, choose a compatible starting map as well.
Use the changelevel <kartenname> command in the Console tab to change the map immediately without restarting the server. Use maps and part of a map name to search for maps on your server.
In custom.cfg, put each server command on its own line and enclose text in quotation marks. For example:
z_difficulty Normal
sv_alltalk 0
sv_voiceenable 1
sv_allow_lobby_connect_only 0
sv_pausable 0
These are some of the most commonly changed settings:
| Command | Description |
|---|---|
z_difficulty | Infected difficulty: Easy, Normal, Hard, or Impossible |
sv_alltalk | 1 lets all players hear each other in voice chat, regardless of team |
sv_voiceenable | 0 disables voice chat on your server |
sv_allow_lobby_connect_only | 0 lets players join directly using connect, even without a lobby |
sv_steamgroup | Links your server to a Steam group using the group ID |
sv_steamgroup_exclusive | 1 reserves your server for members of this Steam group |
sv_pausable | 1 allows the game to be paused |
sv_consistency | 1 checks whether players’ game files have been modified |
sv_pure | How strictly the server restricts modified game files from players: 0, 1, or 2 |
sv_cheats | 1 allows cheat commands; useful only for testing |
Don’t set sv_lan to 1. Your server will then only be visible on the local network and won’t be accessible over the internet.
You can also enter many of these commands while the server is running in the Console tab, for example, z_difficulty Hard. However, they apply only until the next restart. Put any settings you want to keep permanently in custom.cfg.
Anything you add to your server is stored in the left4dead2 folder and remains there after updates and restarts:
| Folder | Contents |
|---|---|
left4dead2/addons | Add-ons as .vpk files, such as custom campaigns, as well as extensions like Metamod:Source and SourceMod |
left4dead2/cfg | Configuration files such as custom.cfg |
left4dead2/maps | Individual maps as .bsp and .nav files |
left4dead2/sound, left4dead2/materials, left4dead2/models | Custom sounds, textures, and models |
left4dead2/resource, left4dead2/scripts, left4dead2/particles | Other custom game files |
left4dead2/logs | Your server’s log files |
Your server loads custom maps and files into the game every time it starts. If a file has the same name as an original game file, the server skips it and keeps the original file. Learn how to upload and launch Steam Workshop campaigns in Install mods. To help players download custom content quickly, we recommend setting up FastDL.
ZapX automatically generates the RCON password for your server and writes it to server.cfg every time the server starts. You can also run commands directly in the Console tab without RCON. If you want to use an external RCON program, set your own rcon_password in custom.cfg. Find out how in RCON.
To get admin privileges in the game, an admin menu, and additional features, you need SourceMod and Metamod:Source. These extensions and their settings are stored in the left4dead2/addons folder:
If you brought your own server.cfg, for example when migrating or uploading a file, your server won’t simply overwrite it. When it starts, it renames the file to custom.cfg. If a custom.cfg already exists, your file is renamed to server_legacy.cfg and runs before custom.cfg. This way, your settings are preserved.
If you still find a l4d2-cfg folder on your server containing a MOVED.txt file, it is no longer read. Your settings from that folder are now in left4dead2/cfg/custom.cfg.
You’ve now configured your Left 4 Dead 2 server just the way you want it. Learn how to connect to your server in Connect to the server. If something isn’t working properly, our guide to Common issues can help. If you have any other questions, our support team is available every day! 🙂
