Left 4 Dead 2 Dedicated Server: How to Host an L4D2 Server (Setup, Requirements, Ports, Mods)

A Left 4 Dead 2 dedicated server is Valve’s free L4D2 server program (Steam app 222860) running on its own, so your group always has the same server for campaigns, Versus and custom maps. To host one you install it with SteamCMD, create a server.cfg in left4dead2/cfg, open port 27015, and launch it on a map such as c1m1_hotel. It needs only 1–2 GB of RAM. Below: the full setup on Windows and Linux, how players actually get in (lobby, Steam group or console), running more than 4 or 8 players, mods and custom campaigns, and the errors that come up.

Local server, official dedicated, or your own dedicated server?

When you start a game from an L4D2 lobby, the game asks where to host it. Local Server means the lobby leader’s PC hosts the match, so everyone plays on that player’s connection and the server ends when they quit. Official Dedicated puts you on an available dedicated server, one Valve or a third party hosts, generally without mods. Your own dedicated server is the third option: always the same address, your settings, your mods, and it doesn’t depend on who’s online first.

Local server (listen) Your own dedicated server
Who hosts The lobby leader’s PC A separate machine or a host
Stays up after the host leaves No Yes
Lag for everyone else Depends on the leader’s upload Depends on the server’s connection, usually much better
SourceMod plugins, 8+ players Plugins work, but everything runs on the host’s PC and upload Yes
Custom campaigns Yes, if everyone has them Yes

Left 4 Dead 2 dedicated server requirements

An L4D2 server is small. 1–2 GB of RAM covers a standard 8-player server, and plugins or a big custom campaign push it toward 2 GB. The real limits are CPU speed and upload bandwidth, because the AI Director spawns the horde on the server, not on players’ PCs.

  • RAM: 1–2 GB for the server process.
  • CPU: fast single-thread performance. A horde wave is the busiest moment the server has.
  • OS: Windows, or Linux with 32-bit libraries (the Linux server binary is 32-bit only).
  • Disk: room for the full server install plus the custom campaigns you add.
  • Network: an upload that can feed every player, and a router you can open a port on. Connections behind CGNAT can’t host.

How to make a Left 4 Dead 2 server on Windows

The Windows setup is SteamCMD, one folder and a shortcut. The server downloads anonymously, so it doesn’t use your Steam account. Install the server into its own folder, never inside the SteamCMD folder.

  1. Download SteamCMD from Valve, extract it to C:\steamcmd and run it once so it updates itself.
  2. Download the L4D2 server files (run the same line later to update):
    steamcmd +force_install_dir C:\l4d2server +login anonymous +app_update 222860 validate +quit

    Wait for Success! App '222860' fully installed. The folder ends up looking much like your normal Left 4 Dead 2 install.

  3. Create C:\l4d2server\left4dead2\cfg\server.cfg. It isn’t there after install; you make it yourself (contents below).
  4. Make a shortcut to srcds.exe with this target:
    C:\l4d2server\srcds.exe -console -game left4dead2 -port 27015 +maxplayers 8 +map c1m1_hotel

    The server isn’t ready for players until a map is loaded, so always give it one.

  5. Run it and allow it through the firewall. When the console shows Connection to Steam servers successful and VAC secure mode is activated, it’s up.

If you’ll also play L4D2 on the same PC, start your game before the server shortcut. Steam can refuse to open the game if it thinks L4D2 is already running.

Left 4 Dead 2 dedicated server on Linux

Linux is the usual home for a server that runs for months. There are two catches. The server binary is 32-bit, so it needs the i386 libraries. And SteamCMD has been known to refuse the anonymous Linux download of app 222860 with Invalid platform; the workaround forces the Windows depot first, then the Linux one.

# as your server user, not root
./steamcmd.sh +force_install_dir ~/l4d2server +@sSteamCmdForcePlatformType windows +login anonymous +app_update 222860 validate +quit
./steamcmd.sh +force_install_dir ~/l4d2server +@sSteamCmdForcePlatformType linux +login anonymous +app_update 222860 validate +quit

cd ~/l4d2server
./srcds_run -console -game left4dead2 -port 27015 +maxplayers 8 +map c1m1_hotel

Run it inside screen or tmux so it keeps going after you log out. If you’d rather not script it yourself, LinuxGSM installs and manages L4D2 as l4d2server, with ./l4d2server start, stop, update and console. No spare machine? Left 4 Dead 2 server hosting skips the install and the platform workaround entirely.

Ports to open

Players connect on UDP 27015, and RCON uses TCP 27015; forward both to the server PC and allow them in the firewall. SourceTV uses UDP 27020, which you can close by launching with -nohltv. Change the game port with -port. A second server on the same box needs its own port, such as 27016.

Port Protocol Purpose
27015 UDP Game traffic
27015 TCP RCON
27020 UDP SourceTV (optional)
27005 UDP Client port
26900 UDP, outgoing Steam

