How to Keep a SteamCMD Game Server Updated Automatically
Stop manually patching your game server. Build an auto-update routine with SteamCMD, a systemd timer or cron, graceful restarts, and player warnings โ set it once.
Manually updating a game server every time it patches gets old fast โ and a server running an outdated build often refuses connections until you fix it. This guide builds a reliable auto-update routine with SteamCMD, a schedule, and graceful restarts, so your server stays current on its own. It works for any SteamCMD game: Rust, Valheim, Palworld, ARK, and the rest.
The pattern
Every SteamCMD update follows the same shape:
- Warn players and stop the server cleanly.
- Run SteamCMD's
+app_update <APPID> validate. - Start the server again.
The trick is doing this on a schedule without you present, and only restarting when it's actually needed. If you're new to SteamCMD, read how to run any SteamCMD game server on a Linux VPS first.
Step 1: Write an update script
Create /home/steam/update.sh. This example updates Valheim (App ID 896660) โ swap in your game's App ID and service name:
#!/bin/bash
APPID=896660
SERVICE=valheim
INSTALL_DIR=/home/valheim/server
echo "[$(date)] Stopping $SERVICE"
sudo systemctl stop $SERVICE
echo "[$(date)] Updating app $APPID"
/usr/games/steamcmd +force_install_dir $INSTALL_DIR \
+login anonymous +app_update $APPID validate +quit
echo "[$(date)] Starting $SERVICE"
sudo systemctl start $SERVICE
chmod +x /home/steam/update.sh
{{SCREENSHOT}}
Step 2: Schedule it with a systemd timer
A systemd timer is cleaner than cron and gives you logs. Create the service and timer:
# /etc/systemd/system/gameupdate.service
[Unit]
Description=Update game server via SteamCMD
[Service]
Type=oneshot
ExecStart=/home/steam/update.sh
# /etc/systemd/system/gameupdate.timer
[Unit]
Description=Run game server update daily
[Timer]
OnCalendar=*-*-* 05:00:00
Persistent=true
[Install]
WantedBy=timers.target
Enable it:
sudo systemctl daemon-reload
sudo systemctl enable --now gameupdate.timer
systemctl list-timers gameupdate.timer
Now the update runs every day at 05:00 โ an off-peak hour when few players are online.
Alternative: a simple cron job
If you prefer cron, the same thing in one line (crontab -e):
0 5 * * * /home/steam/update.sh >> /var/log/gameupdate.log 2>&1
Step 3: Warn players before the restart
An abrupt restart mid-session frustrates players. If your game supports RCON, send a warning before stopping. For Rust, for example, you might broadcast a message via RCON a few minutes before the update window. Even a simple "server restarts at 5am daily for updates" note in your server description sets expectations. Pair the update with a graceful restart approach from automating game server restarts with systemd.
Step 4: Handle update-only-when-needed (optional)
SteamCMD's validate is safe to run daily โ if there's no update, it verifies files quickly and moves on. For heavier games where you'd rather only restart when there's genuinely a new build, you can compare the installed build ID against the latest from steamcmd +app_info_print, and skip the restart when they match. For most servers, a daily off-peak validate-and-restart is simpler and perfectly fine.
Verify the update actually worked
An automated job you never check is a job you can't trust. After setting it up, confirm it runs cleanly and leaves the server healthy:
# was the last run successful?
systemctl status gameupdate.service
# read the update log
journalctl -u gameupdate.service --since "yesterday"
# is the game server back up?
systemctl status valheim
It's also worth pairing the update job with a quick health check โ a monitoring tool that alerts you if the server doesn't come back online is invaluable for an unattended box. See how to monitor server resources on Linux. And always keep a recent backup before any update in case a new build breaks something: how to back up your game server automatically shows how to snapshot saves on the same kind of schedule.
FAQ
How do I update a SteamCMD game server?
Stop the server, run steamcmd +force_install_dir <dir> +login anonymous +app_update <APPID> validate +quit, then start it again. Automate that sequence with a systemd timer or cron job.
Will re-running app_update every day cause problems?
No. If there's no new build, validate just verifies the existing files and finishes quickly. It's safe to run on a daily schedule.
How do I avoid interrupting players during updates?
Schedule updates for an off-peak hour (like 5am), warn players via RCON or your server description, and use a graceful restart. Many communities announce a fixed daily restart window.
Does auto-update work for any Steam game server?
Yes โ the pattern is identical across Rust, Valheim, Palworld, ARK, and others. Just change the App ID, install directory, and service name in the script.
Want a host where cron, systemd, and full root all just work? That's every Nxeon box โ see VPS pricing or game server hosting.