Skip to content

A lightweight Python service that monitors UPS status via NUT and automatically wakes systems using Wake-on-LAN after power recovery.

License

Notifications You must be signed in to change notification settings

hardwarehaven/wolnut

WOLNUT

WOLNUT is a lightweight Python service designed to work alongside NUT (Network UPS Tools) to automatically send Wake-on-LAN (WOL) packets to client systems after a power outage.

wolnut... get it?

What It Does

When a UPS (connected to NUT) switches to battery power, WOLNUT:

  1. Detects the power event via upsc
  2. Tracks which clients were online before the outage
  3. Waits for power to be restored and the battery to reach a safe threshold
  4. Sends WOL packets to bring back any systems that powered down

This helps reboot systems automatically after a controlled shutdown caused by a power loss — especially useful for homelabs, small servers, and media boxes.


Features

  • Auto-detect MAC addresses with ARP
  • Tracks online status of clients via ping
  • Supports NUT with or without authentication
  • Persistent state file for post-reboot recovery
  • Runs as a standalone Python service or Docker container

Quickstart

See the Quickstart guide.

Docker Compose

See docker-compose.yml for an example docker compose file

About

A lightweight Python service that monitors UPS status via NUT and automatically wakes systems using Wake-on-LAN after power recovery.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10