The game scans ports 27015 to 27020 when it looks for LAN servers, so a LAN server on one of those ports shows up for players on the same network.

L4D2 server.cfg

The L4D2 server config is plain text in left4dead2/cfg/server.cfg, one setting per line, and the server runs it at start. The single most important line is sv_allow_lobby_connect_only 0. Its default is 1, which means players can only arrive through a matchmaking lobby, and a direct connect to your IP gets refused.

// left4dead2/cfg/server.cfg
hostname "Saturday Survivors"
rcon_password "long-random-string"
sv_password ""                       // fill in for a private server
sv_allow_lobby_connect_only 0        // allow connect by IP, not only from lobbies
sv_gametypes "coop,realism,versus,survival,scavenge"
mp_gamemode coop
z_difficulty Normal                  // Easy, Normal, Hard, Impossible
sv_steamgroup 12345678               // your Steam group ID
sv_steamgroup_exclusive 0            // 1 = only group members can claim it while empty
sv_search_key ""                     // match only lobbies using the same key
sv_region -1                         // region to report the server in; -1 = world (default)
sv_tags ""
mp_roundlimit 3                      // maximum number of rounds (default 3)
sv_alltalk 0
motd_enabled 1
sv_consistency 1
sv_cheats 0
sv_lan 0

The four difficulty values are the menu’s Easy, Normal, Advanced and Expert. The welcome screen comes from host.txt (banner) and motd.txt (message), each either HTML or a single URL.

Game modes and mutations

The server only accepts modes listed in sv_gametypes; its default list is coop,realism,survival,versus,scavenge,dash,holdout,shootzones. Pick the mode with the map: map c1m1_hotel versus starts a Versus game. Mutations work the same way with their code, for example map c1m1_hotel mutation12 for Realism Versus or mutation4 for Hard Eight.

How players join: lobby, Steam group, browser or console

L4D2 doesn’t put a server browser on the main menu, which confuses everyone the first time. There are four ways in, and you can use all of them at once. For a private group, the Steam group method is the one that feels like matchmaking.

  1. Console: players open the developer console and type connect 203.0.113.25:27015. Run status on the server to see the exact public IP and port; if 27015 was taken, the server may have moved to 27016.
  2. Steam group servers: set sv_steamgroup to your group’s ID. Members see the server under Steam Group Servers on the main menu. Add sv_steamgroup_exclusive 1 so only members can start a game on it while it’s empty.
  3. Lobby: the lobby leader can point the lobby at your server with mm_dedicated_force_servers 203.0.113.25:27015 in their console, or you can give the server an sv_search_key that matching lobbies look for.
  4. Server browser: the hidden browser opens with openserverbrowser in the console. Players can search by your hostname and add you to Favorites.

More than 4 players: 8-player co-op and bigger Versus

Vanilla L4D2 is 4 survivors in co-op and 4v4 in Versus, so 8 is the standard maxplayers. To run 8-player co-op or larger Versus you need SourceMod plus extensions that lift the survivor limit, such as Left 4 Downtown 2 and L4DToolZ, which add cvars like l4d_maxplayers and l4d_survivor_limit. Extra survivors are duplicates of the four campaign characters unless you add further plugins for unique models and voice lines.

  1. Install MetaMod:Source and SourceMod by extracting both into left4dead2, so you get left4dead2/addons/metamod and left4dead2/addons/sourcemod.
  2. Restart and check with meta list and sm plugins list in the server console. “Unknown command” means the files are in the wrong place.
  3. Add yourself as admin in addons/sourcemod/configs/admins_simple.ini with "STEAM_1:1:12345" "99:z", then sm_reloadadmins. !admin in chat opens the menu.
  4. Install the player-limit extension and its plugins, then raise the limits in server.cfg and on the launch line (+maxplayers 12, for example). Follow each plugin’s own release post; versions matter.

Every extra survivor means more players to feed and more horde to spawn, so expect a 12- or 16-player server to need the top of that RAM range and a fast CPU.

Mods, addons and custom campaigns

A modded L4D2 server has two kinds of mods. SourceMod plugins run only on the server and change rules, admin tools and player limits. Addons are .vpk files (maps, campaigns, Workshop mutations) that both the server and every player need. The server doesn’t subscribe to the Workshop for you, so you copy the files over yourself.

  1. Subscribe to the campaign in the Steam Workshop on your own PC and start L4D2 once so it downloads.
  2. Find the .vpk in your game’s left4dead2/addons/workshop folder (newest file) and copy it to the server’s left4dead2/addons folder.
  3. Find the campaign’s first map name. Open the .vpk with a VPK viewer such as GCFScape and read its mission file: the "Map" value in the coop section is the name you need.
  4. Restart with +map thatmapname, or changelevel thatmapname from the console.

