Personal tools

Install SRCDS on Linux
Jump to: navigation, search

Download and first run

Login via your local user account (NEVER use the "root" account to run a server!)

Make a directory off your home directory called srcds:

mkdir /home/srcds

Download the Linux installation file and save it to srcds:

cd /home/srcds/
wget http://storefront.steampowered.com/download/hldsupdatetool.bin

Once it is downloaded, to make the hldsupdatetool.bin file executable type:

chmod u+x hldsupdatetool.bin

Which means that the current user can execute it.

Then run it by using this command:

./hldsupdatetool.bin

Type "yes" when prompted if you agree with the EULA, and then the contents will be extracted.

  • Ubuntu Server v9.04 (and possibly earlier) 64 bit (and possibly other 64 bit Linux distributions) needs the "lib32gcc1" package installed, or you won't be able to execute hldsupdatetool.bin
  • If you get an uncompress error, then either symlink gunzip to uncompress, or use your distro's package manager to install "ncompress".
You will then see the newly extracted steam executable in the current directory. It may need to be updated, which it will do automatically anytime it is run, so go ahead and run it once with no options.
./steam

If the update is complete or no update is needed you will get the help message if you run the above command.

Install a game

To install a game you will need to type out the following command, using Half-Life 2 Death Match as an example:

./steam -command update -game hl2mp -dir .
  • That command will automatically create a directory named after the "-game" parameter passed if using the above example, otherwise manually create the directory you wish the server files to be downloaded to, and change the "." to the desired directory name. It may take some time to download the content, depending on your country and if the content servers are being hammered due to an update.
Once the content is downloaded, you can start your server using the following command from within the automatically created hl2mp / manually specified directory:
./srcds_run -game hl2mp +map dm_underpass +maxplayers 20 +ip 192.168.0.1 +port 27015
  • Because of how Linux works with SRCDS, it will actually bind to the localhost IP address (127.0.0.1) so you must specify what IP you want the server to actually listen on. Replace the 192.168.0.1 with the actual IP.
  • SRCDS by default also opens and runs on port 27015 – if you plan on running multiple game servers on bound to the same IP address, you'll have to specify which port to run them on as well.


And there you go – a fully functioning, albeit a VERY basic Half-Life 2 Death Match server. Read on for advanced settings, like where to set your server name or remote console (RCON) password, and running the server without being logged in.

Screenshots

Here's a screenshot by screenshot representation of the previous text:
Getting and running hldsupdatetool.binAccepting the EULAUpdating the Steam applicationInstalling Half-Life 2 Deathmatch via the Steam applicationFinishing the installation of Half-Life 2 Deathmatch

--Banana 13:53, 18 July 2009 (UTC)

cool hit counter