How to Install and Use SteamCMD

How to Install and Use SteamCMD

This is a brief tutorial on the basics of installation and usage of 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.
Note: For security best practice do not run SteamCMD a root.

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

Mac OS x

1. Open Terminal.app and create a directory for SteamCMD.

mkdir ~/steamcmd
 ~/steamcmd

2. Download the SteamCMD (OS X) Update Tool.

curl -O http://media.steampowered.com/client/installer/steamcmd_osx.tar.gz

3. Extract the contents to the directory.

tar -xvzf steamcmd_osx.tar.gz

Running SteamCMD

Windows

Browse to the SteamCMD folder and click on steamcmd.exe.

steamcmdfolder

Alternatively Open a Command Prompt to start SteamCMD.

cd C:\steamcmd
steamcmd

steamcmdwindows

Linux

Open a terminal and start SteamCMD.

cd /home/steam/steamcmd
./steamcmd.sh

steamcmdlinux

Steam>

Mac OS x

Open Terminal.app and start SteamCMD.

cd ~/steamcmd
./steamcmd.sh

SteamCMD Max OS X

Available Commands

Type help for more information on the available commands.

help

A full list of commands can also be found here.

Login to SteamCMD

To download most game servers, you can login anonymously.

login anonymous

Some servers require you to login with a Steam Account. To find out if your server requires a login see Dedicated Servers List.

 Note: For security reasons it is recommended that you create a new Steam username just for SteamCMD.

 Note: A user can only be logged in once at any time.

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.

Installing a Server

1. Start SteamCMD and set your app install directory.

force_install_dir
  • Windows
force_install_dir c:\steamcmd\csgoserver
  • Linux
force_install_dir /home/steam/csgoserver

2. Install 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  validate

Example for Counter Strike:Global Offensive

app_update 740 validate

Example for Team Fortress Classic

app_set_config 90 mod tfc
app_update 90 validate

Automating SteamCMD

SteamCMD can be automated to run tasks directly from the command line/terminal. This is very useful for running your own scripts.
Example for Counter Strike:Global Offensive

Windows

steamcmd +login anonymous +force_install_dir c:\steamcmd\csgoserver +app_update 740 validate +quit

Linux

./steamcmd.sh +login anonymous +force_install_dir /home/steam/csgoserver +app_update 740 validate +quit

Example for Counter Strike:Condition Zero

Windows

steamcmd +login anonymous +force_install_dir c:\steamcmd\csczserver +app_set_config 90 mod czero +app_update 90 validate +quit

Linux

./steamcmd.sh +login anonymous +force_install_dir /home/steam/csczserver +app_set_config 90 mod czero +app_update 90 validate +quit

Example for Killing Floor

Windows

steamcmd +login +force_install_dir c:\steamcmd\kfserver +app_update 215350 validate +quit

Linux

./steamcmd.sh +login +force_install_dir /home/steam/kfserver +app_update 215360 validate +quit

For more info about SteamCMD you see the SteamCMD article on the Valve Wiki.