Install SteamCMD

Downloading SteamCMD

Windows

1. Create a folder for SteamCMD.

For example

C:\steamcmd

2. Download SteamCMD for Windows: https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip

3. Extract the contents of the zip to the folder.

Linux

Create a user account named steam to run SteamCMD safely, isolating it from the rest of the operating system. Do not run steamcmd while operating as the root user – to do so is a security risk.

1. As the root user, create the steam user:

useradd -m steam

2. Go into its home folder:

cd /home/steam

Package from repositories

1. It’s recommended to install the SteamCMD package from your distribution repositories, if available:

Ubuntu/Debian

sudo apt install steamcmd

 Note:If you are using a 64 bit machine you will need to add multiverse

 sudo add-apt-repository multiverse
 sudo dpkg --add-architecture i386
 sudo apt update
 sudo apt install lib32gcc1 steamcmd 

RedHat/CentOS

yum install steamcmd

Arch Linux

git clone https://aur.archlinux.org/steamcmd.git
cd steamcmd
makepkg -si

2. Link the steamcmd executable:

ln -s /usr/games/steamcmd steamcmd

Docker

If your server is running Docker, you can simply use:

docker run -it --name=steamcmd cm2network/steamcmd bash

steamcmd.sh location: /home/steam/steamcmd

This image can be used as a base image for Steam-based dedicated servers. Example: https://hub.docker.com/r/cm2network/csgo/

You can find the associated Docker Hub page here: https://hub.docker.com/r/cm2network/steamcmd/

Manually

1. Before you begin, you must first install the dependencies required to run SteamCMD:

Ubuntu/Debian (x86-64)

sudo apt-get install lib32gcc1

RedHat/CentOS (x86-64)

yum install glibc.i686 libstdc++.i686

2. As the root user, escalate to the steam user:

su - steam

If you’re not logging in as root and you instead use sudo to perform administration, escalate to the steam user as follows:

sudo -iu steam

3. Create a directory for SteamCMD and switch to it.

mkdir ~/Steam && cd ~/Steam

4. Download and extract SteamCMD for Linux.

curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

5. Install tmux and/or screen for easy server management

sudo apt-get install tmux screen -y;

macOS

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

mkdir ~/Steam && cd ~/Steam

2. Download and extract SteamCMD for macOS.

curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_osx.tar.gz" | tar zxvf -

Running SteamCMD

On first run, SteamCMD will automatically update and enter you into a Steam> prompt. Type help for more information.

Windows

Open a Command Prompt and start SteamCMD.

cd C:\steamcmd
steamcmd

Linux/macOS

Open a terminal and start SteamCMD.

If you installed it using the package from repositories:

cd ~
steamcmd

If you installed it manually:

cd ~/Steam
./steamcmd.sh

SteamCMD Login

Anonymous

To download most game servers, you can login anonymously.

login anonymous

With a Steam account

Some servers require you to login with a Steam Account. Note:For security reasons it is recommended that you create a new Steam account just for your dedicated servers. Note:A user can only be logged in once at any time (counting both graphical client as well as SteamCMD logins).

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 only required the first time you log in (as well as when you delete the files where SteamCMD stores the login information).

You should see a message stating that you have successfully logged in with your account.

Downloading an app

1. Start SteamCMD and log in.

2. Set your app install directory. (Note: use forward slashes for Linux/macOS and backslashes for Windows.)

force_install_dir <path>

e.g. a directory named cs_go inside the current directory:

force_install_dir ./cs_go/

For Windows: force_install_dir c:\cs_go\

3. Install or update the app using the app_update command (supplying a Steam Application ID). Please check here for the dedicated server list: Dedicated server list. To also validate the app, add validate to the command. To download a beta branch, use the -beta <betaname> option – for example, the HLDS beta branch is named beta and the SrcDS beta branch is named prerelease. Some beta branches are protected by a password; to be able to download from them, also add the -betapassword <password> option.

app_update <app_id> [-beta <betaname>] [-betapassword <password>] [validate]

HLDS is a special case: the App ID is always 90 and a mod must be chosen first. This is done by setting the app config option mod to the requested value.

app_set_config <app_id> <option_name> <option_value>

Example: Install and validate the Counter Strike: Global Offensive dedicated server:

app_update 740 validate

Example: Install and validate HLDS with Team Fortress Classic:

app_set_config 90 mod tfc
app_update 90 validate

Bug: HLDS (appid 90) currently requires multiple runs of the app_update command before all the required files are successfully installed. Simply run app_update 90 validate multiple times until no more updates take place.Example: Install and validate beta version of HLDS (Half-Life):

app_update 90 -beta beta validate

Example: install and validate beta version of the Counter Strike: Source dedicated server:

app_update 232330 -beta prerelease validate

Example: install and validate a private beta version of the Natural Selection 2 dedicated server (name alpha, password natsel):[beta name] is the name of the private beta branch[beta code] is the password for the private beta branch

app_update 4940 -beta alpha -betapassword natsel validate

3. Once finished, type quit to properly log off of the Steam servers.

quit

Validate

validate

Validate is a command that will check all the server files to make sure they match the SteamCMD files. This command is useful if you think that files may be missing or corrupted. Note:Validation will overwrite any files that have been changed. This may cause issues with customized servers. For example, if you customize mapcycle.txt, this file will be overwritten to the server default. Any files that are not part of the default installation will not be affected.

It is recommended you use this command only on initial installation and if there are server issues.

Supported Servers

A list of known servers that use SteamCMD to install is available on the Dedicated Servers List page. Note that any extra commands listed need to be executed before the app_update line.

Leave a Reply

Your email address will not be published. Required fields are marked *