background image
Game Servers 380 7 Days to Die 4 Abiotic Factor 2 Aloft 2 alt:V 2 Americas Army Proving Grounds 2 Among Us 2 Archean 2 ARK Survival Ascended 6 ARK Survival Evolved 3 Arma 3 3 Arma Reforger 2 Aska 2 AssaultCube 2 Assetto Corsa 3 Astro Colony 2 Astroneer 2 Automobilista 2 2 Avorion 2 Banana Shooter 2 Barotrauma 3 BATTALION Legacy 2 BeamNG.drive (BeamMP) 2 Black Mesa 2 Brickadia 2 Call of Duty 2 Citadel: Forged with Fire 2 ClassiCube 2 Clone Hero 2 Colony Survival 2 Conan Exiles 4 Contagion 2 Core Keeper 2 Counter-Strike 2 3 Craftopia 2 CryoFall 2 CS2D 2 Cube 2: Sauerbraten 2 Cubic Odyssey 2 DayZ 4 DDNet 2 DDRaceNetwork 2 Dead Matter 2 Dont Starve Together 4 Eco 2 Empyrion Galactic Survival 2 Enshrouded 3 Escape from Tarkov 2 Euro Truck Simulator 2 2 Factorio 2 Farming Simulator 25 2 Fistful of Frags 2 FiveM 3 FortressCraft Evolved 2 Foundry 2 Foundry VTT 2 Frozen Flame 2 FTL Tachyon 2 Garrys Mod 3 Ground Branch 2 Half-Life 2 Deathmatch 2 Hogwarp 2 Holdfast: Nations at War 2 HumanitZ 2 Hurtworld 2 Hytale 1 Icarus 2 Insurgency Sandstorm 2 IOSoccer 2 Just Cause 3 Multiplayer 2 Kerbal Space Program 2 Killing Floor 2 3 LeagueSandbox 2 Left 4 Dead 2 Left 4 Dead 2 3 Longvinter 2 Los Angeles Crimes 2 Medal of Honor 2 Midnight Ghost Hunt 2 Mindustry 2 Minecraft 4 Minetest 2 Modiverse 2 Mordhau 3 Mount & Blade II: Bannerlord 2 Myth of Empires 2 Nazi Zombies Portable 2 Necesse 2 NeosVR 2 Neverwinter Nights EE 2 Night of the Dead 2 Nightingale 2 No Love Lost 2 No More Room in Hell 2 No One Survived 2 Nova-Life Amboise 2 Nuclear Option 2 Onset 2 Open Fortress 2 OpenArena 2 OpenRA 2 OpenRCT2 2 OpenTTD 2 Operation Harsh Doorstop 2 Palworld 3 Path of Titans 2 Pavlov VR 3 PixARK 2 Plains of Pain 2 Portal Knights 2 Post Scriptum 2 Project Zomboid 8 Puck 2 Quake Live 2 R5Reloaded 2 RedM 2 Renown 2 Resonite 2 Return to Moria 2 Rimworld Together 2 Rising World 2 Risk of Rain 2 1 Rust 4 Satisfactory 1 SCP Secret Laboratory 3 SCUM 2 Smalland 2 Solace Crafting 2 Soldat 2 Soldat 2 2 Sonic Robo Blast 2 2 Sons of the Forest 2 Soulmask 2 SourceCoop 2 Space Engineers 3 Space Station 14 2 Squad 3 Starbound 3 StarMade 2 Stationeers 2 Stormworks 2 Subnautica Nitrox 2 Sunkenland 2 SuperTuxKart 2 Sven Co-op 2 Swords 'n Magic and Stuff 2 Team Fortress 2 3 Teeworlds 2 Terraria 3 TerraTech Worlds 2 TF2 Classified 2 The Forest 3 The Front 2 The Isle 2 Tower Unite 2 Trackmania 2 Unturned 4 Urban Terror 2 V Rising 3 Valheim 3 VEIN 2 Veloren 2 Vintage Story 3 Voyagers of Nera 2 Wolfenstein: Enemy Territory 2 Wreckfest 2 Wurm Unlimited 2 Xonotic 2 Zandronum 2 Getting Started 2 Network & Connectivity 1 Server Management 2
Categories

