Gaming Servers

Left 4 Dead 2

Install and configure a Left 4 Dead 2 dedicated server on Linux or Windows

Platform Support

PlatformSupportNotes
Linux✅ NativeFull support, lightweight
Windows✅ NativeFull support

Left 4 Dead 2

Left 4 Dead 2 is one of the most lightweight dedicated servers available. This guide covers installation, configuration, and deployment on Linux.

System Requirements

  • RAM: 1GB minimum (2GB recommended)
  • vCPU: 2+ cores
  • Storage: 15GB+ available space
  • Network: Standard upstream bandwidth
  • OS: Ubuntu 20.04+ or similar

Left 4 Dead 2 has a small footprint and low resource requirements, making it ideal for budget VPS deployments. You can run multiple instances on a single small VPS.

Install SteamCMD

Update your system and install dependencies:

sudo apt update && sudo apt upgrade -y
sudo apt install -y steamcmd lib32gcc-s1 lib32stdc++6 libncurses5:i386

Create a dedicated user:

sudo useradd -m -s /bin/bash steam
sudo su - steam
mkdir -p ~/steamcmd
cd ~/steamcmd
steamcmd +quit

Install Left 4 Dead 2 Server

Download the server using SteamCMD (AppID 222860):

cd ~/steamcmd
./steamcmd.sh +login your_steam_username your_steam_password +app_update 222860 validate +quit

The server installs to ~/steamcmd/steamapps/common/Left 4 Dead 2 Dedicated Server/.

Verify installation:

ls -la ~/steamcmd/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server/

Configuration File

Create server.cfg in the left4dead2/cfg/ directory:

mkdir -p ~/steamcmd/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server/left4dead2/cfg
nano ~/steamcmd/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server/left4dead2/cfg/server.cfg

server.cfg:

// Server Identity
hostname "DeluxHost | Left 4 Dead 2 Server"
sv_password "your_server_password"
rcon_password "your_rcon_password"

// Gameplay
sv_lan 0
sv_region 0
maxplayers 8
mp_gamemode coop
mp_difficulty 2

// Server Behavior
sv_allow_lobby_connect_only 0
sv_allow_wait_command 0
sv_pausable 0
sv_tags "coop,deluxhost"

// Network
sv_minrate 20000
sv_maxrate 30000
sv_mincmdrate 30
sv_maxcmdrate 60

// Logging
log on
sv_log_onefile 0
sv_logfile 1
sv_logsdir logs

// Content
sv_allowupload 1
sv_allowdownload 1

// CVARS
sv_consistency 1
sv_pure 2
sv_pure_kick_clients 1

// Anti-cheat
sv_anti_abuse_system 1

Campaign and Difficulty Settings

Map names for coop:

  • c1m1_apartment: No Mercy
  • c2m1_highway: Crash Course
  • c3m1_plankcountry: Swamp Fever
  • c4m1_milltown_a: Hard Rain
  • c5m1_waterfront: The Parish

Difficulty levels:

  • 0: Easy
  • 1: Normal
  • 2: Hard
  • 3: Impossible

Launch Server

Basic command:

cd ~/steamcmd/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server
./srcds_run -game left4dead2 -console -usercon +sv_pure 2 +map c1m1_apartment +maxplayers 8 +ip 0.0.0.0 -port 27015

Launch parameters:

  • -game left4dead2: Game type
  • -console: Enable console
  • -usercon: Allow user console commands
  • +sv_pure 2: Enforce pure server
  • +map c1m1_apartment: Starting map
  • +maxplayers 8: Maximum players
  • +ip 0.0.0.0: Listen on all interfaces
  • -port 27015: Game port

Custom Startup Script

Create start-l4d2.sh:

nano ~/start-l4d2.sh
#!/bin/bash
cd ~/steamcmd/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server
./srcds_run -game left4dead2 \
  -console \
  -usercon \
  +sv_pure 2 \
  +map c1m1_apartment \
  +maxplayers 8 \
  +ip 0.0.0.0 \
  -port 27015 \
  +exec server.cfg
chmod +x ~/start-l4d2.sh
./start-l4d2.sh

Port Configuration

Open required ports:

sudo ufw allow 27015/udp
sudo ufw allow 27015/tcp
sudo ufw allow 27020/udp

Port assignments:

  • 27015/UDP+TCP, Game server port
  • 27020/UDP, SourceTV port (optional, for spectators/demos)

Systemd Service

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

sudo tee /etc/systemd/system/l4d2-server.service > /dev/null <<'EOF'
[Unit]
Description=Left 4 Dead 2 Dedicated Server
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=steam
WorkingDirectory=/home/steam/steamapps/common/Left 4 Dead 2 Dedicated Server
ExecStart=/home/steam/steamapps/common/Left 4 Dead 2 Dedicated Server/srcds_run \
  -game left4dead2 \
  -console \
  -usercon \
  -port 27015 \
  +exec server.cfg
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target
EOF

Enable and start:

sudo systemctl daemon-reload
sudo systemctl enable l4d2-server
sudo systemctl start l4d2-server

Check status:

