Counter-Strike 2 Field guide

Update a CS2 server without losing configuration

Update a Counter-Strike 2 server via SteamCMD while protecting custom game configurations and Metamod:Source hooks in gameinfo.gi.

Update a CS2 server without losing configuration

Counter-Strike 2 updates release frequently, often requiring immediate application so players running the updated client can connect. However, running a standard SteamCMD validation can silently overwrite game mode parameters and break addon frameworks like Metamod:Source if custom configurations were placed in Valve's default template files.

This maintenance guide targets self-hosted Linux CS2 dedicated server administrators. As of October 27, 2026, Counter-Strike 2 dedicated server binaries are distributed via SteamCMD under App ID 730.

Where to store custom server configurations#

The primary cause of configuration loss after updates is editing default Valve templates, such as game/csgo/cfg/gamemode_competitive.cfg or gamemode_casual.cfg. During cache validation (validate), SteamCMD overwrites these files with stock distributions.

To safeguard your custom configuration:

  • Place persistent variables in game/csgo/cfg/server.cfg and game/csgo/cfg/autoexec.cfg.
  • For specialized competitive or tournament rules, maintain isolated scripts (such as game/csgo/cfg/my_comp.cfg) and invoke them using exec my_comp.cfg.
  • Never edit stock files prefixed with gamemode_.

SteamCMD updates only files managed by Valve's official app manifest. Custom .cfg scripts and user-created files remain completely safe across updates.

Graceful shutdown and pre-update backup#

Notify connected players and terminate the server process cleanly through the console or RCON:

bash
quit

Archive your custom configurations and the engine metadata descriptor gameinfo.gi:

bash
set -eu
BACKUP_DIR="/srv/cs2-backups/$(date +%Y-%m-%d-%H%M)"
mkdir -p "$BACKUP_DIR"
tar -czf "$BACKUP_DIR/cs2-cfg-backup.tar.gz" -C /srv/cs2/game/csgo cfg
cp -p /srv/cs2/game/csgo/gameinfo.gi "$BACKUP_DIR/gameinfo.gi.bak"

Backing up gameinfo.gi is critical if your server runs Metamod:Source or CounterStrikeSharp.

Update sequence: graceful stop and backup, SteamCMD validation, restoring gameinfo.gi hook, and status verification.

Updating server binaries via SteamCMD#

Run the official dedicated server update with validation enabled:

bash
/usr/games/steamcmd +force_install_dir /srv/cs2 \
  +login anonymous \
  +app_update 730 validate \
  +quit

The validate flag compares local Source 2 engine binaries against Valve's repository and downloads updated assets. Wait until the output prints Success! App '730' fully installed.

Restoring the Metamod hook in gameinfo.gi#

If your server runs Metamod:Source plugins, SteamCMD validation always restores game/csgo/gameinfo.gi to its stock vanilla state. The plugin files inside addons/ remain intact on disk, but the Source 2 engine ceases loading them.

Inspect game/csgo/gameinfo.gi and ensure the Metamod entry exists within the SearchPaths block:

bash
grep -n "Game_csgo/addons/metamod" /srv/cs2/game/csgo/gameinfo.gi || true

If the line was removed, re-insert it directly below the opening of SearchPaths:

text
Game_csgo/addons/metamod

Restore file ownership to your dedicated service user:

bash
chown -R cs2:cs2 /srv/cs2

Starting the server and verifying operational status#

Launch the service under user cs2 and execute validation commands in the console:

bash
version
status
meta list

The version command displays the newly applied patch build and network protocol version. The meta list command confirms that Metamod has hooked the engine successfully and that active plugins are loaded.

If you manage your game infrastructure through Nexardo, standardize update hooks in your automated maintenance workflows: automated configuration preservation protects competitive schedules from abrupt Valve engine updates.

Sources#