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 wget http://media.steampowered.com/client/steamcmd_linux.tar.gz tar -xvzf steamcmd_linux.tar.gz bash steamcmd.sh # 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 touch update_starbound.sh chmod +x update_starbound.sh vim update_starbound.sh # Add the next script into the file:
# Set Variables - make sure to change the username. user=USERNAMEHERE # Read in the password from stdin. read -s -p "Enter Password: " password # Run the command and pass the password through stdin with bash redirection. ./steamcmd.sh +login $user +force_install_dir /home/starbound/server +app_update 211820 +exit << ENTERPASSWORD $password ENTERPASSWORD
bash update_starbound.sh # 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: ./steamcmd.sh +set_steam_guard_code CODE_FROM_EMAIL +login $user +force_install_dir /home/starbound/server +app_update 211820 +exit << ENTERPASSWORD $password ENTERPASSWORD
bash update_starbound.sh # Will update the game, probably takes a while.
Starting the server.
cd ~/server/linux32 screen -S running-starbound # -S = Session name. ./launch_starbound_server.sh # Leave the server running with CTRL+A+D.
# To get back to the server window. screen -r