sudo systemctl status l4d2-server
sudo journalctl -u l4d2-server -f

Custom Campaigns and Addons

Add Workshop Content

Download mods via SteamCMD:

./steamcmd.sh +login your_steam_username your_steam_password +workshop_download_item 550 addon_id +quit

Mods download to steamapps/workshop/content/550/.

Enable Addons

Copy addon files to the addons folder:

cp -r ~/steamcmd/steamapps/workshop/content/550/addon_id/* \
  ~/steamcmd/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server/left4dead2/addons/

Addon types:

  • .vpk: Mod packages
  • .bsp: Custom maps
  • Extracted folders, Loose addons

SourceTV (Spectator Mode)

Enable SourceTV in server.cfg:

tv_enable 1
tv_port 27020
tv_maxclients 32
tv_autorecord 1
tv_name "L4D2 SourceTV"

Mutation Mode

Set the mutation mode in server.cfg:

mp_gamemode mutation_1

Available mutations:

  • mutation_1: Tougher Than The Rest
  • mutation_2: Headshot! Headshot!
  • mutation_3: Bleed Out
  • mutation_4: Hard Eight
  • mutation_5: Versus Survival
  • mutation_6: Chainsaw Massacre
  • mutation_7: Versus Survival
  • mutation_8: Hunting Party

Backup and Maintenance

Backup Server Configuration

tar -czf l4d2-backup-$(date +%Y%m%d).tar.gz \
  ~/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server/left4dead2/cfg/

Update Server

cd ~/steamcmd
./steamcmd.sh +login your_steam_username your_steam_password +app_update 222860 validate +quit
sudo systemctl restart l4d2-server

Monitor Performance

top
netstat -tupn | grep 27015
du -sh ~/steamcmd/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server/

Troubleshooting

Server won't start: Run manually to see error messages

cd ~/steamcmd/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server
./srcds_run -game left4dead2 -console

Players can't connect: Verify UDP port 27015 is open, test with nmap -uU your_ip -p 27015

Map won't load: Ensure map name is correct, check maps/ folder for availability

Addons causing crashes: Remove the addon and rebuild the list

rm ~/steamapps/common/Left\ 4\ Dead\ 2\ Dedicated\ Server/left4dead2/addons/*

High CPU usage: Reduce maxplayers or disable unnecessary convars

Multiple Instances

Run multiple L4D2 servers on different ports:

# Instance 1
./srcds_run -game left4dead2 -console -port 27015 +exec server1.cfg &

# Instance 2
./srcds_run -game left4dead2 -console -port 27016 +exec server2.cfg &

Open both ports in your firewall.

Windows Server Setup

Step 1: Download Server on Windows

steamcmd +force_install_dir "C:\L4D2-Server" +login your_steam_username your_steam_password +app_update 222860 validate +quit

Step 2: Create server.cfg

Create C:\L4D2-Server\left4dead2\cfg\server.cfg (same as Linux guide in Configuration File section).

Step 3: Create Startup Batch

Create C:\L4D2-Server\start-server.bat:

@echo off
cd /d C:\L4D2-Server
srcds.exe -game left4dead2 -console -usercon +sv_pure 2 +map c1m1_apartment +maxplayers 8 +ip 0.0.0.0 -port 27015
pause

Step 4: Run as Service (Optional)

nssm install L4D2Server "C:\L4D2-Server\srcds.exe" "-game left4dead2 -console -port 27015 +exec server.cfg"
nssm start L4D2Server

Tips & Tweaks

sv_allow_lobby_connect_only Parameter

ValueBehavior
0Direct IP connect allowed, lobby optional
1Lobby only (strict, recommended for competitive)

Recommendation: Use 0 for public servers, 1 for competitive/closed groups.

Server.cfg Rate Settings

CVarValueImpact
sv_minrate20000Minimum bandwidth (prevent bottleneck)
sv_maxrate30000Maximum per-client bandwidth
sv_mincmdrate30Minimum client update rate
sv_maxcmdrate60Maximum client update rate
sv_minupdaterate10Minimum server update to client
sv_maxupdaterate100Maximum server updates per second

Sourcemod + L4DToolZ for Increased Slots

Extend server capacity beyond default 8 slots:

Installation:

  1. Download Sourcemod for Left 4 Dead 2
  2. Extract to left4dead2/addons/
  3. Download L4DToolZ plugin
  4. Place in left4dead2/addons/sourcemod/plugins/

Enable higher slots in server.cfg:

l4d_maxplayer 16

RCON Admin Commands

Access console via RCON:

telnet your_server_ip 27015
# Enter rcon_password when prompted
CommandPurpose
kick [player_id]Remove player
sm_kick [player_name]Sourcemod kick
sm_ban [player_name] [minutes]Temporary ban
sm_unban [steamid]Lift ban
map [mapname]Change map
say "[message]"Server broadcast

Next Steps

  • Install Sourcemod for advanced admin control
  • Configure L4DToolZ for increased player slots
  • Set up competitive mod settings if desired
  • Create custom campaign rotations
  • Monitor server stability on high player counts

On this page