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.
The Decision
| Role | Example | Shutdown Priority |
|---|---|---|
| NUT server | Mini personal computer (PC), NAS, or always-on host connected to UPS | Stays up until clients receive events. |
| Docker host | App server with databases or media apps | Stops write-heavy containers early. |
| NAS | Shared storage or backup target | Shuts down after clients stop writing. |
| Proxmox | VM and LXC hosts | Shuts down guests before halting the host. |
| Router and switch | Core network path | Stays 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
- Confirm
upsc homelab-ups@nut-serverreturns status from a client. - Set conservative notify-only behavior first.
- Unplug the UPS from wall power during a maintenance window; do not pull power from the server.
- Watch logs on the NUT server and one client.
- Reconnect power before the first test reaches the low-battery threshold.
- 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.
| Need | Good Choice | Why It Fits | Affiliate Link |
|---|---|---|---|
| UPS with USB | APC, CyberPower, or Eaton line-interactive UPS | NUT support starts with a UPS the server can read reliably. | Amazon: CyberPower CP1500PFCLCD Amazon: APC BR1500MS2 |
| NUT coordinator | Always-on mini PC or supported NAS | The NUT server should be boring and power efficient. | Amazon: Intel N100/N305 mini PCs |
| Core switch battery | Power over Ethernet (PoE) or managed switch on UPS | Clients need network reachability during shutdown. | Amazon: TP-Link TL-SG2008P PoE switch Amazon: UniFi PoE switch |
| Replacement battery | UPS battery cartridge | A shutdown system needs a healthy battery behind it. | Amazon: UPS replacement battery |
| Short cords | Short International Electrotechnical Commission (IEC) or National Electrical Manufacturers Association (NEMA) power cords | Makes 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
- NUT User Manual
- NUT Configuration File
- NUT Monitor Configuration
- Proxmox QEMU Guest Agent
- Docker Stop Command
- Docker Compose Startup and Shutdown Order
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.

