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

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

Command-line arguments for the Source Dedicated Server executable (srcds.exe, srcds_run)


Command-Line Parameters

Argument Description
-allowdebug (Same as -debug ?)
-autoupdate Linux Autoupdate the game. Requires -steam_dir and -steamcmd_script to be set.
-binary <binary> Linux Use the specified binary (no auto detection).
-console Windows SrcDS will run in console mode.
-debug Run debugging on failed servers if possible. Requires -gdb to be set [confirm]
-debuglog <logname> Linux Log debug output to this file.
-dev Show developer messages.
-fork <number> (in all games since Left 4 Dead) Linux Starts up the specified number of instances as subprocesses at once. They will each use the first available port number at 27015 or above. When using this functionality, other server parameters support substitution. For instance, if you specify +exec autoexec##.cfg, then the first server will execute autoexec01.cfg, the second autoexec02.cfg, and so on.
-game <game or path> Specifies which game/mod to run. Accepts either a path to a gameinfo.txt, or one of these pre-set values.
-gdb <gdb> Linux Use <dbg> as the debugger of failed servers.
-help Linux ?
-insecure Starts the server without Valve Anti-Cheat.
-ignoresigint Linux Ignore signal INT (prevents CTRL+C quitting).
-ip Specifies the address to use for the bind(2) syscall, which controls on which IP addresses the program is reachable on. It must either be a local address (an addresses of the host it runs on) or 0.0.0.0 (the wildcard). This has nothing to do with externally-visible addresses in NAT setups.
-maxplayers <number> Specifies how many player slots the server can contain.
-netconport <number> (in all games since Left 4 Dead) Creates a remotely accessible server console on the specified port. This can be connected to with telnet or similar applications, and allows controlling of the server as if the commands were being typed in at the console
-netconpassword <password> (in all games since Left 4 Dead) If set, users must type PASS "password" to use the remote console described above
-nobots Disable bots.
-nohltv Disables SourceTV and closes its port (usually 27020).
-norestart Won't attempt to restart failed servers.
-notrap Linux Don't use trap. This prevents automatic removal of old lock files.
-port The port the server advertises to clients.
-steam Use this (along with -console) when you are running the version of SRCDS downloaded through Steam[confirm]. Original Description "Quit on steam update failure"
-steamcmd_script <path> Linux[confirm] Path to the steam script to execute. Example: ~/Steam/hl2_ds.txt.
-steamerr Linux Quit on steam update failure.
-steamuser Linux Steam user ID?
-steampass Linux Steam Login Password?
-steam_dir <path> Linux Dir that steam.sh resides in. Example: ~/Steam
-tickrate <number> Specifies Server-Tickrate (for more info see Source Multiplayer Networking). This cannot be altered on TF2 (except older versions), CSS (except older versions), L4D, and L4D2.
-timeout <number> Sleep for <number> seconds before restarting a failed server.
-dumplongticks Generate minidumps when there are long server frame

Console Variables

  • +<console variable> <arg> - Sets the Cvar (or console variable) to the specified setting.


Some Useful Console Variables

Argument Description
+hostname "Hostname" Specifies the name of the server (Spaces between words won't work here!).
+ip Specifies the IP when multiple network cards are installed (Old, but still works).
+map <map> Specifies which map to start.
+maxplayers <number> Specifies how many player slots the server can contain (Old, but still works).
+hostport <port> Specifies the host port (Port specification before -port was added, but can still be used).
+clientport <port> Specifies the client port (The port the server advertises to clients, the same as -port and clientport in console)
+sv_lan <0/1> If set to 1, server is only available in Local Area Network (LAN).