Players without the campaign can’t join that map. Either everyone subscribes to the same Workshop items, or you host the files for download: upload them to a web server, set sv_downloadurl to it and keep sv_allowdownload 1.

Useful L4D2 server commands

Type these in the server console, or prefix them with rcon from your game after rcon_password yourpassword. Cheat commands like sb_all_bot_game only work with sv_cheats 1.

Command What it does
status Players, Steam IDs and the server’s IP and port
changelevel c1m2_streets Change map (here: Dead Center chapter 2)
map c2m1_highway versus Load a map in a different game mode
kick <name> Kick a player
banid / addip Add a Steam ID or an IP to the ban list; writeid and writeip save the lists
listid / listip Show the ban lists
z_difficulty Impossible Change difficulty (Expert)
exec server.cfg Reload your config

The server also accepts a remote console over TCP with -netconport 27016 -netconpassword yourpass on the launch line, handy when RCON tools give you trouble.

Updating the server

After an L4D2 update, players on the new version can’t join an old server. Stop it, run the same SteamCMD app_update 222860 line (with the platform workaround on Linux if you needed it), start it again, and check meta list. Extensions that hook into the game, like the player-limit ones, are the first things to check after a game update.

Left 4 Dead 2 server problems and fixes

Problem Likely cause Fix
Connection refused when joining by IP sv_allow_lobby_connect_only is still 1 Set it to 0 in server.cfg
Connection times out UDP 27015 not forwarded, firewall, or CGNAT Check the forward and firewall; test from outside your network
Player can’t join at all -insecure in that player’s L4D2 launch options Remove it from Steam > Properties > Launch Options
A player is refused over a modified game file sv_consistency 1 enforces file consistency for critical files The player removes the mod, or you set sv_consistency 0
Kicked on map change in a custom campaign Player doesn’t have the addon Share the Workshop link or set up sv_downloadurl
Linux: “Invalid platform” on install Anonymous Linux download refused Use the sSteamCmdForcePlatformType workaround above
Local server lags for everyone It’s the lobby leader’s upload Use a dedicated server instead
Server browser shows no servers Filters set too tight, or the server is password-locked or group-only Clear the filters in openserverbrowser, or use connect
Plugins stop after an update SourceMod gamedata or an extension is out of date Update MetaMod, SourceMod and the extension

One thing that won’t help: changing the tickrate. It’s fixed on L4D2’s server, so a -tickrate flag does nothing.

Skip the setup: rent an L4D2 server

Hosting your own means a PC that stays on, a port forward, a server.cfg that defaults to lobby-only joins, and copying campaign files around every time the group picks a new map. If you’d rather just play, Left 4 Dead 2 server hosting on GameTeam gives you a server that’s up in minutes at the same address every night. You pay per GB of RAM, from $0.49/GB a week or $1.99/GB billed monthly, and slots are unlimited, so the server never caps you; the player count is set by L4D2 and your plugins. DDoS protection is part of every plan, and you can get your money back within the first 72 hours. The built-in AI copilot handles the config work. Tell it “switch us to Versus on Expert, let people join by IP and lock it to our Steam group” and it edits server.cfg and restarts. Ask “why did everyone get kicked on chapter 2?” and it reads the server log and tells you which addon players were missing.

FAQ

What is a Left 4 Dead 2 dedicated server?

A copy of the L4D2 server running on its own, without a game client, on a PC or host that stays online. Your group plays on it instead of on one player’s PC (a local server) or a random official server.

Is the Left 4 Dead 2 dedicated server free to download?

Yes. It’s app 222860 in SteamCMD and downloads with an anonymous login. You only pay for the machine it runs on, or for hosting.

How do I make a private L4D2 server?

Set sv_password in server.cfg and share it with your friends along with the IP. Or tie the server to your Steam group with sv_steamgroup and sv_steamgroup_exclusive 1, so only members can use it while it’s empty.

Can a dedicated server have more than 4 players in co-op?

Yes, with SourceMod and a player-limit extension such as L4DToolZ or Left 4 Downtown 2. Without them, co-op stays at 4 survivors and Versus at 4v4.

How do I change the game mode or map?

Use map <mapname> <mode> in the server console, for example map c2m1_highway versus, and make sure the mode is in sv_gametypes. changelevel switches the map and keeps the current mode.

Where are the server files and config?

Everything game-specific sits in the left4dead2 folder of the server install: cfg/server.cfg, addons/ for plugins and .vpk addons, and maps/.

Can I run a Left 4 Dead 2 server on Linux?

Yes. The Linux server works the same way; install the 32-bit libraries and, if SteamCMD says “Invalid platform,” use the platform workaround in the Linux section.

Playing the original too? We also host Left 4 Dead. And if your group runs other Source games, see our Team Fortress 2 dedicated server guide and Counter-Strike: Source dedicated server guide.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *