SteamCMD: Difference between revisions
(→Windows Software/Scripts: Merged Windows Software and Scripts) |
|||
Line 277: | Line 277: | ||
== Windows Software/Scripts == | == Windows Software/Scripts == | ||
=== SteamCMD GUI === | |||
This tool allows the user to use SteamCMD on Windows without command lines and/or batch files. | |||
GitHub Repo: | |||
https://github.com/DioJoestar/SteamCMD-GUI.git | |||
===SteamCMD Guardian 1.2=== | ===SteamCMD Guardian 1.2=== | ||
View and download here: http://pastebin.com/BRUbsGQh | View and download here: http://pastebin.com/BRUbsGQh |
Revision as of 18:48, 27 January 2014
Template:Otherlang2 The Steam Console Client or SteamCMD is a tool to install and update various dedicated servers available on Steam using a command line interface. It works with games that use the SteamPipe content system. Most games have now been migrated from HLDSUpdateTool to SteamCMD.
Downloading SteamCMD
Windows
1. Create a folder for SteamCMD.
C:/steamcmd
2. Download the SteamCMD (Windows) Update Tool.
http://media.steampowered.com/installer/steamcmd.zip
3. Extract the contents of the zip to the folder.
Linux
1. Create a user for SteamCMD and login.

adduser steam
su - steam
2. Create a directory for SteamCMD.
mkdir /home/steam/steamcmd
cd /home/steam/steamcmd
3. Download the SteamCMD (Linux) Update Tool.
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
4. Extract the contents to the directory.
tar -xvzf steamcmd_linux.tar.gz
Running SteamCMD
On first run SteamCMD will automatically update and enter you in to a Steam>
prompt. Type help
for more information.
Windows
Open a Command Prompt and start SteamCMD.
cd C:\steamcmd
steamcmd
Linux
Open a terminal and start SteamCMD.
cd /home/steam/steamcmd
./steamcmd.sh
SteamCMD Login
To download most game servers, you can login anonymously.
login anonymous
Some servers require you to login with a Steam Account.


login <username>
Next enter your password.
If Steam Guard is activated on the user account check your e-mail for a Steam Guard access code and enter it. This is required first time only.
You should see a message stating that you have successfully logged in with your account.
Downloading an app
1. Start SteamCMD and set your app install directory. (note: use forward slashes for Linux and backslashes for Windows)
force_install_dir <path>
- Example: cs_go directory in the current directory:
force_install_dir ./cs_go/
2. Install or update the app by using a Steam Application ID or <app_id>. To also validate the app add validate
to the command. To participate in HLDS beta testing add -beta beta
to the command. To participate in SRCDS beta testing add -beta prerelease
to the command.
app_update <app_id>
- Example: install and validate Counter Strike: Global Offensive:
app_update 740 validate
- Example: install and validate Team Fortress Classic:
app_set_config 90 mod tfc app_update 90 validate

- Example: install and validate beta version of HLDS (Half-Life):
app_update 90 -beta beta validate
- Example: install and validate beta version of Counter Strike: Source:
app_update 232330 -beta prerelease validate
- Example: install and validate a private beta version of Natural Selection 2:
- [beta name] is the name of the private beta branch
- [beta code] is the password for the private beta branch
app_update 4940 -beta [beta name] -betapassword [beta code] validate
3. Once finished, type quit
to properly log off of the Steam servers.
Supported Servers
This is a list of known servers that use SteamCMD to install. Any listed extra command line options need to be before the app_update line.




