SteamCMD for Valheim: What It Is and How to Use It

SteamCMD is Valve’s command-line version of the Steam client, built for servers that have no desktop. For Valheim you use it for exactly two jobs: the initial download of the free dedicated-server package, and every update afterwards. One command does both, which is why learning it properly pays off — an out-of-date server is the most common reason a group suddenly can’t connect.

Why you need it at all

The dedicated server isn’t in your games library the normal way. It’s a separate free package with its own App ID, and it’s designed to be fetched by tooling rather than clicked on. SteamCMD is that tooling.

It logs in anonymously. Because the server package is free, you don’t hand your Steam credentials to a server:

+login anonymous

This is worth internalising. Any guide asking you to put your real Steam password on a game server for a Valheim install is doing something unnecessary.

It’s also the updater. The same command that installs is the command that patches. There is no separate update tool.

Know your two App IDs

  • 896660 — the Valheim dedicated server. This is the one you install.
  • 892970 — the game itself. You don’t install this on the server.

They’re easy to transpose, and the failure is confusing: you end up with a game install that won’t run headless, or SteamCMD asking for a login because the game isn’t free. If a download demands credentials, check the ID first.

Confusingly, the server process itself often needs the game’s App ID exported in its environment at launch — that’s why start scripts set an app-ID variable to 892970 before running the server binary. That’s a runtime detail of the server, not a SteamCMD argument. Copy it from the start script that ships with the server rather than reasoning about it.

Install SteamCMD

On Windows: download the SteamCMD zip from Valve’s official SteamCMD documentation page, extract steamcmd.exe into a folder such as C:\steamcmd, and run it once so it can self-update. It will download a batch of files and leave you at a Steam> prompt; quit exits.

On Debian/Ubuntu: it’s packaged, but in a component you may need to enable, and it shows a licence prompt on install:

sudo apt update
sudo apt install steamcmd

On other distributions, either use the distribution package or extract Valve’s tarball into a directory owned by a normal user. Two rules regardless of platform:

  • Don’t run it as root. SteamCMD dislikes it and it’s a bad habit for a network-facing service. Create a dedicated user.
  • It needs 32-bit support libraries. On a 64-bit Linux host, missing lib32 packages are the classic cause of a SteamCMD that starts and immediately dies. Install your distribution’s Steam dependency set if the first run fails.

The one command you actually use

steamcmd +force_install_dir /home/valheim/server +login anonymous +app_update 896660 validate +quit

Piece by piece:

  • +force_install_dir sets where the files land. Put it before +login. Ordering is load-bearing here — SteamCMD applies arguments in sequence, and a directory set after the login is ignored, quietly installing into its default location instead. This single detail causes more confusion than anything else in SteamCMD.
  • +login anonymous authenticates as nobody, which is all a free package needs.
  • +app_update 896660 downloads or patches the server.
  • validate verifies every file against Steam’s manifests. Slower, but it repairs a partial or corrupted install. Use it on first install and whenever something is behaving strangely; you can drop it for routine updates.
  • +quit exits instead of dropping to the interactive prompt — essential in a script.

Use an absolute path for the install directory. Relative paths resolve against SteamCMD’s own working directory, not yours.

On Windows the same command with Windows paths:

steamcmd.exe +force_install_dir C:\valheim-server +login anonymous +app_update 896660 validate +quit

Wrap updates in a script

Because updating is a repeated task, make it one file rather than something you retype. On Linux:

#!/usr/bin/env bash
set -euo pipefail
SERVER_DIR="/home/valheim/server"
sudo systemctl stop valheim
steamcmd +force_install_dir "$SERVER_DIR" +login anonymous +app_update 896660 validate +quit
sudo systemctl start valheim

Stopping the server first matters: patching files under a running process is how you get a half-updated install. If you run under systemd, see Run a Valheim Server as a systemd Service; if you run in Docker, the image handles this for you and you don’t touch SteamCMD directly.

Errors that waste the most time

“Failed to install app … No subscription”. You used the game’s App ID with an anonymous login. Switch to 896660.

SteamCMD exits instantly with a library error. Missing 32-bit runtime libraries. Install the Steam dependency packages for your distribution.

Files appear somewhere unexpected. +force_install_dir came after +login, or you used a relative path.

Timeouts or “connection to Steam servers” failures. Usually transient; retry. If it’s persistent, your outbound firewall is blocking Steam’s content servers — a locked-down VPS can do this.

Update runs but the server is still on the old build. The process was running during the update and kept its old files open, or you patched a different directory than the one your start script launches from. Check the path in both places.

Permission denied writing to the install directory. You installed SteamCMD as one user and are running it as another. Keep one owner for both.

When to run it

Every time the game updates. Clients patch themselves through Steam automatically; the server never does unless you tell it to, and a server on an older build won’t accept updated clients. That mismatch is silent from the player’s side — it looks like a timeout, as covered in Why Valheim Says Connection Timed Out — and How to Fix It.

Keep the update script next to your start script, run it before your group’s regular session, and SteamCMD becomes something you think about roughly never.