Left 4 Dead 2 Updated April 29, 2026

Running L4D2 Server as a Linux systemd Service

Set up a systemd service for your Left 4 Dead 2 dedicated server so it starts on boot and restarts after crashes. Includes a complete unit file with GSLT token and management commands.

Left 4 Dead 2L4D2Linuxsystemdserviceautostartcrash recovery

Running L4D2 as a systemd Service

systemd keeps your server running on boot and auto-restarts after crashes — no screen sessions needed.


Step 1 — Create a Dedicated User

sudo useradd -m -s /bin/bash steam

Install the server files under /home/steam/l4d2-server/ as this user.


Step 2 — Create the Unit File

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

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

[Service]
Type=simple
User=steam
WorkingDirectory=/home/steam/l4d2-server
ExecStart=/home/steam/l4d2-server/srcds_run \
    -console \
    -game left4dead2 \
    -secure \
    -port 27015 \
    +maxplayers 8 \
    +sv_setsteamaccount YOUR_GSLT_TOKEN \
    +exec server.cfg \
    +map c1m1_hotel
Restart=on-failure
RestartSec=10
KillSignal=SIGTERM
StandardOutput=journal
StandardError=journal
SyslogIdentifier=l4d2server

[Install]
WantedBy=multi-user.target

Replace YOUR_GSLT_TOKEN with your actual Game Server Login Token.


Step 3 — Enable and Start

sudo systemctl daemon-reload
sudo systemctl enable l4d2server
sudo systemctl start l4d2server
sudo systemctl status l4d2server

Managing the Service

Command Effect
sudo systemctl start l4d2server Start the server
sudo systemctl stop l4d2server Graceful shutdown
sudo systemctl restart l4d2server Restart
sudo systemctl status l4d2server Status + last log lines
journalctl -u l4d2server -f Live log stream
journalctl -u l4d2server -n 100 Last 100 log lines

Updating the Server

sudo systemctl stop l4d2server
sudo -u steam /home/steam/steamcmd/steamcmd.sh \
  +force_install_dir /home/steam/l4d2-server \
  +login anonymous \
  +app_update 222860 \
  +quit
sudo systemctl start l4d2server

Multiple Instances

Create additional unit files (l4d2server-2.service, etc.), each with different ports:

ExecStart=/home/steam/l4d2-server/srcds_run \
    -console -game left4dead2 -secure \
    -port 27016 \
    +maxplayers 8 \
    +sv_setsteamaccount YOUR_TOKEN_2 \
    +exec server2.cfg \
    +map c2m1_highway

Note that each server instance should have its own GSLT token.