Jump to content

Source Dedicated Server

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Sarabveer (talk | contribs) at 21:47, 16 March 2014 (Created page with '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 s...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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:

  • 27015 TCP/UDP (game transmission, pings and RCON)
  • 27020 UDP (SourceTV transmission)

SRCDS has also been spotted opening connections on 27005 and 51840 UDP, but these may be outbound only.

^

^

[[#ref_Servers won't respond to queries until a map is loaded.|^]]

Installation

See SteamCMD for most games. See HLDSUpdateTool for games that haven't been updated in a long time.

For modders

^ [[#ref_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.|^]]

  1. Install HLDSUpdateTool
  2. Run the update tool with -command update -game orangebox. Optionally, add -dir <path> to download to a custom location.
  3. To start the server, run orangebox\srcds.exe -console -game <vproject>.

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 (or ./srcds.exe on Windows) -game <game> +map <map> +maxplayers X -autoupdate

On Windows:

./srcds.exe -game <game> +map <map> +maxplayers X -autoupdate

For example:

./srcds_run -game hl2mp +map dm_lockdown +maxplayers 8 -autoupdate

See Also

References

[1]