One UPS, Many Devices: NUT Shutdown for Proxmox, NAS, Router, and Docker Hosts

A single Uninterruptible Power Supply (UPS) can protect more than one device, but only if the shutdown signal reaches the systems that need to act. The real design problem is not just battery runtime; it is coordination. Apps stop first, Network Attached Storage (NAS) stops safely, hypervisors shut down virtual machines (VMs) and Linux Containers (LXC), and the network stays alive long enough for the messages to arrive.

Network UPS Tools (NUT) is the classic open-source way to do this. One machine talks to the UPS over Universal Serial Bus (USB) or Simple Network Management Protocol (SNMP), and the other systems monitor that NUT server over the local area network (LAN) so they can react when the UPS goes on battery or reaches a low threshold.

Design principle: Treat UPS shutdown like a dependency graph. The network and NUT server must stay up until every protected client knows what to do.

Reference diagram
NUT Shutdown Sequence
A clean shutdown has an order: notifications, applications, storage, hypervisors, and finally the network.
UPS Event on batterylow charge NUT Server USB or SNMPnetserver App Hosts Docker stopdatabase flushes Storage NAS syncssafe stop Hypervisor VMs and LXChost halts Build the shutdown path, then test it.
Network last
Switches and routers must live long enough to deliver shutdown signals.
Test gently
Validate one client before trusting a whole-lab power event.
Logs matter
NUT logs prove whether shutdown logic actually ran.

The Decision

RoleExampleShutdown Priority
NUT serverMini personal computer (PC), NAS, or always-on host connected to UPSStays up until clients receive events.
Docker hostApp server with databases or media appsStops write-heavy containers early.
NASShared storage or backup targetShuts down after clients stop writing.
ProxmoxVM and LXC hostsShuts down guests before halting the host.
Router and switchCore network pathStays powered as long as possible.

Reference Configuration Shape

On the USB-connected server, NUT runs in netserver mode. The UPS driver reads battery status, upsd exposes a monitoring endpoint to trusted LAN clients, and upsmon on each client decides when to start a shutdown. Bind the service carefully, use a low-privilege monitor account, and do not expose NUT to untrusted networks.

# nut.conf
MODE=netserver

# ups.conf
[homelab-ups]
  driver = usbhid-ups
  port = auto
  desc = "Homelab UPS"

# upsd.users
[monuser]
  password = long-random-password
  upsmon slave

Proxmox and Docker Details

  • Enable QEMU guest agents where appropriate so guests shut down cleanly.
  • Set VM and container shutdown ordering for dependencies such as databases and storage clients.
  • Use Docker Compose stop grace periods for databases and media applications.
  • Keep the NUT server and core switch on protected power.
  • Confirm shutdown commands work before waiting for an outage.

Safe Test Plan

  1. Confirm upsc homelab-ups@nut-server returns status from a client.
  2. Set conservative notify-only behavior first.
  3. Unplug the UPS from wall power during a maintenance window; do not pull power from the server.
  4. Watch logs on the NUT server and one client.
  5. Reconnect power before the first test reaches the low-battery threshold.
  6. Enable full shutdown only after notification and monitoring are proven.

Useful Gear and Buyer Notes

Affiliate disclosure: As an Amazon Associate, TechGeeks may earn from qualifying purchases. Product links are included as practical buying references. Verify current specifications, compatibility, warranty, seller quality, and local electrical or building-code requirements before ordering.

NeedGood ChoiceWhy It FitsAffiliate Link
UPS with USBAPC, CyberPower, or Eaton line-interactive UPSNUT support starts with a UPS the server can read reliably.Amazon: CyberPower CP1500PFCLCD
Amazon: APC BR1500MS2
NUT coordinatorAlways-on mini PC or supported NASThe NUT server should be boring and power efficient.Amazon: Intel N100/N305 mini PCs
Core switch batteryPower over Ethernet (PoE) or managed switch on UPSClients need network reachability during shutdown.Amazon: TP-Link TL-SG2008P PoE switch
Amazon: UniFi PoE switch
Replacement batteryUPS battery cartridgeA shutdown system needs a healthy battery behind it.Amazon: UPS replacement battery
Short cordsShort International Electrotechnical Commission (IEC) or National Electrical Manufacturers Association (NEMA) power cordsMakes it obvious which devices are protected.Amazon: short power cord pack

Common Mistakes

  • Connecting the UPS USB cable to a machine that shuts down first.
  • Putting the switch outside the UPS path.
  • Letting every client decide independently with no shared order.
  • Testing only by reading a status page.
  • Using the same aggressive timeout for databases and stateless apps.

References

Final Thought

Once NUT is working, a UPS becomes infrastructure instead of just a battery box. The outage path is known, the order is intentional, and the lab can fail cleanly instead of improvising in the dark.

This article is part of the TechGeeks homelab roadmap series, built from recurring questions in /r/homelab, /r/selfhosted, /r/HomeNetworking, and /r/homeserver, then checked against primary documentation and practical homelab operating patterns.

Need help applying this?

Bring TechGeeks into the real environment.

If you are working through this on a live network, WordPress site, Linux server, AI workflow, or PisoWiFi deployment, send the context and we can help turn it into a practical plan.

Request helpGet field notesRecommended gear

Leave a Reply

Your email address will not be published. Required fields are marked *