GamingAugust 4, 20264 min read

How to Set Up a Left 4 Dead 2 Dedicated Server

Host your own L4D2 dedicated server on a Linux VPS with SteamCMD, configure campaigns and difficulty, and keep it running for co-op and versus.

NBy Nxeon

A Left 4 Dead 2 dedicated server means you and your friends drop straight into co-op or versus without matchmaking, on the campaigns and mods you choose. This guide sets up an L4D2 dedicated server on a Linux VPS and keeps it online.

What you need

  • A VPS: Ubuntu 22.04 or Debian 12. L4D2 is light: 2 vCPU and 2 GB RAM comfortably runs an 8-player co-op or versus server.
  • SteamCMD: the L4D2 dedicated server is App ID 222860, installed anonymously.
  • Ports: UDP 27015 (game) and UDP 27005 (client).

Step 1: User and dependencies

sudo adduser --disabled-password --gecos "" l4d2
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y lib32gcc-s1 lib32stdc++6 steamcmd

Step 2: Install L4D2 with SteamCMD

sudo su - l4d2
steamcmd +force_install_dir /home/l4d2/server +login anonymous +app_update 222860 validate +quit
Deploying a new server with the Nxeon one-click deploy wizard
Deploying a new server with the Nxeon one-click deploy wizard

Step 3: Open the firewall

sudo ufw allow 27015/udp
sudo ufw allow 27005/udp
sudo ufw reload

Step 4: Start the server

L4D2 uses srcds_run. Start a co-op server on the first campaign map:

cd /home/l4d2/server
./srcds_run -game left4dead2 -console \
  +map c1m1_hotel \
  +sv_gametypes "coop,versus,survival" \
  +maxplayers 8 \
  -port 27015

Set +map c5m1_waterfront for The Parish, +map c2m1_highway for Dark Carnival, and so on. Difficulty and mode are controlled in the config below.

Step 5: Configuration

Edit /home/l4d2/server/left4dead2/cfg/server.cfg:

hostname "My Nxeon L4D2 Server"
sv_password ""
rcon_password "change-this-strong-password"
sv_lan 0
z_difficulty "Normal"
sv_gametypes "coop,realism,versus,survival,scavenge"
mp_gamemode "coop"

Set z_difficulty to Easy, Normal, Hard (Advanced), or Impossible (Expert). Switch mp_gamemode to versus for PvP.

Step 6: Keep it online with systemd

Create /etc/systemd/system/l4d2.service:

[Unit]
Description=Left 4 Dead 2 Dedicated Server
After=network.target

[Service]
Type=simple
User=l4d2
WorkingDirectory=/home/l4d2/server
ExecStart=/home/l4d2/server/srcds_run -game left4dead2 -console +map c1m1_hotel +maxplayers 8 -port 27015
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now l4d2
sudo journalctl -u l4d2 -f

Mods and add-on campaigns

L4D2's custom campaigns are the reason to self-host. Place .vpk add-on files into left4dead2/addons on the server, and have players subscribe to the matching Workshop items so their content matches. For admin tools and extra players (10v10, mutations), install SourceMod and MetaMod:Source into left4dead2/addons, exactly like our TF2 dedicated server guide describes.

Connecting

From the L4D2 developer console (enable it in options), join with:

connect YOUR_SERVER_IP:27015

If it won't connect, it's nearly always the firewall — confirm UDP 27015 is open on both UFW and your provider's network firewall.

Hardware

L4D2 caps at four survivors in vanilla co-op (up to eight with mods), so it's undemanding: a 2 GB plan is fine. If you host several games, hosting multiple game servers on one VPS shows how to keep them tidy, and Game Server Specs Explained helps you right-size.

Cycling campaigns

L4D2 co-op doesn't rotate campaigns automatically the way versus does; most servers change campaign via console or a plugin. Admins can queue the next campaign directly:

changelevel c8m1_apartment

Common campaign start maps: c1m1_hotel (Dead Center), c2m1_highway (Dark Carnival), c5m1_waterfront (The Parish), c6m1_riverbank (The Passing), c8m1_apartment (No Mercy).

Add-on campaigns and switching modes

Custom campaigns ship as .vpk files — place them in left4dead2/addons on the server and have every player subscribe to the matching Workshop item so content matches. Mismatched content is the number-one reason players get kicked or see missing textures. Switch modes without reinstalling anything:

  • Versus: mp_gamemode versus — teams alternate as survivors and infected.
  • Realism: mp_gamemode realism — no glows, tougher AI.
  • Mutations: limited-time rulesets set via sv_gametypes and the mutation name.

Troubleshooting

  • Modded players can't join: the add-on .vpk set must match between server and clients.
  • Kicked for "different map version": update both server and client, or the map file.
  • Server hidden: set sv_lan 0 and open UDP 27015 on both firewalls.

FAQ

What App ID is the L4D2 dedicated server?

App ID 222860, installed anonymously via SteamCMD with +app_update 222860 validate.

How do I change the difficulty?

Set z_difficulty in server.cfg to Easy, Normal, Hard, or Impossible, then restart or change level.

Can I run more than 4 players?

Vanilla co-op is capped at 4 survivors. Plugins like SourceMod's L4D2 tools raise the limit for co-op and enable larger versus lobbies.

Why can't friends find my server?

Set sv_lan 0, open UDP 27015 on both firewalls, and connect directly by IP if it isn't appearing in the browser yet.

Spin up your L4D2 server on a low-latency game server VPS from Nxeon and keep your survivor crew together on your own box.

#left 4 dead 2#l4d2#dedicated server#steamcmd#game servers#seobatch

Deploy your first server in under a minute

Creating an account is free and takes no card details. You pay when you deploy — choose a billing term and pay from your wallet or by card at checkout.