Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can automate Valheim Dedicated Server patching without surprising players by wrapping SteamCMD in a maintenance script: post a Discord warning, wait for a defined grace period, stop the server cleanly, back up the server directory, run app_update 896660 validate, start the server with a preserved copy of your launch script, and send a ready or failure notification. The process still requires a restart; the goal is a predictable, recoverable maintenance window rather than zero downtime.

What the automation does

A safe update job is a sequence, not just a scheduled SteamCMD command. At the scheduled time it should:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Send a Discord webhook warning that maintenance is about to begin.
  2. Wait long enough for players to log out and for the community to see the notice.
  3. Stop the Valheim process cleanly.
  4. Copy or archive the Valheim server directory, including world saves and configuration you need to recover.
  5. Run SteamCMD against the Valheim Dedicated Server app (ID 896660).
  6. Start the server from a private copy of your startup script.
  7. Check that the process is actually ready, then post a success message.
  8. On any non-zero update or startup failure, post an error and leave the server stopped for operator review.

Do not treat a successful SteamCMD exit as proof that players can connect. The files may have updated while the server failed to start because of a bad argument, a missing mod, a locked save, or a changed dependency. Readiness must be a separate check.

Prepare the server before scheduling anything

Make a private copy of the launch script

Iron Gate’s dedicated-server guide (11 April 2024) warns: “We recommend that you make a copy of this file and enter the required information in the copy instead of the original, since the original file will be reset each time it is updated in Steam.” Keep your edited script outside files that Steam may replace. For example, store a Linux copy as /srv/valheim/start-valheim.sh and a Windows copy in a separate administrator-owned folder, rather than editing the shipped script in the installation directory.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Preserve every argument you rely on: world name, server name, password, public visibility, savedir, crossplay mode, mod-loader options, and any logging flags. Put the script under version control or copy it to your backup location so an update cannot silently remove a setting.

Record paths, service identity, and stop method

  • Installation directory: the directory passed to SteamCMD with +force_install_dir.
  • World and configuration directory: wherever your launch arguments place Valheim saves. Include it in the backup even if it is outside the installation directory.
  • Process owner: run the game as a dedicated, unprivileged account where possible. The account running the update must be able to stop and start the process and write backups.
  • Stop method: use your service manager’s stop action or the server’s normal console/shutdown mechanism. Avoid killing the process first; an abrupt termination can interrupt a save.
  • Locking: ensure only one update job can run at once. A lock file, systemd service state, or Task Scheduler setting prevents overlapping restarts.

Protect the Discord webhook

A webhook URL is a credential. Anyone who obtains it can post to that channel. Store it in an environment file with restrictive permissions, a secret store, or a container secret. Do not commit it to a public repository, place it in a screenshot, echo it in logs, or include it in a command line that other users can read. Rotate the webhook immediately if it appears in public output.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build the maintenance wrapper

The following Bash pattern shows the order and failure behavior. Adapt the paths, service name, warning interval, and readiness test to your installation. The webhook value is deliberately read from an environment variable rather than written into the script.

#!/usr/bin/env bash
set -Eeuo pipefail

INSTALL_DIR="/srv/valheim/server"
BACKUP_DIR="/srv/valheim/backups"
START_SCRIPT="/srv/valheim/start-valheim.sh"
WEBHOOK_URL="${DISCORD_WEBHOOK_URL:?set DISCORD_WEBHOOK_URL}"
WARNING_SECONDS=300

notify() {
  local message="$1"
  curl --fail --silent --show-error 
    -H 'Content-Type: application/json' 
    -d "$(python3 -c 'import json,sys; print(json.dumps({"content":sys.argv[1]}))' "$message")" 
    "$WEBHOOK_URL" >/dev/null
}

cleanup_on_error() {
  notify "Valheim update failed. The server is stopped for operator review." || true
}
trap cleanup_on_error ERR

flock -n 9 || { notify "Valheim update skipped: another maintenance job is running."; exit 1; }
notify "Valheim server update begins in 5 minutes. Please log out before maintenance."
sleep "$WARNING_SECONDS"

systemctl stop valheim.service
stamp="$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "$BACKUP_DIR"
tar -C "$INSTALL_DIR" -czf "$BACKUP_DIR/valheim-$stamp.tar.gz" .

steamcmd +login anonymous 
  +force_install_dir "$INSTALL_DIR" 
  +app_update 896660 validate 
  +quit

systemctl start valheim.service
# Replace this with a real readiness check for your service.
systemctl is-active --quiet valheim.service
notify "Valheim server update completed and the service is running."
trap - ERR

In production, put the lock on a dedicated file descriptor (for example, invoke the script as exec 9>/run/valheim-update.lock before the flock call), and replace the placeholder readiness check with one that proves the game is accepting connections or has emitted its normal “game ready” log line. A service merely being “active” can mean that a process exists while initialization is still failing.

