Skip to content

How to Set Up a Half-Life 2 Dedicated Server on Windows

Learn how to quickly and easily set up a Half-Life 2 Dedicated Server on your VPS or Dedicated Server → Find out more

20 November 20262 min read25 Views0 helpful

Introduction

Do you have a VPS or Dedicated Server and want to install game servers on it? For example, a Half-Life 2 Dedicated Server? Then you're in the right place! Below, we'll explain step by step how to install this type of service on your server.

Preparation

SteamCMD is required to set up a Half-Life 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 page: https://developer.valvesoftware.com/wiki/SteamCMD.

Next, download it. The download contains the steamcmd.zip file, which you first need to extract. We recommend creating a separate folder and extracting the file there. You should then see steamcmd.exe. Run it and wait for the installation process to finish.

Once the message Loading Steam API.... OK appears, the process has completed successfully, and you can start installing the Half-Life 2 server.

Installation

After installation, you should be able to run commands in the Steam command line (steamcmd.exe). You need to log in there using the anonymous user. Run the following command: login anonymous

The next step is installation. Run the command app_update 232370. App ID 232370 is for the Half-Life 2 Dedicated Server application.

Please be patient while the download completes, as it can take some time for larger games. A confirmation message will appear once the process has completed successfully.

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.

You need to add additional rules in the settings. Click the inbound and outbound rules as described below, then add rules for the following ports: 27015-27020 for the TCP/UDP protocols.

Configuration

At this point, you’ve completed the basic installation of your Half-Life 2 server. You can change additional server settings 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. You can adjust server options here.

Code
../steamapps/common/hl2-ds/hl2mp/cfg/server.cfg

Register a GSL Token

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 232370, which is for Half-Life 2.

Once you have the token, add it to your server startup parameters using +sv_setsteamaccount <TOKEN>.

Start and Connect to the Server

Now for the important part: start your server. Go to the main game directory and run the following command:

Code
start srcds.exe -console -game hl2mp -secure +maxplayers 10 +map dm_runoff +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

You should now see logs in the command-line window indicating that the server started successfully. Note that the first startup may take a little longer while everything is set up. Alternatively, you can connect directly by using the search at the bottom of the server list and searching for [deine_ip_adresse]:2456.

Conclusion

Congratulations, you’ve successfully set up and configured your Half-Life 2 server on your VPS! If you have any further questions or run into any issues, our support team is here to help every day! 🙂

FAQ

Frequently asked questions

Access to your Windows server via Remote Desktop (RDP) and SteamCMD (the command-line version of the Steam client).
Download it from the official Valve developer page (developer.valvesoftware.com/wiki/SteamCMD). Extract the downloaded steamcmd.zip, then run steamcmd.exe and wait for 'Loading Steam API.... OK' to appear.
After running 'login anonymous', use the command 'app_update 232370' (Steam App ID 232370).

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 Users found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.