Run Half-Life 2: Deathmatch as a Windows Service with FireDaemon Pro
Half-Life 2: Deathmatch (HL2:DM) is a first person action game. The dedicated server component can be run as a Windows Service using FireDaemon Pro, which allows you to have the dedicated server start automatically at boot prior to login. This guide will show you how to set it up. You can also use FireDaemon Fusion to manage FireDaemon and other Windows services via a web browser.
Download and Run SteamCMD once
First download and extract SteamCMD to C:\SteamCMD. At an elevated command prompt run SteamCMD once:
cd C:\SteamCMD steamcmd +quit
Download and Install Half-Life 2: Deathmatch Dedicated Server
Now download the game server. Type the following at an elevated command prompt:
cd C:\SteamCMD steamcmd +login anonymous +app_update 232370 validate +quit
Download and Install FireDaemon Pro
Download and Install DirectX
Download and install the Microsoft DirectX End User Runtime.
Create the Server Configuration File (server.cfg)
Use the sample config.cfg file at the end of this guide. At an elevated command prompt type:
cd "C:\SteamCMD\steamapps\common\Half-Life 2 Deathmatch Dedicated Server\hl2mp\cfg" notepad server.cfg
Cut and paste the sample configuration found at the end of this guide into Notepad and save the configuration.
Create the HL2 Deathmatch Dedicated Game Server Windows Service
Start FireDaemon Pro from the desktop shortcut. Click on the "Create a new FireDaemon service" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Adjust the paths to suit your installation. Note the various parameters listed in the tables below.
FireDaemon Pro Service Parameters
Parameter | FireDaemon Pro Parameter Description |
---|---|
Short Name | Short Name of the FireDaemon Pro Service |
Display Name | Display Name of the FireDaemon Pro service |
Description | Description of the Service |
Startup Type | Automatic (Delayed Start) |
Program | Full path to srcds.exe |
Working Directory | Directory you want the program to execute in |
Parameters | Various parameters passed to srcds.exe |
Source Dedicated Server Parameters
Parameter | Source Dedicated Server Parameter Description |
---|---|
-console | Runs the dedicated server in text based display mode |
-game | Loads the mod hl2mp |
-secure | Enables VAC (Valve Anti-Cheat) |
+map | Loads a specific map in the map in the map cycle (e.g. dm_lockdown) |
-autoupdate | Enables auto-update |
+log on | Turns disk logging on. Alternately you can use +log off |
+maxplayers | Limit the number of players that can connect to the dedicated server |
-port | The server port the dedicated servers runs on (e.g. -port 27015) |
+ip | The server public or private IP address the dedicated server is to listen on (e.g. +ip 192.168.1.10) |
+exec | Execute a specific server configuration file located in the cfg directory |
For more information regarding Source Dedicated Server parameters please see this Valve article.
Run the Dedicated Server Service!
Click on the tick box in the FireDaemon Pro GUI. The dedicated server should start on Session 0 per the screenshot below. You may need FireDaemon Zero and FireDaemon ZeroInput to access Session 0. Alternately, you can right click on your service in the FireDaemon Pro GUI and choose Start (in Session) via the Context Menu.
Sample Configuration File
Paste the lines below into the text file server.cfg in the cfg directory.
hostname "Half-Life 2: Deathmatch" rcon_password "CHANGEPASSWORD" fps_max 600 sv_allowdownload 1 sv_allowupload 1 net_maxfilesize 64 // Voice Comm sv_voiceenable "1" sv_alltalk 0 sv_pure 0 mp_chattime 20 sv_allowdownload 1 //sv_downloadurl "" mp_timelimit 20 mp_friendlyfire 0 mp_fadetoblack 1 mp_falldamage 0 mp_weaponstay 1 sv_region 0 sv_lan 0 // bandwidth rates/settings sv_minrate 0 sv_maxrate 0 sv_minupdaterate 10 sv_maxupdaterate 66 sv_mincmdrate 10 sv_maxcmdrate 66 sv_client_cmdrate_difference 1 sv_client_predict 1 sv_client_min_interp_ratio -1 sv_client_max_interp_ratio -1 //sv_timeout 300 sv_timeout 21600 decalfrequency 60 log on sv_logbans 1 sv_rcon_banpenalty 60 sv_rcon_maxfailures 10 sv_rcon_minfailures 5 sv_rcon_minfailuretime 45 // Source TV tv_enable 0 // Exec Configs exec banned_user.cfg mapcyclefile mapcycle.txt