Use a Raspberry Pi running Network UPS Tools (NUT) when you want a separate host to read the UPS and serve status to clients. Use the NAS as UPS master if it already has the USB connection and can serve your clients. Choose an SNMP card when the UPS supports it and the devices can use direct SNMP or get UPS status through a NUT server. NUT 2.8.4 overview · QNAP QTS 5.2.x UPS settings · NUT 2.8.4 snmp-ups manual
Compare the three setups
| Setup | Where UPS status comes from | What handles shutdown |
|---|---|---|
| Dedicated Raspberry Pi | A NUT driver reads the UPS over USB. The Pi’s upsd service relays status to clients. | upsmon on the Pi acts as primary. Secondary upsmon clients handle their own host shutdown. NUT roles |
| NAS as UPS master | The USB cable goes to the NAS. In QTS 5.2.x the NAS sends power-failure notifications to the client IPs you configured. | In QTS, set the outage response on each NAS, such as timed shutdown or auto-protection. QTS UPS modes |
| UPS with an SNMP card | A compatible card exposes UPS status on the network. A device can read it directly if it supports SNMP UPS mode, or a NUT server can read it on the clients’ behalf. | In QTS, the NAS follows its configured outage response. A NUT setup uses upsmon. QTS UPS modes · NUT SNMP driver · NUT roles |
One NAS with NUT built into its firmware accepted only a small number of client IP addresses. If you have a mix of systems, check the NAS server against each intended client before choosing it as the UPS master. NUT guidance for appliances
Set up a dedicated Raspberry Pi
Use the NUT installation instructions to prepare NUT, then look up the UPS model and its USB connection in the NUT compatibility list.
With the UPS USB data cable connected to the Pi, add an entry in ups.conf. This example uses the usbhid-ups driver for a model listed with that driver. NUT driver configuration · NUT compatibility list
[rackups]
driver = usbhid-ups
port = auto
Set MODE=netserver in nut.conf. In upsd.conf, add LISTEN 127.0.0.1 for local monitoring and LISTEN 192.168.50.10 for network clients, replacing the example LAN address with the Pi’s. Restrict access to your intended clients with firewall rules. NUT mode settings · NUT listener and firewall guidance
If your NUT installation manages drivers as individual service instances and provides upsdrvsvcctl, run upsdrvsvcctl resync and upsdrvsvcctl start rackups. Then use the service manager to start nut-server, or restart it if it is already running. NUT driver startup · NUT service configuration
For a manual startup, run upsdrvctl start rackups and then upsd. If a manually started upsd is already running and saved a PID file, stop it with upsd -c stop before starting it again. If upsd was already running, the LISTEN changes take effect after a restart. Complete the restart before running upsc. NUT server configuration · NUT listener guidance
Use the NUT automatic shutdown configuration to set up upsmon on the Pi and any hosts it should protect. The USB-connected Pi takes the primary role and the remote NUT monitors take the secondary role. NUT roles
Use the NAS as the UPS master
On QNAP QTS 5.2.x, connect the UPS to the NAS by USB. Open Control Panel → System → External Device → UPS, choose USB connection, and select the NAS’s outage response and delay. Select Enable network UPS master, enter the client IP addresses, and select Apply. QNAP QTS 5.2.x UPS settings
On a second QNAP NAS on the same network, use Network UPS slave in the UPS settings and enter the USB-connected NAS’s IP address. Choose the second NAS’s outage response and delay, then select Apply. In QTS 5.2.x the master option requires the USB connection. QNAP QTS 5.2.x UPS settings
Use the UPS SNMP card
- Direct SNMP. In QTS 5.2.x, put the UPS on the NAS network and choose SNMP connection in the UPS settings. Enter the UPS’s IP address and configure the SNMP community. Choose the NAS’s outage response and apply the settings. QTS SNMP setup
- SNMP through NUT. On the NUT server, use
driver = snmp-upsinups.conf. For a card using the default SNMP port, setportto the card’s IP address. Setsnmp_versiontov1orv2cand setcommunityto match the card’s configuration. If NUT will send a power-down command with this setup, use a read/write community. NUT clients connect to the NUT server’s IP. NUT SNMP driver settings · NUT network architecture
Verify status from a client
To check that a NUT endpoint serves UPS status, use upsc from a client to list the UPS names served by upsd. Then query ups.status using one of the returned names. Here the server is at 192.168.50.10 and the UPS is named rackups. NUT 2.8.4 upsc manual
upsc -l 192.168.50.10
upsc rackups@192.168.50.10 ups.status
Look for OL while the UPS is on line power. Use the same check with an SNMP-backed NUT server or with a NAS that serves NUT and permits the querying client. If the client returns an error, check the UPS name, the upsd service and the firewall. NUT status check · Read-only client documentation · NUT appliance access
Check the shutdown path
- Check the network path. During a planned outage drill, check that the clients can still reach their status source on battery power. For NUT clients that source is the running
upsdservice. NUT status dependencies · QTS network requirements - Confirm each host’s action. Check that each protected system starts its configured shutdown or protection mode. For QTS 5.2.x in Network UPS slave or SNMP connection mode, watch the receiving NAS during the planned outage. When the outage lasts for the delay configured on that NAS, verify that it powers off or enters auto-protection mode, whichever you selected. In NUT’s documented low-battery sequence for one UPS, the primary signals the secondaries and waits for them to disconnect or for its wait limit to expire. NUT shutdown design · QTS outage responses
- Verify UPS output power separately. If you configure NUT to turn off the UPS load at the end of shutdown, verify that the driver and UPS support it. With NUT’s SNMP driver, the host’s network stack may already be down when the driver tries to send the command. NUT power-off support · SNMP shutdown limitations
Evidence and limits. This comparison is based on NUT 2.8.4 and QNAP QTS 5.2.x documentation. The steps were not run on hardware.