Skip to content

Left 4 Dead 2: Server Configuration

Learn how to set the server name, password, game mode, starting map, and other rules for your Left 4 Dead 2 server.

26 November 20266 min read7 Views0 helpful

Don't have your own server yet? Host your Left 4 Dead 2 server with ZAP-Hosting from €4.49 / month.Or try 3 days from €0.81

Introduction

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.

How configuration works

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.cfg file in the left4dead2/cfg folder. 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:

Important

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 parameters at a glance

Startup parameterDescription
Server nameYour server’s name in the server list. Default: ZAP Left 4 Dead 2 Server
Server passwordPassword required to join. Leave blank for an open server.
Max. playersThe number of players who can play on your server at the same time. Default: 8
Starting mapThe map your server starts on. Default: c1m1_hotel (Dead Center)
Game modeThe 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
Info

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.

Game mode, starting map, and player count

Set the game mode in the Game mode field. Your server passes it as mp_gamemode when it starts:

Game modeValue
Campaign (Co-op)coop
Realism (Co-op with tougher rules)realism
Versusversus
Survivalsurvival
Scavengescavenge

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:

CampaignFirst map
Dead Centerc1m1_hotel
Dark Carnivalc2m1_highway
Swamp Feverc3m1_plankcountry
Hard Rainc4m1_milltown_a
The Parishc5m1_waterfront
The Passingc6m1_riverbank
The Sacrificec7m1_docks
No Mercyc8m1_apartment
Crash Coursec9m1_alleys
Death Tollc10m1_caves
Dead Airc11m1_greenhouse
Blood Harvestc12m1_hilltop
Cold Streamc13m1_alpinecreek
The Last Standc14m1_junkyard
Important

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.

Tip

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.

More settings in custom.cfg

In custom.cfg, put each server command on its own line and enclose text in quotation marks. For example:

cfg
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:

CommandDescription
z_difficultyInfected difficulty: Easy, Normal, Hard, or Impossible
sv_alltalk1 lets all players hear each other in voice chat, regardless of team
sv_voiceenable0 disables voice chat on your server
sv_allow_lobby_connect_only0 lets players join directly using connect, even without a lobby
sv_steamgroupLinks your server to a Steam group using the group ID
sv_steamgroup_exclusive1 reserves your server for members of this Steam group
sv_pausable1 allows the game to be paused
sv_consistency1 checks whether players’ game files have been modified
sv_pureHow strictly the server restricts modified game files from players: 0, 1, or 2
sv_cheats1 allows cheat commands; useful only for testing
Warning

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.

Custom content: add-ons, maps, and sounds

Anything you add to your server is stored in the left4dead2 folder and remains there after updates and restarts:

FolderContents
left4dead2/addonsAdd-ons as .vpk files, such as custom campaigns, as well as extensions like Metamod:Source and SourceMod
left4dead2/cfgConfiguration files such as custom.cfg
left4dead2/mapsIndividual maps as .bsp and .nav files
left4dead2/sound, left4dead2/materials, left4dead2/modelsCustom sounds, textures, and models
left4dead2/resource, left4dead2/scripts, left4dead2/particlesOther custom game files
left4dead2/logsYour 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.

RCON, admins, and plugins

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:

Migration: your existing server.cfg

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.

Conclusion

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! 🙂

Free tools

Left 4 Dead 2 Tools

View all

FAQ

Frequently asked questions

Your Left 4 Dead 2 server rewrites the left4dead2/cfg/server.cfg file every time it starts. Add your own settings to left4dead2/cfg/custom.cfg instead. It runs after server.cfg and keeps your settings.
Go to the Configuration tab and open Startup Parameters. Don’t also add hostname or sv_password to custom.cfg, or the values in the file will override the panel settings.
Go to the Configuration tab, open Startup Parameters, and select a value in the Game mode field. The available options are coop, realism, versus, survival, and scavenge. Survival and Scavenge also require a starting map that supports the mode.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.