Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
VGSources
Blog

How to Set Up Automatic Valheim Server Updates with Discord Warnings

A practical, fail-safe workflow for scheduled Valheim server updates with Discord warnings, backups, SteamCMD app ID 896660, restart checks, and Steam-backend versus Crossplay networking guidance.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can automate a Valheim Dedicated Server update without surprising players by wrapping the maintenance in one controlled sequence: post a Discord warning, wait for a configurable grace period, stop the server cleanly, back up the Valheim directory, run SteamCMD with app ID 896660, start your preserved launch script, verify that the process is ready, and report success or failure to Discord. The server still has to restart; the goal is predictable downtime, not zero-downtime patching.

This guide covers Linux services, Windows Task Scheduler, and container deployments, plus Steam-backend versus Crossplay networking. It also shows how to keep Steam updates from erasing custom launch arguments and how to leave a failed update safely stopped for operator review.

As an Amazon Associate I earn from qualifying purchases.

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

What the automatic update workflow actually does

A reliable maintenance job performs these actions in order:

  1. Send a pre-maintenance Discord webhook message, for example, “Valheim server update begins in 5 minutes.”
  2. Wait for the warning interval you choose so players can log out.
  3. Stop the Valheim process cleanly and confirm it is no longer running.
  4. Create a dated backup of the Valheim server directory, including world saves and configuration that you need to restore.
  5. Run SteamCMD: steamcmd +login anonymous +force_install_dir /path/to/valheim-server +app_update 896660 validate +quit.
  6. Start the copied startup script, not the Steam-managed original.
  7. Wait for the service or process to become ready, then post a success message.
  8. If SteamCMD or startup returns a non-zero status, post an error and leave the server stopped until you inspect the logs or restore a backup.

Every step should be logged with a timestamp. A failed update must not automatically launch an unverified binary while players are connecting.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Decide your network mode before scheduling restarts

Steam-backend servers

Iron Gate’s dedicated-server guide says a normal Steam-backend server uses ports 2456–2457 and needs internet-accessible port forwarding for players outside the local network. Forward the same protocol and port range through your router and host firewall, and keep the forwarding pointed at the machine that runs the server. A restart does not change the required ports, but players will be disconnected while the process is down.

Crossplay servers

Crossplay sends traffic through a relay, so outside-LAN access does not require port forwarding. You still need a running server and outbound internet access. Do not remove firewall rules blindly: local-LAN policy, host security, and the server’s own listening configuration still matter.

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

Choose the mode deliberately and document it beside your maintenance script. A port-forwarding fix for Steam-backend play will not solve a problem caused by a stopped process, and adding forwarding is unnecessary for Crossplay’s outside-LAN relay path.

Preserve the startup script Steam can overwrite

Iron Gate’s official dedicated-server guide, dated 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.” Treat that as a prerequisite, not an optional precaution.

Create a private launch copy

  1. Locate the startup file supplied with the dedicated server.
  2. Copy it to a separate name such as start_valheim_custom.sh (or an equivalent PowerShell or batch file on Windows).
  3. Put your world name, password, public visibility, Crossplay or Steam setting, and any other custom start arguments in the copy.
  4. Make your service manager, container, or scheduled task call the copied file.
  5. Keep the copy outside any directory that Steam may replace, or restore it from version control after an update.

Do not edit only the original and assume the change is permanent. Steam can reset that file during an update, causing the next automated restart to lose your world selection or other launch arguments.

Build the maintenance wrapper

The wrapper is the single entry point used by cron, a systemd timer, Task Scheduler, or a container’s scheduled job. It should fail closed: a failed stop, backup, update, or startup check ends the run and sends an error notification.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Store the webhook as a secret

Use a Discord webhook created for a private maintenance channel. Put the URL in an environment variable, a root-readable secret file, or your container secret store. Never commit it to a public script, paste it into a support ticket, or print it in command output. Rotate the webhook immediately if it leaks.

A minimal shell notification function can look like this:

discord_notify() {
  curl --fail --silent --show-error -X POST 
    -H 'Content-Type: application/json' 
    -d "{"content":"$1"}" "$DISCORD_WEBHOOK_URL"
}

Quote the message and URL correctly, enable shell error handling, and write curl errors to a protected log. If Discord is unavailable, the maintenance job should still record that notification failure and alert you through whatever secondary monitoring you operate.

Use an explicit sequence

Adapt the following outline to your service names and paths rather than copying unknown stop commands into production:

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.
set -eu
: "${DISCORD_WEBHOOK_URL:?missing webhook}"

# 1. Warn players
discord_notify 'Valheim server update begins in 5 minutes.'
sleep 300

