← All guides

Recovering a home lab after a power outage: boot order, silent no-starts, and a checklist

Operations · 9 min read

Power comes back, the rack lights up, and the lab looks alive, until the first dashboard fails to load, a media library reports its storage missing, and a container that ran for months simply is not there. That pattern is normal after an outage, and it is rarely hardware failure. A home lab is a stack of dependencies: applications depend on platforms, platforms depend on storage and DNS, and everything depends on the network and on a shutdown that may or may not have completed before the battery ran out. Recovery works when those layers come back in the order they depend on each other, and when the settings that decide automatic starting get checked directly instead of assumed.

Safety note: work on the assumption that the shutdown was not clean until the evidence says otherwise. Do not start writing new data to storage that has not been checked, and do not pull plugs or force power-offs to hurry a slow boot, a second hard cut during a filesystem check or an array operation is how a recoverable outage becomes data loss.

Why labs do not come back cleanly

Three different problems hide behind the single complaint that the lab did not come back. The first is order: everything powered on at once, so a virtual machine tried to mount storage that was not ready, or an application started before the DNS or database service it needs existed. The second is configuration: the service was never actually set to start automatically, and months of uptime hid that fact, a manually started container or service looks identical to an automatic one until a reboot separates them. The third is the shutdown itself: if battery power ran out before guests finished stopping, the next boot inherits whatever the interrupted shutdown left behind. A useful recovery separates those three problems and deals with them in that sequence, because starting things in a better order cannot fix a service that was never enabled, and neither fix should run before the shutdown question is answered.

Tier order: power, network, storage, platform, applications

The framework below is the article's decision structure. Each tier must pass its check before the next tier starts, and a tier that fails gets fixed in place rather than skipped, a later tier started around a failed earlier one usually fails in a more confusing place.

TierWhat startsCheck before moving on
0. PowerUPS back on mains, hosts powered deliberately, one at a timeUPS reports mains power, not battery; no host is mid-shutdown from a delayed UPS command
1. NetworkRouter, switches, access points, DNSA test device gets an address and resolves both a local service name and an external name
2. StorageNAS and any storage the lab mountsPools and shares are present and healthy in the storage system's own interface before anything mounts them
3. PlatformHypervisor hosts, then Docker hostsThe host itself is fully up and can see its storage before any guest or container starts
4. Infrastructure guestsDNS-dependent and database-backed foundation servicesEach foundation service answers a real request, not just a ping
5. ApplicationsEverything user-facingEach application loads with its data present, checked in its own interface

Proxmox VE encodes exactly this tier idea for its guests. Its documented controls are a Start at boot option per guest, a Start/Shutdown order priority, and a startup delay between guests: the documented example sets a delay of 240 seconds after one guest before subsequent guests start, which is the right shape for a storage or firewall guest that other guests depend on. Shutdown runs in the reverse order, so the guest that starts first is the last to shut down, one more reason the first tier of guests should be the ones everything else leans on. Guests given no order start after all ordered guests, and ordering only applies between guests on the same host, so a multi-host lab still needs the manual tier check between hosts. Where the dependency lives outside the host entirely, an NFS server on separate hardware is the documented example. Proxmox also offers a per-node delay between the host booting and the first autostart guest booting, set with pvenode config set --startall-onboot-delay followed by the delay in seconds.

The recovery checklist, step by step

  1. Confirm the outage is actually over. Check the UPS first: it should report mains power restored. If a Network UPS Tools setup drove the shutdown, remember how it is wired, upsmon runs the command in its SHUTDOWNCMD setting (the documented example is "/sbin/shutdown -h +0") and the POWERDOWNFLAG mechanism can power the UPS itself down after filesystems are remounted read-only. A host that boots and then shuts itself down again is usually finishing that sequence, not failing.
  2. Bring the network up and prove it. Router and switches first, then confirm a test device receives an address and can resolve a local hostname. Every later tier uses names; debugging name resolution in the middle of application recovery wastes the whole run.
  3. Start storage alone, and read its verdict. Power the NAS or storage host and open its own management interface. Pools, volumes, and shares should all report present before any hypervisor guest that mounts them is allowed to start. If the storage system reports a degraded state or an interrupted operation, stop here and follow that system's recovery guidance, the tiers above it can wait.
  4. Start one platform host and check it can see storage. On a Proxmox host, confirm the node is fully booted and its storage is visible in the node view before starting guests. A guest started against missing storage fails once and often has to be cleaned up by hand.
  5. Start guests in their set order, with their delays. Guests with Start at boot and an order set will follow it; the order-1 guest starts first and, by the reverse rule, will be last to shut down next time. Start unordered guests manually after the ordered tiers are proven, in dependency order.
  6. Audit the containers. On each Docker host, list all containers including stopped ones and compare that list against what should be running. Any gap goes to the no-start audit in the next section before a manual start hides the cause.
  7. Audit bare-metal services the same way. For each systemd service the lab depends on, check both that it is running now and that it is enabled for boot, those are separate facts, checked separately below.
  8. Test applications as a user would. Open each application, load real data, and perform its smallest real action. A login page proves a web server is up; it does not prove the application found its database or its files.
  9. Write down what did not come back. Every manual start performed in steps 6 and 7 is a configuration fix owed to the lab. The list written now is the pre-outage audit for next time, made while the evidence is fresh.

