Left4Dead 2 Dedicated Server Setup Guide

No Image

Left4dead 2 the sequel to the record breaking survival shooter Left4dead has been performing pretty well with bugs until recently after getting all patched up. If you have been enjoying the game on international servers, its time you make one of your own to play Left4dead 2 in a lag free setting.

Left4dead 2 Server Prerequisites

1. Good Connection.
2. Good Machine.
3. Port forwarding “UDP: 27015 and 27006″
4.You will need a static IP.

Download and Install Left4dead 2 Dedicated Server

1. Download hldsupdatetool.exe Valve’s server tool. This tool will be used to download and update source dedicated server.
2. Run hldsupdatetool and install it in a folder say C:/SRCDS.
3. Now go to the folder containing hldsupdatetool say C:/SRCDS and double click it to update.
4. To download Left4dead 2 dedicated server you need to create a batch file.
-Create a new text file in C:/SRCDS, rename it to “Update.bat” and add the following code in it.

hldsupdatetool.exe -command update -game left4dead2 -dir .
pause

-Save update.bat. Now double click it to start downloading Left4dead 2 dedicated server files. (This may take some time depending on your Internet connection).

Configure Left4Dead 2 Dedicated Server

Create a new text file in “C:\SCRDS\left4dead2\left4dead2\cfg” and rename it to “server.cfg” and add the following code.

hostname YourServerName
rcon_password “YourRCONpassword”
sv_password “” // only needed to make your server private.
sv_contact “your@email.com”

hostport 27016
sv_lan 0 // enable LAN = 1; disable LAN = 0
sv_region 255
sv_allow_lobby_connect_only 0 //enable/disable Lobby connections 1/0

mp_disable_autokick 1 //disables autokick=1
sv_allow_wait_command 0
sv_alltalk 1
sv_alternateticks 0
sv_clearhinthistory 0
sv_consistency 1
sv_pausable 0
sv_voiceenable 1
sv_cheats 0
sv_forcepreload 1
sv_pure_kick_clients 0

setmaster add 188.40.40.201:27011 // for setti masterserver
exec banned_user.cfg
exec banned_ip.cfg

sv_log_onefile 0
sv_logbans 1
sv_logecho 0
sv_logfile 1
sv_logflush 0
sv_logsdir logs

sv_minrate 30000
sv_maxrate 60000
sv_minupdaterate 66
sv_maxupdaterate 101
sv_mincmdrate 66
sv_maxcmdrate 101

Edit to add your own server name, rcon password and contact info.This is a basic Left4Dead 2 cfg so you can edit to your own liking if you want.

How to Start Left4Dead 2 Server

There are many ways you can start Left4Dead 2 server, mainly via making a shortcut to srcds.exe, or by making a batch file.

Create Left4Dead 2 Server Startup Shortcut
1. Go to “C:\SRCDS\left4dead2″, right click on “srcds.exe” and create a shortcut.
2. Go to the properties of this shortcut. Now you need to add few parameters in the “Target” line of this shortcut to get the server started.
Left4Dead 2 Server Startup Parameters

“C:\SRCDS\left4dead2\srcds.exe”-console -game left4dead2 +hostip YOUR.WAN.IP.ADD -ip YOUR.LAN.IP.ADD +hostport 27016 +clientport 27006 -nohltv +exec server.cfg +map c5m1_waterfront

Edit it with your external IP address in place of “YOUR.WAN.IP.ADD” and your internal ‘static’ IP address in place of “YOUR.LAN.IP.ADD”. You can change the map to your own liking by editing the map name after “+map”.
Note: Tap space bar once to add a space after “\srcds.exe” and before “-console.
Once you have done all that click OK to save the changes and double click the shortcut to start your server.

Left4Dead 2 Server Crash Protection Startup Batch File
1. Go to “C:/SRCDS” create a text file, and rename it to “Left4Dead2Server.bat”.
2. Now add following lines of code to make a crash protection Left4Dead 2 server startup batch file.

@echo off
cls
echo Protecting srcds from crashes…
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds.com Watchdog
:srcds
echo (%time%) srcds started.
start /wait left4dead2\srcds.exe -console -game left4dead2 +hostip YOUR.WAN.IP.ADD -ip YOUR.LAN.IP.ADD +hostport 27016 +clientport 27006 -nohltv +exec server.cfg +map l4d_hospital05_rooftop
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

Edit it with your external IP address in place of “YOUR.WAN.IP.ADD” and your internal ‘static’ IP address in place of “YOUR.LAN.IP.ADD”.You can change the map to your own liking by editing the map name after “+map”. Double clicking “Left4Dead2Server.bat” will start Left4Dead 2 server with crash protection.

Updating the Left4Dead 2 Server

Update the game using Left4Dead 2 hldsupdate tool.

Notes
1. If you want to connect to your own Left4Dead 2 Dedicated server, use this command BEFORE starting the lobby.

mm_dedicated_force_servers ServerIP

You also have to be the lobby leader, replace the “ServerIP” with the IP of your server and it will connect to your dedicated server.

3. You can follow these Left4Dead 2 tutorials to help you run your server smoothly. Install Sourcemod and Metamod, add admin option if not available, and follow this guide on how to change gametypes in Left4Dead 2.

By Zawad Iftikhar

Zawad is the lead editor here and it's him who manages what gets published on the site. When not working on SegmentNext, he likes to relax with a few PC games.

related posts

Around The Network
    • The Friendly Ghost

      hi, there’s still something I cant figure out. The part where you start your own server. I’m supposed to create a shorcut to “C:\SRCDS\left4dead2\srcds.exe” but i dont even have the folder SRCDS in “C:\” or the file “srcds.exe” in my left4dead2 folder. I could really use some help with this.
      Thanks

    • Richie

      For the update command,
      just create a new txt file,
      insert the commands,
      “save as” update.bat

    • Nicus_X

      Create file Update.bat with Windows Note Pad. No with document text. No tast right.

    • http://www.segmentnext.com rattlesnake

      Are you sure that your file extension is .bat and its the notpad file u are using?
      Anyways you can also use hldsupdate tool for the same purpose.

    • youly

      hi…when i open update.bat….it opens as a text document…no update running or smt…can u help me?