Headless Server Wake-on-LAN and Power Outage Recovery

A configuration method and systemd service that restores reliable remote Wake-on-LAN functionality on headless server motherboards after power outages without needing video hardware or BIOS reconfiguration.

Illustration for: Headless Server Wake-on-LAN and Power Outage Recovery
AI-generated illustration
WorkingIntermediateFor: homelab

About this project

Headless homelab servers built on surplus workstation or enterprise motherboards frequently default to staying turned off after power failures. When a server lacks an onboard display output or installed graphics card, modifying BIOS settings to enable auto-power becomes exceptionally inconvenient. This project documents low-level power state testing—evaluating PCI power management registers and real-time clock wakeups—to successfully establish Wake-on-LAN support across power loss events. By pairing network interface configuration flags with a lightweight systemd unit, the server reliably retains its magic packet wake capability across shutdowns and power cycles. This enables homelab administrators to boot headless machinery remotely using network automation or smart home scripts without opening the chassis.

What you need

  • Headless Linux server
  • Wake-on-LAN capable network card
  • Secondary device or router to send magic packets
  • Ethernet connection

Highlights

  • Diagnosed motherboard LPC registers and RTC wake behavior to identify power-management states after AC loss.
  • Validated remote boot from soft-off power states using UDP magic packets sent over the local network.
  • Implemented a dedicated systemd oneshot service that enforces network interface wake flags during boot and shutdown.

Built with

LinuxsystemdethtoolWake-on-LANBash