Homelab · Power

Network UPS Tools (NUT): One UPS, Every Machine Shuts Down Cleanly

A UPS buys you minutes, and minutes only help if every machine uses them to shut down in the right order. Network UPS Tools — NUT — is the free software that coordinates that: one component watches the UPS, one serves its status to the whole network, and a small client on each machine decides when to power down. This guide installs a NUT server on a NAS or a spare Pi, sets the shutdown order across machines, connects Home Assistant for visibility, and finishes with the only test that proves any of it works. It assumes the UPS itself is already sized, which the UPS sizing guide covers.

Published Nov 22, 2026

How NUT fits together

NUT is three pieces with three jobs. A driver speaks to the UPS itself over USB, serial or SNMP — which driver your UPS needs is listed on the project’s hardware compatibility list, and that list, checked before you buy, decides whether a given model is supported and how completely. upsd is the server: it collects the driver’s readings and serves them to the network on port 3493. upsmon is the client that runs on every machine the UPS protects; it watches upsd and, when the battery runs low, runs that machine’s shutdown command. The current release is NUT 2.8.5 (April 2026) — one caution when you go reading: parts of the project’s own website still surface the older 2.8.1 release in their download pages, so treat the project’s GitHub releases as the source of truth for what is current.

Step 1: run the server where the UPS is plugged in

The NUT server belongs on the machine the UPS’s USB or serial cable reaches — usually the NAS, since most NAS platforms either bundle NUT or install it from their package system, and a Raspberry Pi or any always-on Linux box works just as well. The configuration is three small files. In ups.conf you name the UPS and name its driver, taken from the compatibility list. In upsd.conf you tell upsd to listen on the network, not just locally. In upsd.users you create two kinds of account: an admin user for yourself, and a monitoring user with a password that every upsmon client will share. Start the driver and upsd, then prove the chain before touching anything else: running upsc yourupsname@localhost should print the UPS’s status, battery charge and estimated runtime. If that command answers, the server half is done.

Step 2: upsmon and the shutdown order

Each protected machine installs NUT in client mode and gets one important line in upsmon.conf: a MONITOR entry pointing at the server, with the monitoring user’s credentials and a role. The machine running the server is the primary — it is the one that tells the UPS itself to power off at the very end. Everything else is a secondary: it watches the same status feed and shuts itself down when told, without waiting for its own battery threshold. Ordering then falls out of one principle: shut down in reverse order of importance and dependency. Virtual machines and containers stop first (most hypervisors and NAS platforms handle their own guests when the host shuts down cleanly), then the machines that serve files and applications, then the NAS itself, and the network gear — which usually is not shut down at all, just left to die with the battery — last in practice. Set the low-battery threshold with runtime in mind: the trigger should leave enough charge for the slowest machine in the chain to finish, with margin, rather than squeezing the last minute out of the battery.

One boundary to respect: the server is LAN-only

upsd’s status feed is genuinely useful, which makes it tempting to check from elsewhere — resist the version of that idea that forwards port 3493 through the router. The feed announces when the house is on battery, and the admin account can do more than read. Keep upsd bound to the LAN (or to the management VLAN, in a segmented lab), reach it remotely over your VPN like every other internal service, and give the monitoring account a real password even though it never leaves the house. The shutdown system should be the most boring, least exposed service you run.

Step 3: Home Assistant, for eyes rather than shutdowns

Home Assistant’s core integration is named Network UPS Tools (NUT), and the two-part setup is where people trip: the integration is only a client. It connects to a NUT server that must already exist — the one you built in step 1, or the separate Home Assistant add-on that can host a server — and it cannot talk to a USB-connected UPS directly. Point it at the server’s address and port 3493 with the monitoring user, and it surfaces what the driver reports: status and on-battery flags, battery charge, estimated runtime, voltages and load, with the exact entities varying by UPS and driver — modest USB models often report only status, charge and runtime, and no integration can invent sensors the UPS does not expose. Use it for dashboards and notifications (“the house is on battery, 22 minutes left”). Do not use it as the shutdown mechanism: a notification does not power down a NAS, and graceful shutdown remains upsmon’s job on each host. The power distribution guide shows where this server/client split sits in a full rack layout.

Step 4: the pull-plug drill

None of the above counts until it has survived a real outage, so manufacture one. Pick a quiet hour, make sure backups are current, and pull the UPS’s plug from the wall — not the machines’ plugs from the UPS. Then watch, in order: the server notices and reports on-battery; Home Assistant shows the status change and falling runtime; at the threshold, the secondary machines shut down cleanly; the primary shuts down last and cuts the UPS output. Restore power, confirm everything comes back (or is configured not to, deliberately), and read the logs for the machine that complained. Fold this into the wider disaster recovery drills routine, and repeat it after any change to the chain — a new machine, a replaced battery, a firmware update. A shutdown system that has never been tested is a hope, not a system.

Official documentation and references

Frequently asked questions

Does the Home Assistant integration replace upsmon?

No. The integration is a monitoring client: it displays UPS status in Home Assistant and can drive notifications and automations. Graceful shutdown of your NAS, servers and workstations still needs upsmon running on each host (or a shutdown command you deliberately wire up yourself), because a Home Assistant notification cannot power a machine down.

Which port does NUT use?

upsd listens on TCP port 3493 by default. The Home Assistant integration and every upsmon client connect to the server on that port, so it needs to be reachable on your LAN — and it should never be forwarded to the internet.

My UPS is not on the compatibility list. What now?

Check the list by chipset and by sibling models first — many UPS ranges share one driver, and the list records a support level per model. If nothing matches, the generic drivers cover some USB models partially. A UPS that reports only basic status can still drive a safe shutdown; it just cannot offer voltages or load figures.

Can one UPS protect several machines?

Yes — that is the design. One machine runs the driver and upsd next to the UPS; every other protected machine runs upsmon as a secondary client of that server. When the battery runs low, the secondaries shut down first and the primary shuts down last and switches the UPS off.

Related guides