# 2. Stop the service cleanly
systemctl stop valheim

# 3. Back up the complete server directory
# Use your backup tool here and verify its exit status.

# 4. Update the dedicated-server files
steamcmd +login anonymous +force_install_dir /path/to/valheim-server +app_update 896660 validate +quit

# 5. Start the preserved script
systemctl start valheim

# 6. Check readiness using your service/log health check
discord_notify 'Valheim server update completed and the server is online.'

The outline intentionally leaves the backup and readiness commands deployment-specific. Your backup tool must return a failure when it cannot read or write the archive; your readiness check must distinguish “process exists” from “server is accepting players.” If any command fails, send an error notification and do not run the success branch.

Back up worlds and configuration before every update

The Valheim update instructions say to stop the server and create a backup of the Valheim folder before running the update. Do this on every scheduled run, even when the patch looks small. Include world files, character or server-side data that your installation uses, the copied startup script, and any mod or configuration files needed to reproduce the current launch.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Make backups recoverable

  • Use a timestamped directory or archive name so one bad update does not overwrite the last known-good copy.
  • Keep at least one backup outside the live installation directory; otherwise a damaged disk or mistaken cleanup can remove both.
  • Check the archive exit status and, where supported, list or checksum the saved files.
  • Retain enough generations to cover the period in which you might discover a corrupted world.
  • Record the server build, mod set, launch arguments, and update log alongside the backup.

SteamCMD updates server files; they do not replace a world-backup policy. Preserve custom arguments and world data separately from files Steam is allowed to overwrite.

Run SteamCMD safely

The documented update operation is:

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

896660 is the Steam app ID for Valheim Dedicated Server. +force_install_dir must point to the directory you actually back up and launch. The validate option asks SteamCMD to verify installed files while updating; it can redownload damaged files and therefore may take longer than a routine patch.

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

Check the result before restarting

  • Capture SteamCMD’s exit status and output.
  • Do not start the server when the command returns non-zero.
  • Inspect disk space, permissions, network connectivity, and SteamCMD logs before retrying.
  • If a retry is appropriate, keep the same pre-update backup; do not create a new backup over the only known-good copy.

There is no documented promise that SteamCMD can fetch an arbitrary previous Valheim build on demand. For rollback, restore the complete server files and world data from a known-good backup, then start the preserved script after checking compatibility.

Restart only after a readiness check

Starting a process is not the same as bringing the server online. After launching the copied script, wait for the health signal appropriate to your setup: a systemd service reaching active, a container health check passing, or a known ready message in the server log. Set a timeout. If readiness is not reached, stop the process, send a Discord failure message, and leave the server stopped for investigation.

On success, include the completion time and the updated build information available in your logs. On failure, include the failing phase (stop, backup, SteamCMD, or startup) but never include the webhook URL or other secrets.

Choose how Discord messages are generated

Approach Best fit Event detail Operational notes
Shell or service wrapper Linux or Windows administrators who want full control Exactly the pre-warning, failure, and post-start messages you script Requires secure secret storage, scheduler configuration, backup logic, and readiness checks
Container hook Administrators already running a community Valheim container Pre-restart hook plus the container’s update and restart lifecycle The community Docker project documents PRE_RESTART_HOOK with curl -X POST; verify image maintenance, permissions, and secret handling
Discord Connector mod Servers wanting in-game lifecycle integration Configuration can route serverLifecycle and launch, start, stop, or shutdown events Set the webhook URL and enable the individual message toggles; selecting an event route alone does not enable every message
ServerManager mod Operators preferring mod-managed status notifications Webhook-based game-to-Discord notifications and server status events Verify compatibility with the current Valheim and mod-loader versions before deployment

Use one authoritative notification path for maintenance. If a wrapper and a mod both announce restarts, players may receive duplicate or contradictory messages. Mods can add useful game-level events, but a wrapper remains the reliable place to gate backups and SteamCMD exit codes.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Schedule updates on each operating environment

Linux with cron

Run the wrapper from a protected absolute path and choose a time in the server’s documented timezone. For example, a Sunday 04:00 entry is:

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

Use a lock so overlapping runs cannot stop a server twice or start two SteamCMD processes. Test the script interactively under the same account and environment cron will use; cron often has a smaller PATH and no interactive shell profile.

Linux with systemd

A systemd service is useful when it already owns the Valheim process: the wrapper can call systemctl stop and systemctl start, and the timer can enforce one run at a time. Set the service user, working directory, restart policy, and log destination explicitly. Do not let the service’s automatic restart policy immediately relaunch a process after the wrapper has deliberately stopped it for an update; coordinate the unit’s stop and start behavior.

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.

Windows Task Scheduler

