All tutorials
13 min read

How to Install SteamCMD on Ubuntu 24.04

Install SteamCMD on Ubuntu 24.04 in 7 steps: enable multiverse and i386, accept the Steam license, add a steam user, and download servers with app_update.

TL;DR:

  • Enable the multiverse repository and the i386 architecture, accept Valve's license, install the steamcmd package (0~20180105-5) and run it as an unprivileged steam user.
  • Ubuntu builds the package for i386 only, so has no installation candidate on Ubuntu 24.04 means apt has no i386 package list: add the architecture and run apt update.
  • Put +force_install_dir before +login anonymous, then +app_update <app ID> validate. The example downloads the Valheim server, app 896660, about 2.2 GB.
  • Valve's tarball is the fallback route and needs the lib32gcc-s1 package.
  • Palworld, Valheim, Project Zomboid, Satisfactory, Garry's Mod and Rust servers download with an anonymous login. Arma 3 and DayZ need a Steam account.
  • Players do not connect to SteamCMD, so this tutorial adds no UFW rule. Each game tutorial opens its own game ports.

Applies to: Ubuntu 24.04 LTS · steamcmd 0~20180105-5 · checked October 2026

SteamCMD is Valve's command-line version of the Steam client, used to install and update dedicated game servers from Steam in a terminal. This tutorial installs SteamCMD on Ubuntu 24.04 LTS from Ubuntu's multiverse repository, with Valve's tarball as the fallback, runs it as an unprivileged steam user, and covers anonymous downloads, scripted updates, file locations and common SteamCMD errors. A VPS keeps a game server online when your own PC is off.

Prerequisites

  • A VPS running Ubuntu 24.04 LTS on an x86-64 (amd64) processor, with your SSH public key added at deploy and free disk space for the game server files (see the app ID table below). Arct Cloud plans include NVMe storage from 15 GB on cvm.pico to 300 GB on vm.xlarge and hvm.xlarge.
  • An SSH key pair. See How to Generate an SSH Key on Windows, macOS, and Linux.
  • A non-root user with sudo privileges that logs in with your SSH key. The commands below create one.

On a new server, log in as root and create the sudo user. The rsync line copies root's authorized SSH key to the new account, because the key added at deploy belongs to root:

adduser deploy
usermod -aG sudo deploy
rsync --archive --chown=deploy:deploy ~/.ssh /home/deploy

Open a second terminal and confirm ssh [email protected] works before you log out as root. Replace 203.0.113.10 with your server's public IP address.

No Steam account is needed for servers that allow an anonymous login. The steps also apply to Ubuntu 26.04 LTS, whose multiverse repository carries the same steamcmd package.

Commands run as the sudo user.

Step 1: Enable multiverse and the i386 architecture

Ubuntu ships SteamCMD in the multiverse repository as a 32-bit (i386) package, so a 64-bit server needs both enabled before apt can find it:

sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository -y multiverse
sudo dpkg --add-architecture i386
sudo apt update

Confirm that i386 is active and that apt now has a candidate version:

dpkg --print-foreign-architectures
apt-cache policy steamcmd

The output looks similar to this:

i386
steamcmd:i386:
  Installed: (none)
  Candidate: 0~20180105-5
...

If the Candidate: line reads (none), or apt prints nothing for steamcmd, run the five commands again and read the output of each for errors.

Step 2: Accept the Steam License Agreement

The package asks you to accept Valve's Steam License Agreement, which incorporates the Steam Subscriber Agreement, and stops the install if you decline. Read the agreement, then record your answer so apt runs without a dialog:

echo steam steam/question select "I AGREE" | sudo debconf-set-selections
echo steam steam/license note '' | sudo debconf-set-selections

If you skip these two lines, apt opens the agreement in a text dialog. Scroll with the arrow keys, press Tab to reach Ok, then select I AGREE on the next screen.

Step 3: Install the steamcmd package

Install SteamCMD. Apt pulls in the 32-bit C and C++ libraries it needs as i386 dependencies:

sudo apt install -y steamcmd

Check the installed package:

dpkg -s steamcmd | grep -E '^(Status|Architecture|Version):'

The output looks similar to this:

Status: install ok installed
Architecture: i386
Version: 0~20180105-5

The package installs a wrapper script at /usr/games/steamcmd. Its version number is the date of the bundled SteamCMD bootstrap, January 5, 2018; SteamCMD downloads its current files on the first run.

Step 4: Create the steam user

Valve's documentation warns against running SteamCMD as root. Create an unprivileged system user named steam with no login shell, and a folder for game servers:

sudo useradd --system --create-home --home-dir /home/steam --shell /usr/sbin/nologin steam
sudo -u steam mkdir -p /home/steam/servers

The game tutorials on this site create one service user per game, such as palworld. The commands in this tutorial work the same way with that user name in place of steam.

Step 5: Run SteamCMD for the first time

Run SteamCMD once as the steam user. It downloads its own update and exits at +quit:

sudo -u steam -H /usr/games/steamcmd +quit

Use the full /usr/games/steamcmd path with sudo. Ubuntu's default sudo secure_path does not include /usr/games, so sudo -u steam steamcmd fails with command not found. The -H flag sets HOME to /home/steam, where the wrapper keeps SteamCMD's files.

List the folder the first run created:

sudo ls /home/steam/.local/share/Steam/steamcmd

The folder holds steamcmd.sh and the linux32 directory. SteamCMD checks for a newer version of itself on every start.

To type commands at the interactive Steam> prompt instead, run sudo -u steam -H /usr/games/steamcmd without arguments, and type quit to leave.

Step 6: Download a game server with app_update

Every Steam game server has an app ID. This example downloads the Valheim dedicated server, app 896660, which allows an anonymous login. Check free disk space first:

df -h /home

Then download the server:

sudo -u steam -H /usr/games/steamcmd \
  +force_install_dir /home/steam/servers/valheim \
  +login anonymous \
  +app_update 896660 validate \
  +quit

Valve recommends setting +force_install_dir before +login. Valve's documentation also says the packaged SteamCMD returns an error for . as the folder, so give an absolute path. validate checks every file against Steam's copy on this first install. Replace 896660 and the folder name with the game you host; the app ID table below lists more servers. To install a beta branch, put the app ID and -beta <branch> in one quoted argument, such as +app_update "896660 -beta <branch>" validate, with the branch name from the game's guide. In a +runscript file, write app_update 896660 -beta <branch> without quotes.

The output ends similar to this:

...
Success! App '896660' fully installed.

Step 7: Verify the download

SteamCMD records each installed app in a manifest file inside the install folder. Check the app name and the build it downloaded:

sudo grep -h -E '"(name|buildid)"' /home/steam/servers/valheim/steamapps/appmanifest_896660.acf

The output looks similar to this:

	"name"		"Valheim Dedicated Server"
	"buildid"		"25730807"

The build ID changes with every game update, so your number may differ. Check the space the server uses with sudo du -sh /home/steam/servers/valheim.

Starting the server is game-specific: each game needs its own runtime libraries, ports and systemd unit. Follow the game tutorial linked in the app ID table.

Install SteamCMD from Valve's tarball (fallback)

Use Valve's archive when the package route fails or on a distribution without a steamcmd package. It runs from a folder you choose and needs the 32-bit GCC runtime library. Skip Steps 1 to 3 for this route, and complete Step 4 first so the steam user exists:

sudo apt install -y curl lib32gcc-s1
sudo -u steam mkdir -p /home/steam/steamcmd
curl -fsSL https://client-update.steamstatic.com/installer/steamcmd_linux.tar.gz \
  | sudo -u steam tar -xzf - -C /home/steam/steamcmd