Left 4 Dead 2 Server Setup Guide


This guide covers how to configure and connect to your Left 4 Dead 2 dedicated server hosted with Legion Hosting, including server.cfg settings, GSLT token setup, game modes, custom campaigns, and Workshop add-ons.

Stop your server before editing configuration files or installing add-ons. Always stop your server from the GPanel Console tab before modifying any files. Changes made while the server is running may be overwritten or cause crashes on next restart.

Step 1 — Locate and Edit server.cfg

Left 4 Dead 2 reads its core server configuration from left4dead2/cfg/server.cfg. This file is created automatically the first time the server starts. If it does not exist, you can create it manually using the GPanel file manager.

  1. Log in to GPanel and select your Left 4 Dead 2 server.
  2. Stop the server if it is running.
  3. Click the Files tab and navigate to left4dead2/cfg/.
  4. Open or create server.cfg and add the settings below.

Core server.cfg Settings

// ── Server Identity ─────────────────────────────────────────────
hostname        "My Legion L4D2 Server"
sv_password     ""                  // Leave empty for a public server
maxplayers      8                   // L4D2 max is 32; standard co-op uses 4-8

// ── Game Mode ────────────────────────────────────────────────────
mp_gamemode     "coop"              // coop | versus | survival | scavenge
sv_gametypes    "coop,versus,survival,scavenge"

// ── Network ──────────────────────────────────────────────────────
sv_region       255                 // 255 = worldwide
sv_lan          0                   // 0 = internet server
sv_alltalk      0

// ── GSLT (Steam Game Server Login Token) ─────────────────────────
sv_setsteamaccount "YOUR_GSLT_TOKEN_HERE"

// ── Cheats / Consistency ─────────────────────────────────────────
sv_cheats       0
sv_consistency  0                   // Set to 0 to allow custom content; see notes

// ── Logging ──────────────────────────────────────────────────────
log             on
sv_logbans      1
sv_logecho      1
sv_logfile      1
ConVar Values Description
hostname Any string The name shown in the Steam server browser and lobby browser.
sv_password String or empty Password required to join. Leave empty for a public server.
maxplayers 132 Maximum simultaneous player slots. Standard co-op uses 4, versus uses 8, but modded servers often set this higher.
mp_gamemode coop versus survival scavenge Active game mode. Must match a value listed in sv_gametypes.
sv_gametypes Comma-separated list Game modes the server is allowed to host. The lobby browser filters by this list.
sv_consistency 0 or 1 When set to 1, all clients must have identical files to the server. Set to 0 to allow custom content such as custom campaigns or sound packs without kicking players.
sv_lan 0 or 1 Set to 0 for an internet-accessible server. Setting to 1 makes the server LAN-only and prevents it from appearing in the public browser.
Tip: To host a Realism or Realism Versus match, set mp_gamemode to realism or realism_versus and add those values to sv_gametypes.

Step 2 — Set Up a GSLT Token

A Game Server Login Token (GSLT) is required for your server to be listed on the Steam master server and visible in the public server browser. Without a valid token, the server will still run but may not appear in listings and can be delisted by Valve.

  1. Log in to your Steam account and go to the Steam Game Server Account Management page.
  2. Enter App ID 550 (Left 4 Dead 2) and a memo to identify the token.
  3. Click Create and copy the generated token.
  4. Paste it into server.cfg as the value for sv_setsteamaccount.
  5. Save the file and restart the server. The console will confirm the token was accepted with a message like SteamGameServer connected to Steam successfully.
One token per server. Each GSLT is tied to one running server instance. If you run multiple servers, generate a separate token for each one. Reusing the same token across instances will cause authentication failures.

Step 3 — Install Custom Campaigns

