How to install SteamCMD on Linux VPS
SteamCMD is Valve's command-line tool for installing and updating dedicated game servers available on Steam. It is widely used on VPS Gamer for titles such as Counter-Strike 2, Valheim, Rust and other compatible games.
Requirements
- VPS Ubuntu 64 bits;
- root or sudo access;
- enough disk space for the game;
- App ID of the dedicated server;
- game ports released on the firewall.
1. Update the system
sudo apt update
sudo apt upgrade -y
2. Enable required packages
SteamCMD uses 32-bit libraries:
sudo dpkg --add-architecture i386
sudo apt install -y software-properties-common
sudo add-apt-repository multiverse
sudo apt update
Press Enter if Ubuntu asks for confirmation to activate the repository.
3. Install SteamCMD
sudo apt install -y steamcmd
During installation, accept the terms presented by the Steam package.
Check the path:
which steamcmd
ls -l /usr/games/steamcmd
4. Create a user for the server
Do not run the game server as root:
sudo adduser --disabled-password --gecos "" steam
sudo mkdir -p /opt/steam
sudo chown -R steam:steam /opt/steam
Login to account:
sudo -iu steam
5. Download a dedicated server
Open SteamCMD:
/usr/games/steamcmd
In the SteamCMD console, set the folder, log in anonymously and install the application:
force_install_dir /opt/steam/meu-servidor
login anonymous
app_update APP_ID validate
quit
Replace APP_ID with the game's dedicated server identifier. The App ID of the purchased game may be different from the App ID of the server.
6. Update the server in the future
/usr/games/steamcmd +force_install_dir /opt/steam/meu-servidor +login anonymous +app_update APP_ID validate +quit
Stop the server before upgrading to avoid files in use.
7. Release game ports
The doors vary depending on the title. Consult the official server documentation and only release what is necessary.
See how to release game ports in UFW.
Common problems
Steamcmd package was not found
Confirm that the multiverse repository is active and run sudo apt update again.
SteamCMD shows permission error
Check if the files belong to the steam user:
sudo chown -R steam:steam /opt/steam
The server does not appear in the game list
Check the TCP and UDP ports, the IP entered at startup, the logs and whether the process is actually listening:
sudo ss -lntup
Frequently asked questions
Can I install more than one game?
Yes. Use a separate folder for each server and make sure it has enough CPU, RAM, disk, and ports.
Does SteamCMD need a graphical interface?
No. All installation and updating takes place via the terminal.
Where is the Valve documentation?
See the official community page about SteamCMD.
If you need help with VPS Gamer, open a ticket with Nice Hosting support.