Half-Life Dedicated Server on Ubuntu Intrepid (Steam Version)


This tutorial will walk you through installing the Half-Life Dedicated Server on Ubuntu Intrepid (8.10). In order to use this you must have a Steam Account to use.

Note: Running HLDS will consume large amounts of bandwidth. By installing this software you understand that you are responsible for these charges. You must have root access to perform this installation.

Download

The first thing we need to do is create a location to place our HLDS installation.

# mkdir /usr/hlds
# cd /usr/hlds

Now we need to download the HLDS installation from Steam. This will be accomplished with the wget command.

# wget http://www.steampowered.com/download/hldsupdatetool.bin

Add 32-bit support

Because the HLDS application is written in 32-bit and your server is 64-bit we need to install software libraries to help it execute the file.

# apt-get install lib32gcc1

Install

Now we are ready to install HLDS but first we need to make the file executable.

# chmod +x hldsupdatetool.bin

Now execute the file...

# ./hldsupdatetool.bin

You will be prompted to accept an agreement. Type yes and press <enter>.

Update HLDS

Once the installation has finished you will need to update your HLDS server. One thing that you need to decide before you update is what kind of server you will be running. This will be selected in the command line.

  • cstrike - Counter Strike
  • tfc - TFC
  • dod - Day of Defeat
  • "counter-strike source" - Counter Strike Source (you must include the quotes)

Once you have your game type selected go ahead and run the command below, substituting the values where necessary:

# ./steam -command update -game <your_game_type> -dir /usr/hlds -username <your_steam_username> 
    -password <your_steam_password>

<your_game_type> - The game type you selected above
<your_steam_username> - Your Steam username
<your_steam_password> - Your Steam password

This will force the Steam engine to load and perform an update. This will take a few minutes and will download new code.

Once it has completed your screen should look like this:

Checking bootstrapper version ...
Getting version 34 of Steam HLDS Update Tool
Downloading. . . . . . . . . . .
Steam Linux Client updated, please retry the command

Go ahead and run that command again to make sure the system is fully updated. Once it has completed you should see the following message:

HLDS installation up to date

Modify Game Configuration

Now you will need to modify your game configuration files. We will not cover this in the installation but a good site for information is here: https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Dedicated_Servers.

The configuration files are located in directories corresponding to the game type that you selected earlier. For instance if you selected cstrike then your configuration files would be located in /usr/hlds/cstrike/.

The following configuration files exist:
* server.cfg - This is where your server variables are stored
* motd.txt - When users first connect they will see this message
* mapcycle.txt - This file contains a list of the maps your server will play; one on each line.

If you are playing Counter Strike Source your server.cfg file will be located under the 'cfg' directory.

Start the Server

There are two methods to start HLDS depending on which game type you selected.

Half-Life 1 and associated mods

Change to the /usr/hlds directory...

cd /usr/hlds

Type the following command...

./hlds_run -game <your_game> +maxplayers 20 +map de_dust &

<your_game> - Game type you selected
20 - Max Number of Players
de_dust - The map you would like to play

Counter Strike Source

Change to the /usr/hlds directory...

cd /usr/hlds

Type the following command...

./srcds_run -game cstrike +maxplayers 20 +map de_dust &

Keep in mind that these are merely examples for starting a quick game. Many more command line arguments are avaialable here: https://developer.valvesoftware.com/wiki/Command_Line_Options

Please note that the server will be started in the background. To stop the server you will be required to kill the processes manually.

-- Kelly Koehn 13:57, 25 March 2009 (CDT)

 



Was this content helpful?




© 2014 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER