Source Dedicated Server: Difference between revisions
(added official steam support guides) |
(added a more general "how to run a server" guide) |
||
Line 19: | Line 19: | ||
{{note|A residential internet connections may not have the upload capacity to support large games.}} | {{note|A residential internet connections may not have the upload capacity to support large games.}} | ||
== | == Installation == | ||
See [[SteamCMD]] for newer games such as [[Counter-Strike: Global Offensive|CS:GO]]. See [[HLDSUpdateTool]] for all other games. | |||
=== For modders === | |||
{{note|The Source 2006 dedicated server has been removed from Steam, leaving only the Source 2009 version (its GCF says 2007, but don't be fooled). Mods, whether for 2006 or 2007, can now only be run from SRCDS installs. Errors about "SetupArrayProps_R" will appear if you mix versions.}} | {{note|The Source 2006 dedicated server has been removed from Steam, leaving only the Source 2009 version (its GCF says 2007, but don't be fooled). Mods, whether for 2006 or 2007, can now only be run from SRCDS installs. Errors about "SetupArrayProps_R" will appear if you mix versions.}} | ||
{{note|The HLDS Update Tool does not provide [[Lost Coast]], even though [[SDK Base]] does. Multiplayer mods should either not use anything from Lost Coast, or include what they do use in their dedicated server download.}} | {{note|The HLDS Update Tool does not provide [[Lost Coast]], even though [[SDK Base]] does. Multiplayer mods should either not use anything from Lost Coast, or include what they do use in their dedicated server download.}} | ||
# Install [[HLDSUpdateTool]] | |||
# Run the update tool with <code>-command update -game orangebox</code>. Optionally, add <code>-dir <path></code> to download to a custom location. | |||
# Install | |||
# | |||
# To start the server, run <code>orangebox\srcds.exe -console -game [[Game Directory|<vproject>]]</code>. | # To start the server, run <code>orangebox\srcds.exe -console -game [[Game Directory|<vproject>]]</code>. | ||
Line 37: | Line 37: | ||
* You may want to run the update tool again after extracting to make sure that everything is correct.}} | * You may want to run the update tool again after extracting to make sure that everything is correct.}} | ||
== Configuring and running the server == | |||
Navigate to the folder you just installed your server in. There should be a bunch of files and folders, including a directory with the name of the game you have just installed, e.g. <code>hl2mp</code> for [[Half-Life 2: Deathmatch|HL2: Deathmatch]]. The configuration files are located in the <code><game>/cfg/</code> e.g. <code>hl2mp/cfg/</code> directory. | |||
Edit the main configuration file: <code><game>/cfg/server.cfg</code>. Change the <code>hostname</code> line (this is the name people will see in the server browser) and other options to your liking. | |||
Open a terminal where you have installed the server and start the server: | |||
./srcds_run -console -game <game> +map <map> +maxplayers X -autoupdate | |||
For example: | |||
./srcds_run -console -game hl2mp +map dm_lockdown +maxplayers 8 -autoupdate | |||
== See Also == | == See Also == |
Revision as of 17:30, 15 March 2013
The Source Dedicated Server or SRCDS is a tool that runs the server component of a Source game without the client component. In other words, it simulates the game without drawing it. SRCDS is chiefly used by server providers who want to serve up as many games from the same computer as they can.
This page, however, is aimed at mod developers who want to run SRCDS on their home computer. Doing this is a must if you are creating a multiplayer mod as the behaviour of dedicated servers differs from that of listenservers (those started from the main menu) in some areas. Crashes that only happen on a dedicated server are entirely possible!
Connectivity
No matter which type of server you are using, your computer must be able to receive unsolicited incoming connections. This is exactly what routers and software firewalls exist to prevent, so if you are using either you will have to reconfigure. Refer to the manufacturer instructions for how to do this.
The ports SRCDS officially requires are:
SRCDS has also been spotted opening connections on 27005 and 51840 UDP, but these may be outbound only.

Udp.Port == 27015
) and watch for requests coming in from random people around the world. Note that the heartbeats you will see being sent to the two master servers do not mean that the connection is open.
Installation
See SteamCMD for newer games such as CS:GO. See HLDSUpdateTool for all other games.
For modders


- Install HLDSUpdateTool
- Run the update tool with
-command update -game orangebox
. Optionally, add-dir <path>
to download to a custom location. - To start the server, run
orangebox\srcds.exe -console -game <vproject>
.
Video Tutorial for setup on Windows

- You will need to extract sounds, materials and models; do the "source X" GCFs before the "source 2007 X" ones.
- You should end up with
<server_path>\hl2
from your GCFs and<server_path>\orangebox
from the update tool. - You may want to run the update tool again after extracting to make sure that everything is correct.
Configuring and running the server
Navigate to the folder you just installed your server in. There should be a bunch of files and folders, including a directory with the name of the game you have just installed, e.g. hl2mp
for HL2: Deathmatch. The configuration files are located in the <game>/cfg/
e.g. hl2mp/cfg/
directory.
Edit the main configuration file: <game>/cfg/server.cfg
. Change the hostname
line (this is the name people will see in the server browser) and other options to your liking.
Open a terminal where you have installed the server and start the server:
./srcds_run -console -game <game> +map <map> +maxplayers X -autoupdate
For example:
./srcds_run -console -game hl2mp +map dm_lockdown +maxplayers 8 -autoupdate
See Also
- HLDSUpdateTool
- Half-Life Dedicated Server
- Server plugins
- Open Source Server Plugin List
- Command Line Options#Source Games