The three silent no-starts, compared

Almost every service that fails to return belongs to one of three classes, each with its own check and its own fix. The comparison below is this guide's synthesis of the three vendors' documented behaviour.

PlatformWhy it stayed downCheckFix
DockerThe container still has the default restart policy, no, so nothing restarts itInspect the container's restart policydocker update --restart unless-stopped on the container, a form Docker documents for already-created containers
systemdThe service was started by hand but never enabled, so no boot link existssystemctl is-enabled for the unitsystemctl enable the unit, which creates the boot-time links from its Install section
Proxmox VEThe guest's Start at boot option was never setThe guest's Options panel, or its configurationSet Start at boot (for a container, pct set CTID -onboot 1), plus an order and delay where dependencies need them

The Docker row deserves one extra distinction, because the two similar-sounding policies behave differently exactly in the outage case. Under always, a container that was manually stopped restarts when the Docker daemon restarts. Under unless-stopped, a stopped container stays stopped even after the daemon restarts. During maintenance that difference is a feature: a service deliberately stopped for work should not resurrect itself because the host rebooted. The third policy, on-failure, restarts only on a non-zero exit code and explicitly does not restart a container when the daemon restarts, which makes it the wrong choice for a service whose job is to survive a reboot. Docker's own guidance is to use restart policies for automatic starting and to avoid using process managers to start containers, the policy is the mechanism, and it has to be set before the outage, or repaired during recovery with the update command in the table.

The systemd row hides a twin trap: enable and start are different operations. Enabling a unit arranges its start at the next boot and does not start it now; starting a unit runs it now and arranges nothing for the next boot. A service can therefore be running and unenabled (it will vanish at the next reboot) or enabled and stopped (it will return at the next boot but is down today). Recovery checks need both questions, in both directions. Masking is the third state worth knowing: a masked unit cannot be started manually or by another service, so a service that refuses every start attempt should be checked for a mask before its own configuration is blamed.

Fix it before the next outage: the pre-outage audit

Everything in the recovery above converts into a short audit that takes one calm session, not an outage. Walk the service list once and record, for each service, which of the three mechanisms is supposed to bring it back, then verify that mechanism directly: the restart policy on each container, is-enabled on each unit, and Start at boot plus order and delay on each guest. Pay special attention to shutdown behaviour on the platform side: Proxmox's container shutdown timeout defaults to 60 seconds, after which a container that is still online is reported as failed rather than gracefully stopped, guests that routinely need longer to stop should have that expectation set deliberately, and the reverse-order shutdown rule means the guest order chosen for starting is also the order that protects foundation services during the next shutdown. Finish the audit at the UPS: confirm the monitoring chain starts in the right order on the monitoring host itself, since the NUT documentation notes upsmon must start after upsdrvctl and upsd or it will complain it cannot contact the server, a monitoring stack that does not survive a reboot cannot drive the next graceful shutdown.

What success looks like

Recovery is complete when four statements are all true. The UPS reports mains power and a charging or charged battery. Every tier passed its own check in order, with storage verified in its own interface before guests mounted it. Every expected service is running, and for each one the reason it started is known, a restart policy, an enabled unit, or a guest boot setting, not merely observed. And the list of manual starts is empty because each one was converted into a configuration fix, or the list itself is saved as the audit to finish. A lab that meets those four statements will survive the next outage with no intervention beyond watching it happen, which is the entire point of the exercise.

FAQ

Should everything just be set to start at boot? Almost, but order matters as much as the setting. A guest with Start at boot but no order starts after all ordered guests, and an application that starts before its storage or database is ready can fail in ways that need manual cleanup. Set the boot flag everywhere it belongs, then set order and delay on the guests other things depend on.

A container keeps resurrecting after maintenance. Why? That is the documented difference between the two policies: under always a manually stopped container restarts when the daemon restarts, while under unless-stopped it stays stopped. Switch the policy with docker update rather than fighting it at every reboot.

The lab came back fine. Is any of this still worth doing? Yes, the audit, not the recovery. A clean return proves the settings are right today; it says nothing about the service added by hand last month. The pre-outage audit is short precisely because most entries pass on the first check.