Use a bounded warning period

The official material does not define a universal countdown. Five minutes is only an example. Choose a period your community will notice, then test it: a small private server may need two minutes, while a community with players in different time zones may need a longer notice plus a scheduled announcement. The important properties are that the message is sent before the stop, the wait is long enough to log out, and the delay is consistent enough that players learn the routine.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Back up before running SteamCMD

Valheim’s update instructions say to stop the server and create a backup of the Valheim folder before updating. Archive the installation and the separate save directory if your launch arguments use one. Keep at least the most recent known-good archive and enough history to recover from a bad patch. Backups on the same disk protect against a failed update but not disk loss, so copy important archives to separate storage as well.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not overwrite your only backup on every run. Give each archive a UTC timestamp, verify that it can be read, and periodically perform a test restore to a non-production directory. A backup you have never restored is an assumption, not a recovery plan.

Run the SteamCMD update safely

The core operation for the Valheim Dedicated Server is:

steamcmd +login anonymous +force_install_dir /path/to/valheim-server +app_update 896660 validate +quit

896660 is the documented Steam app ID. validate asks SteamCMD to verify installed files as part of the update; it can take longer than a normal patch because files are checked rather than simply downloaded. Keep the command’s output in a timestamped log, but redact environment variables and credentials before sending logs to a public channel.

Interpret the exit status

  • Success: continue to startup and readiness checks. Do not announce success immediately after SteamCMD.
  • Non-zero exit: do not start the server automatically. Send a concise Discord error, retain the SteamCMD log, and leave the previous stopped state available for inspection.
  • Interrupted update: restore the pre-update backup or rerun SteamCMD after determining why it stopped. Never delete the backup while troubleshooting.
  • Disk or permission error: check free space, ownership, and whether another SteamCMD process has the directory open before retrying.

If you use mods, treat a game update as a compatibility event. The update may complete correctly while a mod or loader prevents startup. Keep the mod configuration and versions in your backup, and have a documented way to disable nonessential mods for diagnosis.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Start the server and verify readiness

Keep startup arguments outside Steam-managed files

Launch the copied script after SteamCMD completes. If you use a service manager, point the service’s ExecStart (Linux) or program/action (Windows) at that copy. This preserves custom arguments even if Steam resets the original file.

Choose a readiness signal

Use the strongest check available in your environment, in this order:

  1. A documented “server ready” line in the Valheim log, followed by a short stabilization delay.
  2. A local status or health command supplied by your service wrapper.
  3. A connection test from a monitoring host to the configured game ports, combined with a process and log check.

A port responding alone is not sufficient: another process can hold the port, and a server can accept a socket while still loading a world. Conversely, a remote test can fail when the server is healthy if a firewall or relay path blocks that test. Define the check for your topology and test it after a manual restart.

Notify success and failure differently

The success message should include the UTC completion time and, if useful, the new game or mod build recorded in your log. The failure message should state that the server is stopped, include a short failure category, and point operators to the private log location. Never paste the webhook URL, full environment, or sensitive command line into Discord.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Schedule the wrapper on your platform

Linux with systemd (recommended for a dedicated host)

Use one service for the game and a separate oneshot service for maintenance. A timer invokes the update service; the update service can stop and start the game service in a controlled order.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
[Unit]
Description=Valheim scheduled update

[Service]
Type=oneshot
EnvironmentFile=/etc/valheim/discord.env
ExecStart=/usr/local/sbin/valheim-update.sh

Save this as /etc/systemd/system/valheim-update.service. Then create the timer:

[Unit]
Description=Run Valheim update weekly

[Timer]
OnCalendar=Sun *-*-* 05:00:00 UTC
Persistent=true
RandomizedDelaySec=15m

[Install]
WantedBy=timers.target

Save it as /etc/systemd/system/valheim-update.timer, run systemctl daemon-reload, enable it with systemctl enable --now valheim-update.timer, and inspect the next run with systemctl list-timers valheim-update.timer. Confirm the host’s timezone and the timer’s UTC interpretation before announcing a maintenance time.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linux with cron

Cron is adequate when you already have a reliable process supervisor and logging policy. Edit the dedicated account’s crontab with crontab -e and schedule the wrapper, for example:

0 5 * * 0 /usr/local/sbin/valheim-update.sh >> /var/log/valheim-update.log 2>&1

Cron has a minimal environment, so use absolute paths, load the webhook secret explicitly, and ensure the script does not depend on an interactive shell. Add a lock and redirect output; otherwise a failed job can be invisible until players report an outage.

Windows with Task Scheduler

