Source Dedicated Server: Difference between revisions
TomEdwards (talk | contribs) (→Connectivity: not always true these days) |
TomEdwards (talk | contribs) m (→Connectivity) |
||
Line 20: | Line 20: | ||
{{tip|If you've opened and forwarded the correct ports and still can't receive connections, the panic button on many routers is DMZ ('Demilitarised Zone') mode. This removes all security entirely, including [[w:Denial-of-service attack|DOS]] protection, and sends all unsolicited traffic to a specified computer. ''Make sure your software and OS are all up to date before you do this.''}} | {{tip|If you've opened and forwarded the correct ports and still can't receive connections, the panic button on many routers is DMZ ('Demilitarised Zone') mode. This removes all security entirely, including [[w:Denial-of-service attack|DOS]] protection, and sends all unsolicited traffic to a specified computer. ''Make sure your software and OS are all up to date before you do this.''}} | ||
{{note|A residential internet connections may | {{note|A residential internet connections may not have the upload capacity to support large games.}} | ||
== Setting up == | == Setting up == |
Revision as of 07:31, 15 September 2010
The Source Dedicated Server (or srcds, or just DS) 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. The DS 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 DS 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:
It 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.

Setting up
Administering a dedicated server is exactly the same as administering a listenserver. Setting it up is quite different however:

+map my_map
.Source 2006 - Steam
Episode One mods running on Windows can run srcds the easy way, which is through Steam. This way the DS will use the game content you already have downloaded and will not require admin privileges to install.
Install the Source Dedicated Server, run it once, then create a shortcut to srcds.exe -console -steam -game <vproject>
(the GUI slows the server down and is buggy). You must also set the starting directory to the location of Steam's executable.
Source 2007 / Linux - HLDS Update Tool
The engine build used by the Orange Box DSes on Steam (one for TF2 and each of the Steamworks mods) differs from the one that mods built with the 2007 SDK code require, and you will receive an error about "SetupArrayProps_R" if you try to use it with your own server binary.
You must instead use the HLDS Update Tool, which installs a standalone dedicated server. This doesn't require Steam to be running, but also doesn't read data that Steam has downloaded -- meaning that it requires a separate install of the game your are running from, including all textures and sounds. If you don't have 2.5GB free space on your hard drive you're out of luck.
- Install the Update Tool:
- Windows: Just run the installer
- Linux:
- If you have a 64-bit distribution, make sure you have
ia32-libs
or you will be told that the .bin file doesn't exist. - Open a terminal and browse to a suitable folder
- Execute
wget http://storefront.steampowered.com/download/hldsupdatetool.bin
- Execute
chmod +x hldsupdatetool.bin
- Execute
./hldsupdatetool.bin
- The real update tool is
./steam.bin
- If you have a 64-bit distribution, make sure you have
- Run the update tool with
-command update -game orangebox
. Optionally, add-dir <path>
to download to a custom location. - Unless you actually want to download everything again, cancel the tool with Ctrl+C once it starts on materials. You can skip the bulk of the downloading by extracting the GCFs already on your system with GCFScape instead.
- 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.
- To start the server, run
orangebox\srcds.exe -console -game <vproject>
.


<account>\source 2007 dedicated server\steam_appid.txt
contains the AppID of the game you are running.
<server dir>\tf\
. Don't copy your custom content over to fix this: instead, create a symbolic link. [todo tested in ?]See Also
- Half-Life Dedicated Server (for GoldSrc)
- Server Plugins
- Open Source Server Plugin List
- Command Line Options