sudo -u steam -H /home/steam/steamcmd/steamcmd.sh +quit

On this route, call /home/steam/steamcmd/steamcmd.sh wherever this tutorial uses /usr/games/steamcmd. Use one route per user, so SteamCMD's files stay in one place.

Update game servers with a SteamCMD script

Stop a game server before you update it, then run the same app_update command again: Valve's documentation uses app_update both to install and to update an app. Leave validate out of routine updates: Valve's documentation says validation overwrites changed files, such as edited configs, and recommends it for the first install and for broken installs.

A script file keeps the update in one place. Create /home/steam/update-valheim.txt:

sudo -u steam tee /home/steam/update-valheim.txt > /dev/null <<'EOF'
@ShutdownOnFailedCommand 1
@NoPromptForPassword 1
force_install_dir /home/steam/servers/valheim
login anonymous
app_update 896660
quit
EOF

Run it with +runscript and an absolute path. Valve's documentation says a relative path can fail with Failed to load script file:

sudo -u steam -H /usr/games/steamcmd +runscript /home/steam/update-valheim.txt

@ShutdownOnFailedCommand 1 stops SteamCMD at the first failed command, and @NoPromptForPassword 1 stops it from waiting for a password. To update several servers in one script, repeat the force_install_dir and app_update pair for each and set @ShutdownOnFailedCommand 0, as Valve's example notes.

To update on every start, a game's systemd unit runs SteamCMD before the server. The Palworld tutorial does this with an inline app_update. With the script above, the lines look like this:

[Service]
User=steam
ExecStartPre=-/usr/games/steamcmd +runscript /home/steam/update-valheim.txt
TimeoutStartSec=1800

The - before the path lets the server start when Steam is unreachable. TimeoutStartSec=1800 gives a large update 30 minutes, because systemd stops a unit that has not started within 90 seconds by default. A restart then applies any update, and a daily systemd timer that restarts the server keeps it current.

Where SteamCMD files live on Ubuntu

PathContents
/usr/games/steamcmdUbuntu's wrapper script (package route)
/usr/lib/games/steamThe bootstrap copy the package installs
/home/steam/.local/share/Steam/steamcmdSteamCMD's own files, updated on each start (package route)
/home/steam/.steamLinks named root and steam that point to ~/.local/share/Steam
/home/steam/.local/share/Steam/steamapps/commonDefault game folder when force_install_dir is not set (package route)
/home/steam/steamcmdSteamCMD's files on the tarball route in this tutorial
/home/steam/servers/<game>Game server files, set by force_install_dir

Remove SteamCMD

Remove the package:

sudo apt purge steamcmd

During the purge, the package shows a note that Steam's working files stay in the home folders. Delete SteamCMD's files with sudo rm -rf /home/steam/.local/share/Steam /home/steam/.steam.

To remove the steam user as well, stop and disable every game service that runs as steam first (sudo systemctl disable --now <unit>), because userdel refuses to remove a user with running processes. Then remove the steam user, its home folder and every game server in it with sudo userdel -r steam.

Troubleshoot common SteamCMD errors

SymptomCauseFix
E: Package 'steamcmd' has no installation candidateMultiverse is on, but i386 is not, or apt was not refreshed after adding itsudo dpkg --add-architecture i386, then sudo apt update
E: Unable to locate package steamcmdMultiverse is off, or apt was not refreshedsudo add-apt-repository -y multiverse, then sudo apt update
Installation terminated: Steam License Agreement was DECLINED.No I AGREE answer was recordedRun the Step 2 lines, then install again
sudo: steamcmd: command not found/usr/games is not in sudo's pathCall /usr/games/steamcmd
ERROR! Failed to install app '258550' (No subscription)The app needs a Steam account, or the command has no +login anonymousAdd +login anonymous; check the login column below
Login Failure: No ConnectionA firewall blocks Steam traffic, per ValveIf UFW is active, check that sudo ufw status verbose shows allow (outgoing). If your provider runs a network firewall in front of the server, allow inbound UDP from source ports 27000 to 27030 and 4380 there, as Valve's SteamCMD page shows
error while loading shared libraries: libstdc++.so.632-bit library missing (tarball route)sudo apt install lib32stdc++6
Error! App '896660' state is 0x202 after update job.Not enough disk space, per LinuxGSM's SteamCMD error listdf -h /home, free space, then run the download again with validate
Failed to load script fileRelative script pathPass the absolute path to +runscript

Steam server app IDs for SteamCMD

The Linux server files column adds up the sizes of each server's Linux depots in Steam's app data on October 6, 2026. Saves, mods, logs and backups grow on top, and the disk also holds Ubuntu.

GameServer app IDLoginLinux server filesTutorial or note
Palworld2394010anonymousabout 4.9 GBPalworld dedicated server
Valheim896660anonymousabout 2.2 GBValheim dedicated server
Project Zomboid380870anonymousabout 7.2 GBProject Zomboid server
Satisfactory1690800anonymousabout 2.9 GBLinux build on the official wiki
Garry's Mod4020anonymousabout 6.9 GBFacepunch wiki
Rust258550anonymousabout 6.1 GBFacepunch asks for 15 GB of free disk
Arma 3233780Steam accountnot listedBohemia wiki: no Arma 3 purchase needed
DayZ223350Steam accountnot listedBohemia's Linux server guide

Facepunch's 15 GB for Rust is free disk space, so the disk needs room for Ubuntu on top of it.

Arma 3 and DayZ servers download only after a login with a Steam account. Valve recommends a separate Steam account for servers instead of your personal one, and Bohemia's Arma 3 guide warns that SteamCMD caches the login, so anyone who gets into the server can use that account. Do not log in to SteamCMD on a server with your personal Steam account. This tutorial covers anonymous downloads only.

FAQ

How do I install SteamCMD on Ubuntu?

Enable the multiverse repository and the i386 architecture, run apt update, accept the Steam License Agreement and install the steamcmd package with apt. Then run it as an unprivileged user with the full path /usr/games/steamcmd.

Where is SteamCMD installed on Linux?

Ubuntu's package puts a wrapper at /usr/games/steamcmd and keeps SteamCMD's files in ~/.local/share/Steam/steamcmd of the user who runs it. Without force_install_dir, games land in ~/.local/share/Steam/steamapps/common. Valve's tarball runs from the folder you extract it to.

Why is SteamCMD not working?

The usual causes are a missing i386 architecture at install, calling steamcmd through sudo without the /usr/games path, a missing login anonymous before app_update, a full disk, or a server that needs a Steam account. The error text in the troubleshooting table points to the fix.

Is SteamCMD safe?

SteamCMD is Valve's official command-line Steam client. Install it from Ubuntu's multiverse repository or Valve's own download, run it as an unprivileged user as Valve advises, and use anonymous login so no Steam account login is cached on the server.

How do I update a game server with SteamCMD?

Stop the game server and run the same app_update command again, or a script with +runscript. Add validate only when files look broken, because Valve says it overwrites edited files such as configs.

Can I use SteamCMD login anonymous for every game server?

No. Valve says most game servers download anonymously, and Palworld, Valheim and Project Zomboid do. Arma 3 and DayZ servers need a login with a Steam account, and Valve recommends a separate account for servers.

What does force_install_dir do in SteamCMD?

It sets the folder where the next app_update installs a game server. Valve recommends placing it before the login command and says the packaged SteamCMD rejects a dot (the current folder) as the path, so use an absolute path such as /home/steam/servers/valheim.

Next steps

High Performance plans run on AMD Ryzen 9 up to 5.7 GHz or AMD EPYC Genoa 9004 Series up to 4.3 GHz, with DDR5 RAM. Compare plans.

This work is licensed under CC BY-NC-SA 4.0.