SteamCMD Setup
Debian / Ubuntu
Fedora / Rocky / RHEL
Overview
Setup SteamCMD to install Steam games on a Linux box.
Assumptions
- Initial System Setup completed. 
- Logged in as administrative user. 
Update
Before getting started, update package repositories and apply upgrades for the latest patches.
# Debian
sudo apt update
sudo apt upgrade# Fedora
sudo dnf check-update
sudo dnf upgradeInstall Dependencies
Install the required package dependencies for SteamCMD based on the system distribution.
For Debian systems, install the lib32gcc-s1 package.
# Debian
sudo apt install lib32gcc-s1On Fedora systems, install the glibc.i686 and libstdc++.i686 packages.
# Fedora
sudo dnf install glibc.i686 libstdc++.i686Create System User
Add a new steam system user and map the home directory to /opt/steam.
sudo useradd --system --user-group --create-home --home /opt/steam --shell /sbin/nologin steamExecute commands as the user using su.
sudo su -s /bin/bash steam -c "COMMAND_TO_RUN"Alternatively, switch to the user with su.
sudo su -s /bin/bash - steamInstall SteamCMD
Switch over to the created Steam user. All the steps in this section should be executed as the steam user.
Create a new cmd directory in /opt/steam to store the SteamCMD files.
mkdir /opt/steam/cmdDownload SteamCMD to the /opt/steam/cmd directory.
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz --directory-prefix /opt/steam/cmdExtract the downloaded file to the /opt/steam/cmd directory.
tar -xvf /opt/steam/cmd/steamcmd_linux.tar.gz -C /opt/steam/cmdPermissions
Assign basic permissions to the SteamCMD application.
Make the steam user and group the owner of the cmd directory.
chown -R steam:steam /opt/steam/cmdRemove all permissions from other users.
chmod -R o-rwx /opt/steam/cmdVerify the steamcmd.sh file has execute permissions.
chmod u+x /opt/steam/cmd/steamcmd.shLaunch
Launch the extracted steamcmd.sh script.
/opt/steam/cmd/steamcmd.shCommands can be entered after the Steam> line appears on screen. Enter the quit command to exit SteamCMD.
# Sample Output
Redirecting stderr to '/opt/steam/Steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[  0%] Checking for available update...
[----] Downloading update (0 of 53847 KB)...
[100%] Download Complete.
[----] Applying update...
[----] Extracting package...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching...
max open descriptors set to 2048
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/opt/steam/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
[  0%] Downloading update...
[  0%] Checking for available updates...
[----] Download complete.
[----] Extracting package...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
max open descriptors set to 2048
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/opt/steam/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1642451655
-- type 'quit' to exit --
Loading Steam API...OK
Steam> quitCommand Alias
To avoid having to enter the full path to the script each time SteamCMD is launched, create a command alias.
Logged in as the steam user, create or modify the .bashrc file in the /opt/steam directory.
nano /opt/steam/.bashrcAdd an alias for steamcmd with the value being the path to the installed steamcmd.sh file.
alias steamcmd='/opt/steam/cmd/steamcmd.sh'Steam can now be launched as the steam user with the command steamcmd.
steamcmdWhen logged in as the administrative user, SteamCMD can now be launched quickly using the sudo command.
sudo -u steam steamcmdUsage
Refer to the SteamCMD documentation for full usage information.
Login
Login as an anonymous user, or with an existing Steam account. Most game server applications can be installed via the anonymous user, don’t use a Steam account unless required.
Steam> login anonymousErrors
SDL
An error message may be logged stating “Warning: failed to init SDL thread priority manager: SDL not found”.
If you are running a headless server, this error can be ignored. The error appears due to the lack of the SDL package libsdl2-2.0-0 or libsdl2-2.0-0:i386. Install this package if the system has a GUI.
# Debian
sudo apt install libsdl2-2.0-0# Fedora
sudo dnf install SDL2