SteamCMD Guide

Updated at 2013-12-29 13:45

This note is a guide how to install and use Steam Console Client, SteamCMD. SteamCMD is used to host steam games on Linux machines. This guide shows how to install Starbound but all Steam games should work just the same.

Optionally create a new user for the game.

adduser starbound
passwd starbound
# Input the new password.

Installing SteamCDM. You might want to install it somewhere else

mkdir SteamCMD
cd SteamCMD
tar -xvzf steamcmd_linux.tar.gz
# After it has updated, press CTRL+C to exit.

Then create a directory for the game server and add an update script.

cd ..
mkdir starbound-server
chmod +x
# Add the next script into the file:

# Set Variables - make sure to change the username.

# Read in the password from stdin.
read -s -p "Enter Password: " password

# Run the command and pass the password through stdin with bash redirection.
./ +login $user +force_install_dir /home/starbound/server +app_update 211820 +exit << ENTERPASSWORD
# Will error if you have Steam Guard enabled on your Steam account.

If you have Steam Guard, you need to login to your email account and get Steam Guard code from there.

# Edit script command:
./ +set_steam_guard_code CODE_FROM_EMAIL +login $user +force_install_dir /home/starbound/server +app_update 211820 +exit << ENTERPASSWORD
# Will update the game, probably takes a while.

Starting the server.

cd ~/server/linux32
screen -S running-starbound # -S = Session name.
# Leave the server running with CTRL+A+D.
# To get back to the server window.
screen -r