Half-Life Dedicated Server: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
 
(35 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{stub}}
{{LanguageBar}}


The '''Half-Life Dedicated Server''' (HLDS) is an application for running a dedicated server for GoldSrc games,<br>
<!-- Add the categories to the main page, not here. Some template, such as {{This is a}}, and all Table templates should be placed to the main page. -->
is a tool that runs the server component of a Source game without the client component.  
{{toc-right}}
'''Half-Life Dedicated Server''' ('''HLDS''') is an application used to run a dedicated server without the clientside component.
This page, however, is aimed at mod developers who want to run hlds on their home computer or servers. 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.<br>This is exactly what routers and software firewalls exist to prevent, so if you are using either you will have to reconfigure.<br>Refer to the manufacturer instructions for how to do this.
The ports hlds officially requires are:<br>
# 27015 TCP/UDP (game transmission, pings and RCON)
# 27020 UDP (HLTV transmission)


It has also been spotted opening connections on 27005 to 27030 UDP/TCP, but some of these may be outbound only.
== Limitations/Bugs ==
{{Warning|HLDS is no-longer actively updated, and only receives occasional engine and security updates.
{{note|A residential internet connections may or will not have the upload capacity to support large games, cable connections require.}}
{{Workaround| '''[https://github.com/dreamstalker/rehlds ReHLDS]''' is highly recommended for additional security and bugfixes. This is a server-side executable replacement; clients do not need to modify their installation to connect to severs running ReHLDS.}}
}}
Use [https://github.com/ValveSoftware/halflife/issues?q=is%3Aopen+is%3Aissue+label%3A%22Dedicated+Server%22 GitHub] in order to prevent duplicate or outdated bug reports at the wiki.


===Dedicated Servers Masters server connection Known Issues===
== {{gldsrc|4}} games ==
{{todo}}
# {{hl|4}}
# {{cs|4}}
# {{cscz|4}} (If game is installed)
# {{dmc|4}} (If game is installed)
# {{dod|4}} (If game is installed)
# {{op4|4}} (If game is installed)
# {{ricochet|4}} (If game is installed)
# {{tfc|4}} (If game is installed)


== Hardware Requirements ==
CPU - Depends on the number of clients. At least Pentium II 266 for hosting a full game, the more the better. 400MHz recommended.


RAM - Minimum 64 MB, 128 MB recommended.


Problems connecting to Masters Servers if using the steam in the same machine.<br>
Network - Bandwidth also depends on the number of clients. At least 512kbps upstream recommended.


{{warning|If you have a HLDS Dedicated server and steam install in the same machine,<br>
{{Note|Most modern systems can easily run the servers.}}


it will not connect properly to the Masters servers due to an incompatibility between steam and HDLS.}}
== 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 HLDS officially requires are:
# 27015 UDP (game transmission, pings)
# 27015 TCP (RCON)
# 27020 UDP (HLTV transmission)
# 26900 UDP (VAC service) -- ''automatically increments if used in case of additional server processes''


HLDS has also been spotted opening connections on 27005 to 27030 UDP/TCP, but some of these may be outbound only.


{{tip|1=Pinging your own server will fail with some routers and/or ISPs. The most reliable way to test whether your connection is open is either to get a friend to try connecting, or to install the [http://www.microsoft.com/downloads/details.aspx?FamilyID=983b941d-06cb-4658-b7f6-3088333d062f Microsoft Network Monitor] (apply the filter <code>Udp.Port == 27015</code>) 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.}}


Solution: uninstall Steam, and force HLDS to install new files from online servers,
{{note|A residential internet connections may not have the upload capacity to support large games.}}
-verify_all .<br>


If you are using SRCDS Dedicated server and HLDS in the same machine them before you uninstall Steam,<br>
== Installation ==
See [[SteamCMD]] for most games. See [[HLDSUpdateTool]] for games that haven't been updated in a long time.


copy the steam to a backup folder and them uninstall Steam, use the backup of the steam to add (copy)<br>
== 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>cstrike</code> for [[Counter-Strike]] (1.6). The configuration files are located in the <code><game>/cfg/</code> e.g. <code>cstrike/cfg/</code> directory.


the necessary files to SRCDS games.
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.


=== Windows ===
Open the directory where you have installed the server and start the server by double click at hlds.exe or by batch command:
hlds.exe -console -game <game> +maxplayers X +map <map>


===Setting up===
For example:
hlds.exe -console -game cstrike +maxplayers 8 +map de_dust


#
=== Linux ===
This article is a stub. You can help by adding to it.
Open a terminal where you have installed the server and start the server:
./hlds_run -game <game> +maxplayers X +map <map>


 
For example:
./hlds_run -game cstrike +maxplayers 8 +map de_dust


== See Also ==
== See also ==
* [[Source Dedicated Server|Source Dedicated Server (SRCDS)]]
* [[HLDSUpdateTool]]
* [[Server Plugins]]
* [[Source Dedicated Server]]
* [[Server plugins]]
* [[Open Source Server Plugin List]]
* [[Open Source Server Plugin List]]
* [[Command Line Options]]
* [[Command Line Options#Goldsource Games]]
 
== External links ==
* [https://support.steampowered.com/kb_article.php?ref=6758-TCMF-2234 Setting up a Standalone Dedicated Server]
* [https://support.steampowered.com/kb_article.php?ref=6470-EIFV-5481 Setting up a Steam Half-Life Dedicated Server]
* [https://support.steampowered.com/kb_article.php?ref=5386-HMJI-5162 Optimizing a Dedicated Server]
* [http://forums.steampowered.com/forums/forumdisplay.php?f=16 Official Half-Life DS (Windows) forum]
* [http://forums.steampowered.com/forums/forumdisplay.php?f=19 Official Half-Life DS (Linux) forum]


== External Links ==
[[Category:Dedicated Server]]
* [http://store.steampowered.com/about/ What is Steam (bottom right of page)]
* [http://en.wikipedia.org/wiki/Half-Life_Dedicated_Server Half-Life Dedicated Server article on Wikipedia]
* [http://forums.steampowered.com/forums/forumdisplay.php?f=509 Official Dedicated Server Discussion Forums]


[[Category:Steam]]
[[Category:Networking]]
[[Category:Steam Applications]]
[[Category:Steam]]<!--How exactly are they connected?-->
[[Category:Steam Applications]]<!--How exactly are they connected?-->

Latest revision as of 04:21, 1 September 2024

English (en)Español (es)Translate (Translate)

Half-Life Dedicated Server (HLDS) is an application used to run a dedicated server without the clientside component.

Limitations/Bugs

Warning.pngWarning:HLDS is no-longer actively updated, and only receives occasional engine and security updates.
PlacementTip.pngWorkaround: ReHLDS is highly recommended for additional security and bugfixes. This is a server-side executable replacement; clients do not need to modify their installation to connect to severs running ReHLDS.

Use GitHub in order to prevent duplicate or outdated bug reports at the wiki.

GoldSrc GoldSrc games

[Todo]

  1. Half-Life Half-Life
  2. Counter-Strike Counter-Strike
  3. Counter-Strike: Condition Zero Counter-Strike: Condition Zero (If game is installed)
  4. Deathmatch Classic Deathmatch Classic (If game is installed)
  5. Day of Defeat Day of Defeat (If game is installed)
  6. Half-Life: Opposing Force Half-Life: Opposing Force (If game is installed)
  7. Ricochet Ricochet (If game is installed)
  8. Team Fortress Classic Team Fortress Classic (If game is installed)

Hardware Requirements

CPU - Depends on the number of clients. At least Pentium II 266 for hosting a full game, the more the better. 400MHz recommended.

RAM - Minimum 64 MB, 128 MB recommended.

Network - Bandwidth also depends on the number of clients. At least 512kbps upstream recommended.

Note.pngNote:Most modern systems can easily run the servers.

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 HLDS officially requires are:

  1. 27015 UDP (game transmission, pings)
  2. 27015 TCP (RCON)
  3. 27020 UDP (HLTV transmission)
  4. 26900 UDP (VAC service) -- automatically increments if used in case of additional server processes

HLDS has also been spotted opening connections on 27005 to 27030 UDP/TCP, but some of these may be outbound only.

Tip.pngTip:Pinging your own server will fail with some routers and/or ISPs. The most reliable way to test whether your connection is open is either to get a friend to try connecting, or to install the Microsoft Network Monitor (apply the filter 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.
Note.pngNote:A residential internet connections may not have the upload capacity to support large games.

Installation

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

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. cstrike for Counter-Strike (1.6). The configuration files are located in the <game>/cfg/ e.g. cstrike/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.

Windows

Open the directory where you have installed the server and start the server by double click at hlds.exe or by batch command:

hlds.exe -console -game <game> +maxplayers X +map <map>

For example:

hlds.exe -console -game cstrike +maxplayers 8 +map de_dust

Linux

Open a terminal where you have installed the server and start the server:

./hlds_run -game <game> +maxplayers X +map <map>

For example:

./hlds_run -game cstrike +maxplayers 8 +map de_dust

See also

External links