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.
How to Setup Left4Dead 2 Dedicated Server
Following are the pre-requisites you should have before setting up Left4Dead 2 dedicated server:
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 .
-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.
sv_password “” // only needed to make your server private.
sv_lan 0 // enable LAN = 1; disable LAN = 0
sv_allow_lobby_connect_only 0 //enable/disable Lobby connections 1/0
mp_disable_autokick 1 //disables autokick=1
setmaster add 18.104.22.168:27011 // for setti masterserver
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 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
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.
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.
1. If you want to connect to your own Left4Dead 2 Dedicated server, use this command BEFORE starting the lobby.
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.