Servetor

Teaching my servers to shut down gracefully with NUT

July 28, 2026

The UPS sat under the desk for a year doing exactly half of its job: it kept the machines running for ten minutes, and then let them die anyway.

Network UPS Tools fixes the other half. The machine with the USB cable runs upsd, every other box runs upsmon as a secondary and shuts down when the battery reports low.

# /etc/nut/upsmon.conf on secondaries
MONITOR myups@nas 1 monuser secret secondary
SHUTDOWNCMD "/sbin/shutdown -h +0"

Test it by pulling the plug on a quiet weekend, not during the next storm.