Installing Half-Life 2 DeathMatch Dedicated Server

info:Download steam-boiler to install steam and boiler.
author:Erik Southworth
version:49
revision:July 30, 2012
description:Linux Reference Manual

Typical Installation in 3 Easy Steps

Assuming you have installed Steam-Boiler and have logged in to a normal user account. The following shell session demonstrates how a typical installation is accomplished. Open a shell terminal and follow these steps.

1. Make directory (if required) and change directory to where user gameserver downloads are to be stored. Here we call it ‘Gameserver’.

  • $ mkdir -pv ~/Gameserver/orange-box
  • $ cd ~/Gameserver
[~]$ mkdir -pv ~/Gameserver/orange-box
mkdir: created directory `/home/user/Gameserver'
mkdir: created directory `/home/user/Gameserver/orange-box'
[~]$ cd ~/Gameserver
[Gameserver]$
  1. Download dedicated server files from Valve content servers.
  • $ steam -command update -game hl2mp -dir orange-box
[Gameserver]$ steam -command update -game hl2mp -dir orange-box
+ steam -command update -game hl2mp -dir /home/user/Gameserver/orange-box
Checking bootstrapper version ...
Updating Installation
No installation record found at /home/user/Gameserver/orange-box/orangebox
Checking/Installing 'Half-Life 2 Deathmatch' version 36

2.44%       downloading /home/user/Gameserver/orange-box/orangebox/hl2mp/bin/client.dll
7.88%       downloading /home/user/Gameserver/orange-box/orangebox/hl2mp/bin/client.dylib
12.75%      downloading /home/user/Gameserver/orange-box/orangebox/hl2mp/bin/server.dll
...
99.99%      downloading /home/user/Gameserver/orange-box/orangebox/bin/vphysics.so
100.00%     downloading /home/user/Gameserver/orange-box/orangebox/hl2/resource/serverevents.res
100.00%     downloading /home/user/Gameserver/orange-box/orangebox/srcds_linux

HLDS installation up to date


+ Checking steam symlink in /home/user/Gameserver/orange-box/orangebox ...  ok
[Gameserver]$

Tip

Using Steam-Boiler simplifies the command-line to steam update hl2mp orange-box instead of steam -command update -game hl2mp -dir orange-box.

3. Change directory to where the run-script is located and test the dedicated server.

  • $ cd ~/Gameserver/orange-box/orangebox
  • $ ./srcds_run -game hl2mp +map dm_lockdown +ip 0.0.0.0
[Gameserver]$ cd ~/Gameserver/orange-box/orangebox
[srcds]$ ./srcds_run -game hl2mp +map dm_lockdown  +ip 0.0.0.0
Auto detecting CPU
Using default binary: ./srcds_linux
Server will auto-restart if there is a crash.
Using breakpad minidump system
Using breakpad crash handler

Console initialized.
ConVarRef mat_dxlevel doesn't point to an existing ConVar
Game.dll loaded for "Half-Life 2 Deathmatch"
...
Network: IP 0.0.0.0, mode MP, dedicated Yes, ports 27015 SV / 27005 CL
Executing dedicated server config file
Precache of sprites/redglow1 ambigious (no extension specified)
Precache of sprites/redglow1 ambigious (no extension specified)
[S_API FAIL] SteamAPI_Init() failed; unable to update local steamclient.dll. Continuing with current version anyway.
Installing breakpad exception handler for appid(srcds_linux)/version(1.0)
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
exec: couldn't exec server.cfg
Installing breakpad exception handler for appid(srcds_linux)/version(1.0)
Connection to Steam servers successful.
   VAC secure mode is activated.

Use CTRL-C to exit...

Hint

srcds_run also accepts some other, not widely useful, options. Run ./srcds_run -help for more details. All command-line options are passed through to the gameserver binary. Server cvars are specified on the command-line using the notation +CVAR VALUE. (i.e. +map de_dust)

Important

The +IP specified is normally within the local network range 192.168.xxx.xxx for underground (cable/DSL) hosted servers or wildcard 0.0.0.0 for all available interfaces. (i.e. +ip 192.168.1.15)