Recommended way to run a small local watchdog service on StartOS?

Hello everyone,

since my NitroPC does not provide an auto restart after an power outage (that often happens in my region), I am working on a fully local unattended power outage solution for my StartOS server that runs on the NitroPC.

My concept is that during a power outage, an independent device on the local network disappears immediately because it is not connected to the UPS (with the UPS only the NitroPC / StartOS, another Debian Workstation and the router are connected).

Both Debian Workstation and the StartOS server should periodically check this device via HTTP.

If it remains unreachable for approximately three minutes, both systems should perform a clean shutdown while sufficient UPS capacity is still available (it usually last only for 5-10 minutes).

My question is therefore:

What is the recommended way to implement such a small watchdog on StartOS?
(The
Debian Workstation is able to restart itself after a power outage.)

I assume there are several possibilities, for example:

  • a small custom system service installed over SSH,

  • another supported mechanism that survives StartOS upgrades,

  • or packaging it as a custom service.

Which approach would you recommend?

My goal is maximum reliability and compatibility with future StartOS updates.

Thank you very much.

Hi

Nice setup. One thing to know upfront: StartOS services run inside containers, so a packaged service can watch for the outage but can’t shut the host down itself — the clean shutdown has to run on the host.

So the route that works here is a small script over SSH: curl your canary device on a loop, and after ~3 min unreachable, call a clean shutdown. Just note it lives on the host outside the packaged system, so it may not survive StartOS updates — worth re-checking after each upgrade.

One thing to watch: make sure the shutdown fires with margin. If the UPS only holds 5–10 min and you wait ~3 min to confirm, a graceful StartOS shutdown can itself take several minutes — leave room for it to finish before the battery dies.