CHILLMODEA/Pages/Command line options (GoldSrc Dedicated Server)

From Valve Developer Community
Jump to navigation Jump to search
GoldSrc ( Engine | Dedicated Server )
Source Engine ( Engine | Dedicated Server )
edit

These command-line parameters are used with hlds.exe for Goldsource (Half-Life) games.

Syntax: hlds.exe <parameter1> <parameter2> <cvar1> <cvar2>

Examples

  • hlds.exe -console -game cstrike +sv_lan 0 +maxplayers 22 +map de_dust2
  • ./hlds_run -game cstrike -autoupdate -pingboost 2 -port 27016 +maxplayers 20 +map de_dust2


Command-Line Parameters

Argument Description
-condebug Stores console output to "Half-Life\qconsole.log".
Note.pngNote:Can be toggled with condebug console command.
-dev Enables developer mode.
-autoupdate Autoupdate the game. Requires -steam_dir and -steamcmd_script to be set (Linux/Unix only)
-console HLDS will run in console mode (Windows only).
-game <game> Specifies which game/mod to run. Default is "valve".
-dll <name.dll> Specifies which DLL to use. Ex: -dll addons\metamod\dlls\metamod.dll.
-nomaster Disable communication with Master server. Use this parameter if you do not want your server to be listed in Server Browser.
Note.pngNote:Also disables server queries.
-insecure Starts the server without Valve Anti-Cheat.
-port <port> Specifies which port to use for client connections. Default is 27015.
Note.pngNote:Can do the same with port console variable.
-sport <port> Specifies the VAC port the server should use. Default is 26900.
Note.pngNote:You only need to change -sport if VAC connections fail through the primary port.
-noip Disables network support. Not the same as Steam offline mode.
-noipx Disables IPX support.
-tos Enables the LOWDELAY TOS header in the udp/ip packets the server generates. (Linux only)
-nobreakpad Let plugin authors still get old style minidumps if they need it (win32 only)
-num_edicts <variable> Sets the entity limit for map/game entities (not temporary entities, which is still locked to 500). 900 is default. 4096 is a good limit, beyond that seems to cause hunk_alloc errors[confirm]. Both clients and servers need matching values for best compatibility[confirm].
-heapsize <kilobytes> Specifies the amount of heap(or free store--cache, an area of memory used for dynamic memory allocation) the engine will use. Minimum value is 14336 (14 MB). Maximum value is 131072 (128 MB). By default this is set to 40960 (40 MB) and automatically adjusted to suit your system.
Note.pngNote:Low value causes "Unable to allocate X.X MB" exit error.
-zone <bytes> Specifies the amount of Bytes of memory for use with the console system.
Note.pngNote:Low value causes Z_Malloc exit error.
-maxplayers <number> Sets the maximum number of players that will be able to join your server.
Note.pngNote:Can do the same with maxplayers console variable.
-sys_ticrate Overrides sys_ticrate cvar.
-exec <file> Execute specific config file immediately after the engine is loaded.
+<console variable> <arg> Sets the Cvar (or console variable) to the specified setting.

Useful Console Variables

  • +hostname "Server Name" - Specifies the name of the server.
  • +ip <address> - Specifies the IP when multiple network cards are installed. Required for VAC2 operation.
    Note.pngNote:Usually you do not need to specify this.
  • +map <map> - Specifies which map to start with.
  • +sv_lan <0/1> - If set to 1, server is only available in Local Area Network (LAN).
  • +mapchangecfgfile <file> - Like Server.cfg, ran after every round change, before Plugins are started.
  • -pingboost <1/2/3> - Selects between optimized HLDS network code stack. Set this on 2 usually reduces latency toward 1ms without loss of activity input packets.