Left 4 Dead 2

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.

02

System Requirements

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.

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

Install SteamCMD

Update your system and install dependencies:

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

Create a dedicated user:

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

Install Left 4 Dead 2 Server

Download the server using SteamCMD (AppID 222860):

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

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

Configuration File

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

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

Difficulty levels:

  • c1m1_apartment — No Mercy
  • c2m1_highway — Crash Course
  • c3m1_plankcountry — Swamp Fever
  • c4m1_milltown_a — Hard Rain
  • c5m1_waterfront — The Parish
  • 0 — Easy
  • 1 — Normal
  • 2 — Hard
  • 3 — Impossible
06

Launch Server

Basic command:

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

Launch parameters:

Custom Startup Script

Create start-l4d2.sh:

bash
nano ~/start-l4d2.sh
bash
#!/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
bash
chmod +x ~/start-l4d2.sh
./start-l4d2.sh
  • -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
07

Port Configuration

Open required ports:

bash
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)
08

Systemd Service

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

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

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

Check status:

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

Custom Campaigns and Addons

Add Workshop Content

Download mods via SteamCMD:

bash
./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:

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

Addon types:

SourceTV (Spectator Mode)

Enable SourceTV in server.cfg:

tv_enable 1 tv_port 27020 tv_maxclients 32 tv_autorecord 1 tv_name "L4D2 SourceTV"
  • .vpk — Mod packages
  • .bsp — Custom maps
  • Extracted folders — Loose addons
10

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
11

Backup and Maintenance

Backup Server Configuration

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

Update Server

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

Monitor Performance

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

Troubleshooting

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

bash
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

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

High CPU usage: Reduce maxplayers or disable unnecessary convars

13

Multiple Instances

Run multiple L4D2 servers on different ports:

bash
# 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.

14

Windows Server Setup

Step 1: Download Server on Windows

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

batch
@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)

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

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:

Enable higher slots in server.cfg:

l4d_maxplayer 16

RCON Admin Commands

Access console via RCON:

bash
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
  • Download Sourcemod for Left 4 Dead 2
  • Extract to left4dead2/addons/
  • Download L4DToolZ plugin
  • Place in left4dead2/addons/sourcemod/plugins/
16

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

DeluxHost, opgericht in 2023, biedt hoogwaardige hostingoplossingen voor diverse digitale behoeften. Wij bieden gedeelde hosting, VPS en dedicated servers met geavanceerde beveiliging en wereldwijde datacenters.

© DeluxHost, Alle rechten voorbehouden. | BTW-nummer: IT17734661006
Alle systemen operationeel