Installing Source DS
From SteamFriends Wiki
This article explains the basic procedure of how to install the Source Dedicated Server (a.k.a srcds) for both the Windows and Linux operating systems. The Source Dedicated Server is a free tool made available by Valve that allows just about anyone to run their own game server, whether it be on the internet or a private LAN.
Contents
|
Requirements
Before we begin, there are a few requirements that must be met:
- Approximately 1.1 GB of free hard drive space (varies depending on the mod)
- Port 27015 should be open (UDP and TCP) if you are behind a firewall and/or router
Installation
Installation of the Source Dedicated Server differs slightly depending on the operating system running, but either way, you begin by downloading the HLDS Update Tool.
Windows
Linux users may skip to the next section.
Setup
- Run the setup program by double clicking on hldsupdatetool.exe, and follow its series of steps. Be sure to select an install location that gives you plenty of disk space.
- You will find HldsUpdateTool.exe in the install directory which will be used to download the game server of your choice (Yes, it has the same name as the setup file, but we don’t know why).
Using HldsUpdateTool.exe
- Go to your Command Prompt by going to Start, Run, typing cmd in the text box, and clicking OK.
- Change to the directory that your HLDS Update Tool was installed to
- Type
cd "C:\Directory"
and press enter (use the directory you used during setup) - If it is on another drive, type
X:
press enter (X being the alternate drive letter), and repeat the above step
- Type
- Type
hldsupdatetool -command update -game "Counter-Strike Source" -dir .
This uses Counter-Strike Source as an example, and installs to the current directory. If you want to install a Day of Defeat: Source server or something else, you can view the list of available games by typinghldsupdatetool -command list
. - If all goes well, you should see something like this:
C:\srcds>hldsupdatetool -command update -game "Counter-Strike Source" -dir . Checking bootstrapper version ... Updating Installation No installation record found at C:\srcds Checking/Installing 'Counter-Strike Source Shared Content' version 64
- At this point, it will begin to download all of the files necessary to run a game server for Source. This will take quite a while, so you might want to go refill your coffee and grab a few donuts while you wait… or maybe even grab some popcorn and watch a movie.
Linux
Windows users may skip to the next section.
Setup
- Go to your Linux terminal using your medium of choice (SSH, locally, etc.)
- Change to the directory that hldsupdatetool.bin was downloaded to
cd /path/to/directory
- Move the file hldsupdatetool.bin to the directory that you want srcds to be installed to (unless, of course, it is already where you want it).
mv hldsupdatetool.bin /path/to/directory
- Make sure the file has execution rights by typing
chmod +x hldsupdatetool.bin
- Execute the setup file by typing
./hldsupdatetool.bin
and follow its series of steps. - You will find an executable named steam in the install directory which will be used to download the game server of your choice.
Using steam
- Type
./steam -command update -game "Counter-Strike Source" -dir .
This uses Counter-Strike Source as an example, and installs to the current directory. If you want to install a Day of Defeat: Source server or something else, you can view the list of available games by typing./steam -command list
. - If all goes well, you should see something like this:
$ ./steam -command update -game "Counter-Strike Source" -dir . Checking bootstrapper version ... Updating Installation No installation record found at C:\srcds Checking/Installing 'Counter-Strike Source Shared Content' version 64
- At this point, it will begin to download all of the files necessary to run a game server for Source. This will take quite a while, so you might want to go refill your coffee and grab a few donuts while you wait… or maybe even grab some popcorn and watch a movie.
Running Your Server
After the HLDS Update Tool has finished downloading and installing the game server files, the next logical step is to start the server. On Windows, you can simply double click srcds.exe and it will guide you through some simple steps to run a simple server, but it is recommended to run in console mode instead…and Linux users have no choice. 🙂 To do that, there are a series of arguments that you run srcds under.
Windows
C:\srcds>srcds -console -autoupdate -game cstrike +map de_dust2 +maxplayers 16
Linux
$ ./srcds_run -console -autoupdate -game cstrike +map de_dust2 +maxplayers 16
This is basically the bare minimum required to run the server in console mode, while keeping your server automatically updated. However, there are several other things you can do through these arguments, such as set a higher tickrate, set a console variable, as well as set the IP and port srcds listens on.
-tickrate 100
(set your tickrate to 100)+fps_max 500
(sets console variable fps_max to 500)-ip 1.2.3.4 -port 27030
(sets the listening IP and port to 1.2.3.4:27030)
Note: The server can only listen on an IP that is available on the network. You cannot just pick any IP address.
That is all you need to know to get your game server running.