Do you have a VPS or dedicated server and want to install a game server on it? For example, a Left 4 Dead 2 Dedicated Server? You’re in the right place! Below, we’ll explain step by step how to install a service like this on your server.
You need SteamCMD to set up a Left 4 Dead 2 server. SteamCMD is the command-line version of the Steam client. With this tool, you can quickly and easily download dedicated server applications for popular Steam games. You can find SteamCMD on the official Valve Developer Community website: https://developer.valvesoftware.com/wiki/SteamCMD.
Next, download SteamCMD. The download includes the steamcmd.zip file, which you’ll need to extract first. We recommend creating a dedicated folder to extract the file into. Once extracted, you should see steamcmd.exe. Run it and wait for the installation process to finish.
Once the message Loading Steam API.... OK appears, the process is complete and you can start installing the Left 4 Dead 2 server.
After installation, you should be able to run commands in the Steam command line (steamcmd.exe). First, log in using the anonymous account. Run the following command: login anonymous
Next, install the server by running app_update 222840. App ID 222840 is for the Left 4 Dead 2 Dedicated Server application.
Please wait for the download to finish. This can take a while for larger games. Once the download is complete, a success message will appear.
To make the server visible and accessible from outside your network, you need to allow or forward the server ports in your firewall. To do this, open the Windows Firewall settings.
In the settings, you need to add new rules. Select the inbound and outbound rules as described below, then add rules for ports 27015-27020 using the TCP/UDP protocols.
You’ve now completed the basic installation of your Left 4 Dead 2 server. You can make further server configuration changes by editing the startup file. Navigate to your root directory. There, you’ll find the cfg folder, where you can open the server.cfg file and adjust the server options.
../steamapps/common/l4d2-ds/l4d2/cfg/server.cfg
To let other players join your server, you need to generate and add a Game Server Login Token (GSLT). This token authenticates your server with Steam. To create a GSLT, visit http://steamcommunity.com/dev/managegameservers and generate a token using Game ID 222840, which is for Left 4 Dead 2.
Once you have the token, add it to your server startup parameters using +sv_setsteamaccount <TOKEN>.
Now for the important part: start your server. Go to the game’s main directory and run the following startup command:
start srcds.exe -console -game l4d2 -secure +maxplayers 22 +map de_dust +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
You should now see logs in the command-line window indicating that the server started successfully. Note that the first start may take a little longer while everything is set up. Alternatively, you can connect directly by using the search function at the bottom of the server list and searching for [your_ip_address]:27015.
