steamcmd
Download and update dedicated game servers
TLDR
Install or update an application anonymously
Install or update an application using the specified credentials
Install an application for a specific platform
Clear cached login credentials for a user
SYNOPSIS
steamcmd
[+login <username> [password]]
[+force_install_dir <path>]
[+app_update <AppID> [validate] [beta <branch>] [betapassword <password>]]
[+command ...]
steamcmd +runscript <scriptfile>
PARAMETERS
+login <username> [password]
Logs into a Steam account. Use anonymous for public servers that don't require an account.
+force_install_dir <path>
Sets the installation directory for game files. All subsequent app downloads will target this path.
+app_update <AppID>
Downloads or updates the specified application ID. Required for installing game servers.
validate
An optional argument for +app_update. Verifies the integrity of game files after an update, replacing any corrupted or missing files.
beta <branch>
An optional argument for +app_update. Specifies a beta branch to download (e.g., public, prerelease) instead of the default stable version.
betapassword <password>
An optional argument for +app_update. Provides the password for a protected beta branch.
+quit
Exits steamcmd after executing all preceding commands. Useful for scripting.
+runscript <scriptfile>
Executes a sequence of steamcmd commands from a specified script file, one command per line.
+command
Allows chaining multiple steamcmd commands directly on the command line. Each command should be prefixed with a plus sign.
DESCRIPTION
steamcmd is a command-line utility provided by Valve that allows users to install, update, and manage dedicated servers for various Steam games and applications. Unlike the graphical Steam client, steamcmd is designed for server environments, offering a lightweight and headless solution. It's essential for game server administrators who need to automate server maintenance, deploy updates efficiently, and manage multiple game servers without a graphical interface. It supports a wide range of Steam games that offer dedicated server binaries, making it a critical tool for running community game servers on Linux. Its primary functions include logging in anonymously or with a Steam account, downloading specific application IDs (AppIDs), validating installations, and updating server files.
CAVEATS
steamcmd typically runs as a 32-bit application and requires 32-bit compatibility libraries on 64-bit Linux systems. It's highly recommended to run steamcmd and game servers under a dedicated, unprivileged user account for security reasons, rather than as root. Network connectivity is crucial for downloads and updates. Firewall configurations might need adjustment to allow necessary Steam ports.
INSTALLATION
steamcmd is usually not available in standard Linux repositories. It needs to be downloaded directly from Valve's servers. Typically, you create a directory (e.g., ~/steamcmd), download the steamcmd_linux.tar.gz archive, extract it, and then execute ./steamcmd.sh. The first run will self-update and initialize the client.
COMMON WORKFLOW
A typical workflow involves launching steamcmd with a chain of commands: ./steamcmd.sh +login anonymous +force_install_dir /path/to/server +app_update <AppID> validate +quit. These commands are often placed in a shell script (e.g., update_server.sh) for easy automation and scheduling.
APPID DISCOVERY
To find the correct AppID for a specific game or dedicated server, users often consult third-party resources like SteamDB (steamdb.info) or the game's official documentation, as steamcmd itself does not provide an AppID lookup feature.
HISTORY
steamcmd emerged as a replacement for the deprecated HLDSUpdateTool, which was primarily used for Source Engine and GoldSrc game servers. As Steam's ecosystem grew and more games offered dedicated server support, a unified and robust command-line tool became necessary. steamcmd provides a consistent interface for managing a vast array of AppIDs, simplifying server deployment and maintenance across different titles, and has been continuously updated by Valve to support new features and game requirements.