Server | ID | Extra Command Line options |
---|---|---|
HLDS for Half-Life and Counter-Strike 1.6 | 90 | |
Counter-Strike: Condition Zero dedicated server | 90 | +app_set_config "90 mod czero" |
Deathmatch Classic dedicated server | 90 | +app_set_config "90 mod dmc" |
Day of Defeat dedicated server | 90 | +app_set_config "90 mod dod" |
Half-Life: Opposing Force dedicated server | 90 | +app_set_config "90 mod gearbox" |
Ricochet dedicated server | 90 | +app_set_config "90 mod ricochet" |
Team Fortress Classic dedicated server | 90 | +app_set_config "90 mod tfc" |
Counter-Strike: Global Offensive dedicated server | 740 | |
The Ship dedicated server | 2403 | |
Garry's Mod dedicated server | 4020 | |
Natural Selection 2 dedicated server | 4940 | |
Serious Sam 3 dedicated server | 41080 | |
Nuclear Dawn dedicated server | 111710 | |
Red Orchestra: Ostfront 41-45 Windows dedicated server | 223240 | |
Red Orchestra: Ostfront 41-45 Linux dedicated server | 223250 | |
Red Orchestra 2: Heroes of Stalingrad and Rising Storm Windows dedicated server | 212542 | |
Killing Floor Windows dedicated server | 215350 | |
Killing Floor Linux dedicated server | 215360 | |
Left 4 Dead 2 dedicated server | 222860 | |
Team Fortress 2 dedicated server | 232250 | |
Day of Defeat: Source dedicated server | 232290 | |
Counter-Strike: Source dedicated server | 232330 | |
Half-Life 2: Deathmatch dedicated server | 232370 | |
Blade Symphony Beta dedicated server | 228780 | |
Source SDK Base 2006 MP dedicated server (i.e. Fortress Forever). Windows only. Linux is missing | 205 | |
Source 2007 dedicated server | 310 | |
Source SDK Base 2013 MP dedicated server | 244310 | |
Half-Life Deathmatch: Source dedicated server | 255470 | |
Pirates, Vikings, and Knights II dedicated server | 17575 | |
Rust dedicated server | 258550 | |
Insurgancy dedicated server | 237410 |

+app_set_config 90 mod czero,dod
.Automating SteamCMD
There are two ways to automate SteamCMD. (replace steamcmd
with ./steamcmd.sh
on Linux)

