Skip to content

Automatic restarts

Ryan McAfee edited this page Sep 16, 2026 · 3 revisions

Automatic restarts

Three things can restart the server without you: it emptied, the clock came round, or it crashed. All three are switches on the Settings screen, and all three go through the launch guard the same way a restart you pressed does.

None of them can run while a Valheim server update is rewriting the install. They are refused with the same sentence every other start gets: "An update is running for this install. Wait for it to finish." See Updating the server.

What a restart comes back up on

Whatever you last saved. A relaunch reads the profile again in the moment before it launches, so a setting changed while the world was up is in force the moment the server is back. That covers all three restarts on this page, the restart that carries mod updates in with it, the Restart button, and a held launch that gets retried later.

Before 1.0.8 it did not. A relaunch reused the settings the session had been started with, so a change saved while the server was up did nothing until somebody pressed Stop and then Start, or closed and reopened BakaLoader. World difficulty was the worst of it: a new set of dials could be ignored through a whole day of scheduled restarts, with nothing on screen to explain why.

How it works

The relaunch asks the profile for its saved settings and builds the command line from those instead of reusing the ones in hand. It is the session's own profile that is read, so a realm restarting in the background comes back on its own settings rather than on whichever ones are on screen.

It never refuses over this. If the settings cannot be read, the relaunch keeps the ones the server is already running and writes a line to the Log:

The saved settings for this profile could not be read, so the relaunch uses the ones the server is already running.

When the refresh does change the command line, that is logged as well, and only then, so a nightly restart of an untouched profile does not say the same thing forever:

Relaunch uses the settings saved on disk

While the server is up and what is saved differs from what it started with, the condition bar carries a Restart pending row with a Restart button on it. You do not have to use it. The next scheduled or empty server restart takes the change in by itself.

Restart when empty

Turn on Empty-Server Restart and set a delay, 5 minutes by default. When the last player leaves, a timer starts. When it fires, BakaLoader checks the server is still running and still empty, asks the launch guard, and restarts with no countdown because there is nobody to warn.

An empty server is also checked for pending mod updates, which is a separate thing from this switch. See below.

Restart on a schedule

Turn on Scheduled Restart and set an interval in hours, 6 by default.

The timer is deliberately set to fire early: it works out how long the countdown needs and starts the countdown that much before the mark, so the restart happens on the hour rather than starting its warnings then.

Relaunch after a crash

A crash is a non zero exit that was not the result of a stop you asked for. If Restart on Crash is on, BakaLoader waits the crash delay, 10 seconds by default, and starts the server again through the launch guard.

Either way the condition bar says what happened: "The server process stopped on its own. BakaLoader is relaunching it." or "The server process stopped on its own. It stays down until you start it."

When the guard holds one

An automatic restart still has to answer the launch guard's question, and there is nobody at the keyboard to answer it. So the question goes into the condition bar and the restart is held.

It is not dropped. The question is asked again later, and the gap follows whatever triggered it: a scheduled restart waits its own interval, an empty server restart waits its own delay, a crash relaunch waits its own delay. Every one of them is floored at ten minutes, so a server crashing in a loop cannot turn into a stream of prompts.

A retry can fire hours after the launch it is retrying, so it asks for the saved settings again the same way any other relaunch does rather than carrying an old command line back up with it.

Restarts and mod updates

One switch drives both halves of this: Update mods at scheduled restarts, in the Upkeep card on the Dashboard. It is app wide, not per realm.

A scheduled restart carries pending mod updates with it when that switch is on, and the countdown says so: each warning gains " (2 mod updates pending)".

The empty server check is the other half, and it is separate from the Empty-Server Restart switch. It starts watching whenever the last player leaves, whether or not that restart rule is on. Ten minutes later, and every ten minutes after that while the server stays empty, BakaLoader looks for mod updates. If there are any it restarts and applies them in the gap while the process is down. With Update mods at scheduled restarts off, the count comes back as zero and nothing happens. That is the only mod update path that is safe by construction, because nothing touches a plugin file while the server has it open. See Mods.

Questions people ask

My server restarts on its own and I did not set that up. Check Advanced on the Settings screen for Scheduled Restart and Empty-Server Restart. Both are off on a new profile.

Nobody got warned before a scheduled restart. The warnings go through RCON. With RCON off there is no announcement at all, and the restart just happens. Check the Network card on the Dashboard for whether RCON is bound.

It restarted while people were online even though it was set to restart when empty. That is the scheduled restart, not the empty one. They are separate switches.

A crash loop keeps restarting it. Turn off Restart on Crash and read the Log. A mod is the usual cause.

I saved a setting while people were online. Will the nightly restart use it? Yes. Every restart reads the profile again before it launches, so the change is in force when the server comes back. You can watch for the Restart pending row on the condition bar if you want to take it in sooner.

Clone this wiki locally