Create a task that runs under the account owning the server files, select “Run whether user is logged on or not,” and start it in the directory containing SteamCMD and the wrapper. Configure a weekly or daily trigger, enable “Do not start a new instance” to prevent overlap, and capture PowerShell’s exit code. The task should call a copied launch script and stop the existing server process gracefully before backup.

Containers

Use the image’s documented update schedule and hook variables rather than replacing its entrypoint blindly. The community Docker project’s PRE_RESTART_HOOK can run a curl -X POST request before restart. Mount backups outside the live data volume, inject the webhook as a secret, and confirm that container recreation does not discard world saves or custom start arguments.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Set a warning window players can act on

There is no universal countdown specified by the official guides. Five minutes is a useful example, not a requirement. Choose the interval based on your community’s session length, then test it during a quiet period. A longer warning is appropriate for cooperative events or players with slow save-and-exit routines; a shorter one may be adequate for a private server.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Send one message before stopping, then a clear result after startup. If the update is postponed, say so instead of allowing an old “starting soon” notice to remain unexplained. Do not promise uninterrupted play: the documented procedure requires a stop and restart.

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

Test the complete job before enabling unattended runs

  1. Run the wrapper manually with a test Discord channel and confirm that the warning arrives.
  2. Have a player connected, verify that the stop phase lets the process shut down cleanly, and confirm the player sees the expected disconnect.
  3. Inspect the backup archive and restore a copy to a separate directory to prove that it is usable.
  4. Run SteamCMD and record its exit status and duration.
  5. Confirm that the copied startup script still contains your world and network arguments.
  6. Check the server log or service health signal before sending the success message.
  7. Simulate a failed SteamCMD or startup step and verify that the wrapper sends an error and leaves the server stopped.
  8. Test a leaked or revoked webhook by rotating it and confirming that the script reads the replacement secret without code changes.

Troubleshoot common failures

Players cannot reconnect after the update

First determine the network mode. For Steam-backend servers, check forwarding for ports 2456–2457, host-firewall rules, and the server’s public setting. For Crossplay, forwarding is not required for outside-LAN access; focus on process readiness, outbound connectivity, and the relay-compatible launch configuration.

The server starts with the wrong world or settings

Steam likely reset the original startup file. Point the service at your preserved copy, restore its custom arguments, and keep that copy outside Steam-managed files.

The update reports success but the process never becomes ready

Treat this as a startup failure, not a successful maintenance run. Review the server log, permissions, free disk space, mod compatibility, and launch arguments. Stop the process, notify Discord, and restore the last known-good files if the new installation is incompatible.

Discord notifications fail

Check DNS, outbound HTTPS access, the webhook’s validity, and the JSON payload. Keep the maintenance decision independent from a cosmetic notification failure, but record the failure prominently and use a secondary alert channel if operators could otherwise miss an outage.

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

A mod breaks after a game patch

Disable the mod’s notification integration, retain the wrapper-based warnings, and verify the mod and game versions before re-enabling it. Discord Connector’s event list and ServerManager’s status hooks depend on compatibility that can change with game or loader updates.

Operational comparison

Criterion Shell or service wrapper Container hook Notification mod
Operating systems Linux and Windows Any host supported by the container runtime Any supported Valheim mod environment
Scheduler Cron, systemd timer, or Task Scheduler Image-provided schedule or external scheduler Usually reacts to lifecycle events; pair with an external update scheduler
Backup handling Fully scriptable before SteamCMD Depends on mounted volumes and image behavior; configure explicitly Not a substitute for a filesystem backup
Rollback Restore files and worlds from your own backup Restore the data volume and image-compatible files Rollback requires game/mod files outside the mod’s event system
Discord granularity Any message and conditional branch you implement Hook-level pre-restart and container lifecycle messages In-game lifecycle events, subject to enabled toggles and compatibility
Port forwarding Required for outside-LAN Steam-backend access; not required for Crossplay relay access Same network-mode rule; containerization does not change it Same network-mode rule; notifications do not provide game connectivity

Recommended production checklist

  • Copied startup script is the one your service actually launches.
  • Webhook is stored as a secret and absent from source control and logs.
  • Warning interval is documented and tested with real players.
  • Server stops before backup and SteamCMD.
  • Backup is timestamped, readable, and stored outside the live directory.
  • SteamCMD uses app ID 896660 and a verified install path.
  • Non-zero update or startup status sends an error and prevents automatic launch.
  • Readiness is checked before the success message.
  • Steam-backend forwarding uses ports 2456–2457; Crossplay relies on its relay for outside-LAN access.
  • Mod integrations are version-checked and do not duplicate wrapper announcements.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.