Custom campaigns for Left 4 Dead 2 are distributed as .vpk (Valve Pak) files. Installing them on your dedicated server makes them available for server-side play and ensures all connected clients can access the map data.

  1. Download the campaign's .vpk file(s). Campaigns often come as a pair — for example campaign_dir.vpk and campaign_000.vpk — upload all provided files.
  2. Upload the .vpk files to left4dead2/addons/ on your server via SFTP. See the SFTP upload guide if you need help connecting.
  3. Restart the server. The Source engine automatically indexes .vpk files in the addons directory on startup.
  4. To load the campaign, change the map using the server console:
    changelevel c1m1_hotel          // Change to official map
    changelevel custom_map_name     // Change to your custom campaign's first map
Clients also need the campaign files. Players must have the same campaign .vpk installed in their own Left 4 Dead 2 addons/ folder, or subscribed via the Steam Workshop, to join a server running a custom campaign. The server console will display an addon consistency error for clients who are missing files if sv_consistency 1 is set.

Addon Consistency Setting

If you want to allow players to join even if they do not have the custom campaign locally, set sv_consistency 0 in server.cfg. This disables file hash checking. Note that this also means clients can run arbitrary local modifications without being kicked.

sv_consistency 0    // Allow joins without matching addon files

Step 4 — Steam Workshop Add-Ons

Left 4 Dead 2 dedicated servers can subscribe to Steam Workshop content, but the recommended method for servers is to download Workshop items and deploy them as .vpk files rather than relying on Workshop auto-download, which is not fully supported in dedicated server mode.

Recommended Workflow

  1. Subscribe to the Workshop item on your personal Steam account and allow it to download to your local Left 4 Dead 2 installation.
  2. Find the downloaded content in your local Steam Workshop cache — typically at Steam/steamapps/workshop/content/550/ on your local machine.
  3. Copy the .vpk file(s) from the Workshop cache folder.
  4. Upload those .vpk files to left4dead2/addons/ on your Legion Hosting server via SFTP.
  5. Restart the server. The add-on will be active on next startup.
Workshop items that modify sound, models, or textures (skins, sound replacements) should not require clients to have the same files if sv_consistency 0 is set. However, clients who do not have the item will see default assets instead of the custom content.

Step 5 — Connecting to Your Server

There are three ways to connect to a Left 4 Dead 2 dedicated server. Your server's IP address and port can be found on the Network tab in GPanel. See the how to find your server IP and port guide for details.

Method 1 — In-Game Console (Direct Connect)

Open the developer console with the tilde key (~) and type:

connect YOUR.SERVER.IP:PORT
connect YOUR.SERVER.IP:PORT; password yourpassword    // If password protected
Check GPanel Network tab for your server's IP address and port number. Do not assume the default port — your assigned port may differ.

Method 2 — Steam Server Browser

  1. In Steam, open View > Game Servers.
  2. Click the Favourites tab, then Add Server.
  3. Enter your server's IP and port as shown in GPanel (e.g. 1.2.3.4:12345) and click Find Games at this Address.
  4. Double-click the server entry to join.

Method 3 — Lobby System

If your server is publicly listed with a valid GSLT token, players can find it through the in-game lobby browser under Play > Find a Server. Filter by game mode and region. The server must have the correct mp_gamemode and sv_gametypes set to appear in the appropriate lobby filter.

Connection Method Best For Requirements
Console direct connect Quick access, password-protected servers, custom ports Developer console enabled in game options
Steam server browser Adding to favourites, checking server status before joining Correct IP and port from GPanel Network tab
In-game lobby browser Public servers with standard game modes Valid GSLT token, sv_lan 0, correct sv_gametypes

Related Articles

If you continue to experience issues after following this guide, open a support ticket at legionhosting.net/submitticket.php and include your server ID, the error messages from the console log, and a description of the steps you have already taken.

Was this article helpful?

Ready to Get Started?

The servers are booted, select your plan and become our latest satisfied client.