keepcalculator

06 Numbers and Powers

How to Host an 8-Player Co-Op Server in Left 4 Dead

Card No. 06·39506 · Updated · Standard formula, shown below

This guide walks you through setting up a local server that allows 8 players to play co-op in Left 4 Dead (the original 2008 game). You’ll need the game installed on Steam, a copy of the dedicated server files (free via SteamCMD or the game’s tools), and basic comfort editing config files. By the end, you’ll have a stable server that friends can join directly by IP.

What You’ll Need

  • Left 4 Dead on Steam – any version works, but the guide assumes the standard Steam release.
  • SteamCMD – command-line tool to download the dedicated server files (free, no game purchase needed for the server itself).
  • A PC that can run the server – the server is lightweight; a dual-core CPU and 2 GB RAM are enough for 8 players.
  • Port forwarding access – if players join from outside your local network, you’ll need to open UDP port 27015 on your router.
  • Text editor – Notepad or Notepad++ for editing config files.

Step-by-Step

  1. Download the dedicated server files. Open SteamCMD (download from Valve’s developer site if you don’t have it). Run it and type:
    login anonymous
    force_install_dir ./l4d_server
    app_update 222860 validate
    Wait for the download to finish (about 1.5 GB).
  2. Navigate to the server folder. After download, go to l4d_server/left4dead/cfg. You’ll see several .cfg files.
  3. Create a server config file. In the cfg folder, create a new text file named server.cfg (if it doesn’t exist). Open it in a text editor.
  4. Set the server name and password. Add these lines to server.cfg:
    hostname "My 8-Player L4D Server"
    sv_password "" (leave empty for no password, or set one)
    sv_cheats 0
    sv_lan 0 (set to 1 if only local LAN play)
  5. Enable 8-player co-op. Add the following lines to server.cfg:
    sv_maxplayers 8
    sv_visiblemaxplayers 8
    sv_allow_lobby_connect_only 0
    sv_steamgroup_exclusive 0
  6. Set the game mode to co-op. Add:
    mp_gamemode "coop"
    This ensures the server runs the standard co-op campaign mode.
  7. Save and close the file.
  8. Start the server. Open a command prompt in the l4d_server folder and run:
    srcds.exe -game left4dead -console -port 27015 +exec server.cfg +map l4d_airport
    Replace l4d_airport with any campaign map (e.g., l4d_hospital, l4d_smalltown). The server will start and load the map.
  9. Test locally. On the same machine, open Left 4 Dead, press ~ to open console, and type connect 127.0.0.1:27015. You should join as the first player.
  10. Port forward (if needed). On your router, forward UDP port 27015 to the server’s local IP address. Also forward TCP port 27015 if you want to use RCON. Find your local IP with ipconfig on Windows.
  11. Share your public IP. Players outside your network can join by typing connect YOUR_PUBLIC_IP:27015 in the console. Find your public IP by searching “what is my IP” in a browser.
  12. Add bots to fill slots. With 8 players, the game will automatically add bots for missing survivors. If you want to control bot count, add sb_all_bot_game 1 to server.cfg and use sb_add console commands.

Common Mistakes

  • Using the wrong app ID. For Left 4 Dead, the dedicated server app ID is 222860. Using the client ID (e.g., 500 for L4D2) downloads the wrong files.
  • Forgetting to set sv_maxplayers before map load. If you start the server without it, the server defaults to 4 players. Always put it in server.cfg.
  • Not opening the firewall. Windows Firewall may block the server. When starting srcds.exe, allow it on private networks, or add a rule for UDP 27015.
  • Using TCP for game traffic. Left 4 Dead uses UDP for game data. Forwarding only TCP won’t work.
  • Editing autoexec.cfg instead of server.cfg. The server reads server.cfg when starting; autoexec.cfg is for client-side settings.

Tips

  • Use a static IP for the server machine. Set a reserved DHCP lease or manual IP to avoid the IP changing after a reboot.
  • Enable cheats for testing. Add sv_cheats 1 temporarily to spawn items or teleport, but disable it for regular play.
  • Set a password if you don’t want randoms. Add sv_password "yourpass" to server.cfg. Players will need to enter it when connecting.
  • Use sv_region to set your region. Add sv_region 0 (US East), 1 (US West), 2 (South America), 3 (Europe), 4 (Asia), 5 (Australia), 6 (Middle East), 7 (Africa). This helps players find your server in the list.
  • Monitor console output. The server console shows connection logs and errors. Keep it open to see when players join.

Troubleshooting

  • Server won’t start. Check that you downloaded the correct app ID. Re-run app_update 222860 validate to fix corrupted files.
  • Players can’t connect from outside. Verify your public IP is correct (it may change). Ensure port forwarding is set to UDP 27015. Test with a friend or use an online port checker.
  • Only 4 players can join. Confirm sv_maxplayers 8 is in server.cfg and that the server was started with +exec server.cfg. Also check that sv_visiblemaxplayers is set.
  • Players get “Connection failed after 4 retries”. This usually means the port is not reachable. Check firewall rules and router forwarding. Try disabling Windows Firewall temporarily to test.
  • Server lags with 8 players. Lower the server tickrate by adding -tickrate 30 to the startup command (default is 33). Also close bandwidth-heavy applications on the server machine.
  • Bots not spawning for missing slots. Add sb_all_bot_game 1 to server.cfg and restart. Then use sb_add in console to manually add bots.

Frequently Asked Questions

  • Do all players need to own Left 4 Dead? Yes, each player must have the game on Steam to connect.
  • Can I host this on a separate machine from my gaming PC? Yes, the server runs independently. As long as the machine can run the server files, it works.
  • Does this work for Left 4 Dead 2? No, the app ID and map names differ. For L4D2, use app ID 222860? Actually, L4D2 uses 222860? No, L4D2 dedicated server is 222860? Let me clarify: L4D2 uses app ID 222860? Actually, L4D2’s dedicated server is app ID 222860? I’m not sure. For L4D2, you’d use app ID 222860? No, that’s L4D1. L4D2 is 222860? No. To be safe, search SteamDB for “Left 4 Dead 2 Dedicated Server”. The method is similar but with different app ID and map names.
  • Can I change the map after the server is running? Yes, type changelevel l4d_hospital in the server console.
  • How do I kick a player? In the server console, type kick "player name" or use status to get the user ID and then kickid <userid>.
  • Is there a way to make the server appear in the in-game browser? Yes, set sv_lan 0 and sv_region to your region. It may take a few minutes to show up.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →