Log inSign up

Download and update Steam dedicated servers with SteamCMD

SteamCMD is the command line Steam client that downloads dedicated server files. On Ubuntu enable multiverse, on Debian enable contrib and non-free, add the i386 architecture and run sudo apt install steamcmd. Then, as a separate steam user, run steamcmd +force_install_dir /opt/steam/NAME +login anonymous +app_update APPID validate +quit.

Topic: Game and voice servers · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13 · Updated 2026-12-03

What does SteamCMD do?

It fetches and patches the files of any game server published on Steam, using the same content system as the desktop client but without a window. Most dedicated servers can be downloaded with an anonymous login; a few require an account that owns the game. Once the files are on disk, SteamCMD has finished its job: you start the server binary yourself, and run SteamCMD again when an update arrives.

Many games on the game servers page are installed this way, including Counter-Strike 2, Valheim, Rust and Satisfactory. The Counter-Strike guide builds directly on the setup below.

How do I install SteamCMD on Ubuntu?

SteamCMD is a 32 bit program packaged in the multiverse component, so enable both and install. The package shows a license dialog; preseeding the answers lets the install run without a prompt.

sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository -y multiverse
sudo dpkg --add-architecture i386
sudo apt update
echo steam steam/question select "I AGREE" | sudo debconf-set-selections
echo steam steam/license note "" | sudo debconf-set-selections
sudo apt install -y steamcmd
ls -l /usr/games/steamcmd

The same commands work on Ubuntu 24.04 and 22.04. Read the Steam subscriber agreement before agreeing in your own deployment.

How do I install it on Debian 12 or 13?

Debian keeps the package in non-free, which depends on contrib. Debian 12 images often list sources in /etc/apt/sources.list, while Debian 13 uses the deb822 file /etc/apt/sources.list.d/debian.sources. Add the two components to whichever your server uses:

# Debian 12, one line style
sudo sed -i -e "s/ main non-free-firmware\$/ main contrib non-free non-free-firmware/" -e "s/ main\$/ main contrib non-free/" /etc/apt/sources.list

# Debian 13, deb822 style
sudo sed -i "s/^Components: main.*/Components: main contrib non-free non-free-firmware/" /etc/apt/sources.list.d/debian.sources

sudo dpkg --add-architecture i386
sudo apt update
echo steam steam/question select "I AGREE" | sudo debconf-set-selections
echo steam steam/license note "" | sudo debconf-set-selections
sudo apt install -y steamcmd

Open the file afterwards with grep -r Components /etc/apt/sources.list.d/ or cat /etc/apt/sources.list to make sure every line lists the components once. If your image uses a different layout, edit the file by hand instead of with sed.

Why give SteamCMD its own user?

Game server binaries are large closed programs that listen on public ports, so they should never run as root. A dedicated account keeps their files, saves and logs in one place and limits what a flaw could reach.

sudo useradd --system --create-home --home-dir /opt/steam --shell /usr/sbin/nologin steam
sudo -u steam -H /usr/games/steamcmd +quit

The first run downloads the current SteamCMD client into the home directory of steam and updates itself; this takes a minute. The -H flag makes sure HOME points at /opt/steam, so nothing lands in your own home folder.

How do I download a dedicated server?

Look up the app id of the dedicated server (not the game itself) on the developer documentation or on SteamDB, then install it into its own folder. The install directory must be set before the login command:

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

When it finishes you should see Success! App 896660 fully installed. The validate option checks every file and repairs damaged ones; it is slower, so leave it out of routine updates once a server works. For servers that need an owned copy, replace anonymous with your Steam user name and enter the password and Steam Guard code once; SteamCMD caches the session afterwards. Use a separate Steam account for servers rather than your main one.

How do I fix the missing steamclient.so error?

Many servers expect the Steam client library in ~/.steam/sdk64 (64 bit) or ~/.steam/sdk32 (32 bit) and fail with steamclient.so: cannot open shared object file when it is missing. Link the copy that SteamCMD downloaded:

sudo -u steam -H find /opt/steam -path "*linux64/steamclient.so"
sudo -u steam -H mkdir -p /opt/steam/.steam/sdk64
sudo -u steam -H ln -sf /opt/steam/.local/share/Steam/steamcmd/linux64/steamclient.so /opt/steam/.steam/sdk64/steamclient.so

Use the path that the find command printed if it differs on your system. Some servers also ship their own copy in the install folder; their documentation says which one they load.

How do I keep a server updated automatically?

Run the update in ExecStartPre of the systemd unit, so every restart pulls the latest build before the game starts. A nightly restart from a timer then applies patches during quiet hours.

sudo tee /etc/systemd/system/valheim.service <<EOF
[Unit]
Description=Valheim dedicated server
After=network-online.target
Wants=network-online.target

[Service]
User=steam
Environment=HOME=/opt/steam
WorkingDirectory=/opt/steam/valheim
ExecStartPre=/usr/games/steamcmd +force_install_dir /opt/steam/valheim +login anonymous +app_update 896660 +quit
ExecStart=/opt/steam/valheim/start_server.sh
Restart=on-failure
TimeoutStartSec=600

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now valheim

Adjust ExecStart to the launch script or binary of your game, with its own server name and password options. The long start timeout leaves time for large downloads. More about units and timers is in systemd services.

Which plan and firewall rules fit Steam servers?

Each game lists its own ports, almost always UDP; open only those. Valheim, for example, uses UDP 2456 to 2457:

sudo ufw allow 2456:2457/udp
sudo ufw status numbered

Disk matters too: some dedicated servers weigh only a few gigabytes, while Counter-Strike 2 needs several tens. Check df -h /opt before a large download. For CPU, the High Frequency line suits nearly every title; F2-4 (2 vCPU, 4 GB RAM, 128 GB NVMe) handles one small survival or match server, and F4-16 leaves room for big open worlds or several servers side by side.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
F2-4one small survival or match server2 vCPU, 4 GB RAM, 128 GB NVMe$14.40/mo$43.20 for 3 months
F4-16large worlds or several servers4 vCPU, 16 GB RAM, 384 GB NVMe$57.60/mo$57.60 for 1 month

Questions about SteamCMD for dedicated servers

Does SteamCMD work on Rocky Linux or AlmaLinux?

Valve publishes a tarball that runs on most distributions once the 32 bit glibc and libstdc++ packages are installed, but this guide covers the packaged route on Ubuntu and Debian, which handles dependencies and updates for you.

Why does app_update stop with error 0x202 or 0x212?

Those codes usually mean the disk is full or the install folder is not writable. Check df -h and that the folder belongs to the steam user.

Can one SteamCMD install manage several servers?

Yes. Give each server its own force_install_dir and systemd unit; they share the same client and account.

How do I see which build is installed?

Each install folder holds steamapps/appmanifest_APPID.acf; the buildid line shows the installed build.

Do I need a Steam account at all?

Only for servers that refuse anonymous logins. Most popular dedicated servers download anonymously.