1. Add commands to the command line. Examples:
steamcmd +login anonymous +force_install_dir ../csgo_ds +app_update 740 validate +quit
To install a specific game mod for HL1, such as Counter-Strike: Condition Zero:
steamcmd +login anonymous +force_install_dir ../czero +app_set_config 90 mod czero +app_update 90 validate +quit
For a game that requires logins, like Killing Floor
steamcmd +login <username> <password> +force_install_dir c:\KFServer\ +app_update 215350 validate +quit
2. Create a script.
- a. Put your SteamCMD commands in a text file. Example:
// update_csgo_ds.txt
//
@ShutdownOnFailedCommand 1 //set to 0 if updating multiple servers at once
@NoPromptForPassword 1
login <username> <password>
//for servers which don't need a login
//login anonymous
force_install_dir ../csgo_ds
app_update 740 validate
quit
- b. Run SteamCMD with the
+runscript
option. Example:
steamcmd +runscript csgo_ds.txt
Cross-Platform Installation
It is possible to choose the platform for which SteamCMD should download files, even if it isn't the platform it is currently running on. This is done using the @sSteamCmdForcePlatformType
variable. (Yes, those are two "s"es at the beginning of the variable name.) For example, to download the Windows CSGO dedicated server on Linux, you can run the following command:
./steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir ../csgo_ds +app_update 740 validate +quit
or use the following script:
@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
@sSteamCmdForcePlatformType windows
login anonymous
force_install_dir ../csgo_ds
app_update 740 validate
quit
The supported values are windows
, macos
and linux
.
Windows Software/Scripts
SteamCMD GUI
This tool allows the user to use SteamCMD on Windows without command lines and/or batch files.
GitHub Repo: https://github.com/DioJoestar/SteamCMD-GUI.git
SteamCMD Guardian 1.2
View and download here: http://pastebin.com/BRUbsGQh
Linux Scripts
Linux Game Server Managers
by Daniel Gibbs
The Linux Game Server Managers are command line tools for quick, simple deployment and management of various dedicated game servers using SteamCMD. This includes the following features.
Features
- Server installer (SteamCMD)
- Start/Stop/Restart server
- Server update (SteamCMD)
- Server monitor (including email notification)
- Server backup
- Server console
Various servers are supported including:
- Counter Strike
- Counter Strike: Condition Zero
- Counter Strike: Global Offensive
- Counter Strike: Source
- Day of Defeat
- Day of Defeat: Source
- Half-Life 2: Deathmatch
- Insurgency
- Killing Floor
- Left 4 Dead 2
- No More Room in Hell
- Natural Selection 2
- Red Orchestra: Ostfront 41-45
- Team Fortress 2
- Team Fortress Classic
Full list of servers and instructions: http://danielgibbs.co.uk/scripts
GitHub Repo: https://github.com/dgibbs64/linuxgameservers
SteamCMD Guardian 1.2
The following script was tested on Debian Wheezy.
View and download here: http://pastebin.com/hcpMpmaZ
Installation
To make this script work, we need a location. Preferrably you created a user (e.g. steam) with it's own home directory (/home/steam) and are logged in as it via SSH, tty or using su.
- Make the file.
nano updateserver.sh
- Paste in the code
- Modify the code, add at least 1 game to the
DL_SV*=
rows. - Close the file with Ctrl+O, followed by ↵ Enter and concluding with Ctrl+X.
- Give the file execute rights for the user
chmod u+x ./updateserver.sh
- Run the file
./updateserver.sh
The file will auto-download SteamCMD, update it and install all chosen games (up to 4). Run the file again to update the games.
Windows Software
SteamCMD GUI
This tool allows the user to use SteamCMD on Windows without command lines and/or batch files.
GitHub Repo: https://github.com/DioJoestar/SteamCMD-GUI.git
Known issues
ERROR! Failed to install app 'xxxxxx' (No subscription)
Some servers require you to login (most don't). If you get the 'No subscription' error you will need to enter your steam username and password to allow authentication to the steamCMD system. It is a good idea to create a new Steam username just for the server as the username and password displays as clear text.
For example
steamcmd +login <username> <password>
32-bit libraries on 64-bit Linux systems
Since SteamCMD is a 32-bit binary, a few 32-bit libraries are required.
The following error may occur:
steamcmd: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
The remedies are distribution-specific:
Debian and derived distributions (Ubuntu, Mint, etc.)
apt-get install lib32gcc1
note: ia32-libs are not required to install SteamCMD instead simply use lib32gcc1
Debian 7 "Wheezy"
Using Debian 7, you may encounter this error:
The following packages have unmet dependencies: ia32-libs : Depends: ia32-libs-multiarch but it is not installable
E: Unable to correct problems, you have held broken packages.
do the following:
dpkg --add-architecture i386
apt-get update
apt-get install lib32gcc1
you can also use:
dpkg --add-architecture i386
apt-get update
apt-get install lib32gcc1
to avoid installing unrequired 32bit packages.
Red Hat and derived distributions (RHEL, Fedora, CentOS, etc.)
yum install glibc.i686 libstdc++.i686
Arch Linux
Don't forget to first enable the multilib repository.
pacman -S lib32-gcc-libs
Login Failure: No Connection
On linux servers, you may experience a "Login Failure: No Connection". This is related to missing iptables rules. You will want something along these lines:
iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPT
The port list is found here: https://support.steampowered.com/kb_article.php?ref=8571-GLVN-8711&l=english
On Windows servers, you may experience "SteamUpdater: Error: Download failed: http error 0" and "SteamUpdater: Error: Steam needs to be online to update. Please confirm your network connection and try again.". This is usually fixed by checking "Automatically detect settings" in IE (Internet Explorer) through the lan settings in the Internet option menu.
1. Open Internet Explorer (IE)
2. Click on Tools > Internet Options
3. Click on the "Connections Tab"
4. At the Bottom, you should see "Local Area Network (LAN) Settings".
5. Check the first box "Automatically detect settings"
6. Hit ok, and apply. Try running the SteamCMD again, if it still doesn't work. try lowering your "Internet Security level zone" to medium or lower. You can find that in the "Security" tab in "Internet Options".
SteamCmd startup errors
Ulimit linux startup error
Some users may get ulimit error (no permission/can not open file) while script is starting up. This error caused by low setting of -n-parameter of ulimit. SteamCmd uses standard command inside of shell-script to change ulimit automatically, but some servers may be protected from changing values to custom from different (set by root).
It fixes only with changing ulimit parameter up to 2048: ulimit -n 2048
. It may cause error (no permission), so you may need login as root to change the parameter.
To check your setting: type ulimit -a, system will reply with many rows, you need to find one:
open files (-n) 1024
"1024" is the value of setting in system.
In most instances you will get a warning message however it will not stop SteamCMD from running.