This is an automated archive made by the Lemmit Bot.
The original was posted on /r/selfhosted by /u/pgilah on 2025-04-23 19:12:57+00:00.
Hi there!
Following a previous discussion, it turns out that some old laptops do not support Wake-On-Lan nor automatic BIOS wake-ups. This makes it really hard to repurpose them in the case of an AC power outage, since the server has to be rebooted manually.
This is now fixed thanks to KeepAlive, a systemd service that programs automatic rtcwake alarms in the next 10 minutes, and safely powers off the server if it detects it is running only on battery. Moreover, if a RAID is detected, it makes sure to unmount it and power off the disks before powering off the machine, protecting the disks from any physical damage. After 10 minutes, the system will restart automatically, or once AC is restored if it takes longer.
It is available on GitHub:
Please feel free to share any suggestion or question about this project :D