Left 4 dead 2 dedicated server setup is pretty easy for both Windows and Linux Servers. The real trouble starts when you start adding mods and different configurations to your server. On a whole though you can expect your server to be up and running in no time!
Left 4 Dead 2 Server Ports:
Step One: Create a directory to hold the steamCMD file and Left 4 dead 2 Server files
- Create C:\steamcmd\
- Create C:\l4d2\
Step 2: Download SteamCMD and extract it to C:\steamcmd\
Step 3: Open command prompt and navigate to the SteamCMD files that we extract in step 2
- Click Start > Type: CMD > right click on command prompt > Run as Administrator
- In the black command window type: cd C:\steamcmd
Step 4: Run steamcmd, login, and download the left 4 dead 2 server files
- login anomymous (or your steam username)
- force_dir_install C:\l4d2 (This will change the download directory to the one we created for left 4 dead 2)
- app_update 222860 validate
This will take a bit to update and depends on your download speed.
Step 5: Create a server.cfg file inside the C:\L4D2\left4dead2\left4dead2\cfg
- Right click > Create new text file > change name to server.cfg
Step 6: Setup the config file how you want and save it.
- Check the Ex Server.cfg for how to do this
Step 7: Change windows firewall to allow people to connect to your server
- Click Start > Type: Windows Firewall > Open both TCP/UDP ports 27000-27015
Step 8: Start your left 4 dead 2 dedicated server!
- Right click srcds.exe > create shortcut
- Right click on the created shortcut and click properties
- Change the to field to C:\L4D2\left4dead2\srcds.exe -console -game left4dead2 -maxplayers 8 +sv_lan 0 +map c5m1_waterfront
Click the shortcut to start your server!
We will be doing everything from terminal so if your using KDE or another desktop environment open your terminal.
You may also want to install screen if you are remoting into your terminal
- sudo apt-get install lib32gcc1
- sudo apt-get install screen
Step 1: Create folders to hold both steamCMD and Left 4 dead 2
- sudo mkdir /steamcmd/
- sudo mkdir /l4d2/
Step 2: Navigate to the steamcmd directory and download steamCMD files
- cd /steamcmd/
- sudo wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
Step 3: Extract the downloaded files
- sudo tar -xvzf steamcmd_linux.tar.gz
Step 4: Start steamcmd and download left 4 dead 2
- sudo ./steamcmd
- login anomymous
- force_dir_install /l4d2/
- app_update 222860 validate
This will take a bit depending on your internet connection
Step 5: Create a server.cfg inside the /l4d2/left4dead2/cfg
- touch server.cfg
You need to setup the file depending on how you want your server to be. Check the Ex server.cfg tab for an example file on this. Use nano or VI and save the file.
Step 6: Start screen if are using a remote connect so that server stays on after you close your putty windows or ssh session. You can skip this step if your not using a remote connection
Step 7: Start the server using the following command. You will need to change this depending on your IP and other settings
- ~/l4d2/left4dead2/srcds_run +ip 192.168.1.20 -port 27015 +map c1m4_atrium -secure
You can change the config file in many ways here is a basic setup to get it started
hostname "servername" rcon_password "password" sv_search_key yourkey //sv_password "password" // Password protects server sv_allow_lobby_connect_only 0 hostfile "my_host.txt" //create custom hostfile else the //file will be overwritten after every update mp_disable_autokick 1 sv_alltalk 0 sv_consistency 1 //sv_contact "firstname.lastname@example.org" sv_voiceenable 1 sv_region 255 //sets region to all areas sv_log_onefile 0 sv_logbans 1 sv_lan 0 sv_pure "1" sv_cheats "0" //sv_gametypes "coop,versus,survival,scavenge" //sets gametypes //sv_unlag 1 //sv_maxunlag .5 //setmaster add 126.96.36.199:27011 //setmaster add 188.8.131.52:27011 sv_steamgroup "01234" //this is your group's steam group id. This option works with or without the quotes. //sv_steamgroup_exclusive 1 //to make it exclusive and private