Create a scheduled task that runs under the same account used by the server service. Set “Run whether user is logged on or not,” select a weekly trigger, and configure the action to launch powershell.exe with a full path to your update script. In the task’s settings, enable a timeout, prevent a second instance from starting, and write transcript or event-log output to a protected directory. The PowerShell equivalent should check $LASTEXITCODE after SteamCMD, stop on errors, and leave the server stopped when startup validation fails.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Containers

Some community Valheim container projects expose a PRE_RESTART_HOOK that runs a command such as curl -X POST before a restart and can combine scheduled updates with lifecycle hooks. If you choose this pattern, mount world saves and configuration as persistent volumes, keep the webhook in a container secret, and verify how the image handles failed updates. A container restart policy that blindly restarts a broken image can turn one failed patch into an endless crash loop. Ensure the hook runs before the container stops, and add a post-start readiness check rather than relying only on the container’s “running” state.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Discord notification approaches

Approach Best fit Control and trade-offs Failure considerations
Shell or PowerShell wrapper Administrators who want explicit backup, stop, update, and readiness logic Maximum control over timing, logs, rollback, and message text; requires scripting and secret management You must implement locking, retries, and failure handling
Container lifecycle hook Linux operators already running a maintained Valheim image Packages update/restart behavior and can expose PRE_RESTART_HOOK; less control if the image hides internals Check image maintenance, volume persistence, hook ordering, and crash-loop behavior
Discord Connector mod Operators who want in-game lifecycle events routed to Discord Configuration can include a webhook and event list, including serverLifecycle and launch, start, stop, and shutdown events Event routing alone does not enable every message; enable the corresponding message toggles and verify compatibility after game updates
ServerManager mod Players who prefer mod-based status and webhook notifications Thunderstore listing documents game-to-Discord notifications and server status events Confirm game and mod-version compatibility before relying on it for unattended maintenance

A mod can tell Discord that the game stopped or started, but it may not perform your backup or SteamCMD transaction. A wrapper can guarantee ordering but has no in-game awareness unless you add a readiness check. Combining a wrapper for maintenance with a mod for richer lifecycle events is possible, but avoid duplicate “server stopped” messages and test behavior when the mod itself fails to load.

Networking: Steam backend versus Crossplay

Iron Gate’s guide distinguishes two exposure models:

Backend Outside-LAN connectivity Port-forwarding requirement Operational note
Steam backend Players connect directly to the server’s internet-reachable endpoint Normally forward UDP port range 2456-2457 from the router/firewall to the host Keep firewall rules, router mappings, and the server’s configured ports aligned
Crossplay Traffic uses a relay path Port forwarding is not required for players outside the LAN Relay availability and platform behavior still need to be tested from the networks your players use

Crossplay’s relay behavior does not remove the need for a restart warning. A restart interrupts every connected session regardless of how players reached the server. If you change backend mode or ports in the copied startup script, validate connectivity from an external network after the next maintenance run.

Rollback and recovery plan

When the update fails before startup

  1. Leave the server stopped and preserve the SteamCMD output.
  2. Confirm the backup archive is complete and readable.
  3. Check disk space, permissions, network access to Steam, and whether another update process is running.
  4. Retry only after correcting the cause. If the same build fails repeatedly, restore the last known-good installation and saves, then investigate compatibility before reopening the server.

When the server starts but players cannot join

  • Inspect the startup log for missing files, mod-loader errors, world-load failures, or changed arguments.
  • Verify that the service is listening on the expected ports and that firewall/router rules still match.
  • Test locally, then from an external network. A local success with external failure points toward exposure or relay configuration rather than the game files.
  • Use the pre-update archive to restore files and configuration if the new build is incompatible with your mods or operational setup.

When a save appears damaged

Stop the server before copying or restoring world data. Keep the original directory untouched, restore to a separate working copy first, and retain multiple dated backups. Do not let an automated scheduler overwrite the only copy while you diagnose the save.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Operational checklist

  • Private startup script is outside Steam-managed files.
  • World saves, custom arguments, and mod configuration are included in backups.
  • Webhook URL is stored as a secret and absent from source control and public logs.
  • Only one maintenance job can run at a time.
  • Warning message is sent and the chosen countdown has been tested with real players.
  • Server stops cleanly before the backup and SteamCMD steps.
  • steamcmd +login anonymous +force_install_dir ... +app_update 896660 validate +quit returns success before startup is attempted.
  • Readiness is checked independently of the process-exists or container-running state.
  • Failure leaves the server stopped and produces an actionable private log reference.
  • A restore test has been performed, and the Steam backend or Crossplay network path has been tested from outside the LAN as applicable.

What “automatic” should mean for your community

Automation should remove repetitive work without hiding risk. Schedule updates during a quiet period, announce the exact maintenance behavior in your community rules, and keep an operator available for the first run after a major game or mod change. The dependable design is a small state machine—warn, stop, back up, update, start, verify, notify—with an explicit stopped-and-review state whenever a step fails.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.