How to Set Up Automatic Shutdown and Notify Other Devices After Power Failure with a Home QNAP NAS UPS
This article was last updated on: May 17, 2026 am
Scenario
│ 📝Note:
│
│ Please go easy on me. 😅
│
│ I’m truly hopeless when it comes to cable management. This is the best I can do. 😂
My HomeLab server cluster is configured as follows.


The upper section has been introduced before, so I won’t go over it again. Today we’ll focus on the UPS and NAS parts.
- 1 UPS, model APC Back-UPS 650. Plugged into its outlets: the NAS and a power strip (the power strip connects 4 N100 mini PCs and other devices; the UPS is connected to the NAS via a data port). As shown below: (Please go easy on me. 😅)

- 1 QNAP TS-453Bmini NAS. As shown below: (Please go easy on me. 😅)

The requirements are:
- After a power outage, the NAS should automatically shut down after a period of time (e.g., 5 minutes);
- The NAS acts as a UPS Server, notifying the other 4 N100 mini PCs when power is lost;
- The 4 N100 mini PCs should also automatically shut down after a period of time (e.g., 5 minutes) upon receiving the notification.
Here’s an overview of the implementation:
- Physical layer: UPS connected to the NAS via USB data cable
- Software layer:
- NAS: Configure post-power-failure behavior via the UI;
- NAS: Enable UPS Server configuration via the UI;
- N100 mini PCs: UPS Client configuration.
Detailed steps below:
Hands-On
1. Physical Layer: Connect UPS to NAS USB via Data Cable
I won’t post a photo here because it’s buried somewhere in that pile of cables… The rack is in a corner, and after kneeling left and right I couldn’t find an angle that would produce a clear shot… 😅
The APC UPS comes with a data cable. Here’s what to do:
Connect the Back-UPS to the NAS using the USB cable. Plug one end into the POWERCHUTE port on the back panel of the Back-UPS, and the other end into a USB port on the NAS.
That’s item ⑥ in the diagram below:

Done.
Verification
Once connected, you can access the QNAP QTS interface and see the UPS information as follows:


Now let’s move on to the software configuration.
2. NAS: Configure Post-Power-Failure Behavior via UI
Here’s how:

- Open the QNAP QTS interface;
- Navigate to Control Panel -> System -> External Device -> UPS
- Select USB Connection -> Enter auto-protection mode 10 minutes after power failure. (Of course, you can choose the other option: Shut down the NAS)
If you only need the UPS and NAS to work together, the configuration is complete at this point.
3. NAS: Enable UPS Server Configuration via UI
If you also need to coordinate with other hosts/servers, you need to enable the UPS Server configuration via the UI. Specifically, as shown in item ⑥ above:
- Enable the Network UPS Server (i.e., UPS Server)
- Add the IP addresses of the 4 N100 mini PCs. For example: 192.168.3.154
Done.
Additional Notes
Behind the scenes, QNAP QTS actually runs the upsd service, listening on port 3493. As shown below:
1 | |
What we need to know here:
- The QNAP UPS Server name is: qnapups
The QNAP QTS UPS configuration files are located in the /etc/config/ups/ directory:
1 | |
What we need to know here:
- The QNAP UPS Server username is: admin
- The password is: 123456
To summarize, QNAP QTS Server information:
- It runs the upsd service under the hood
- Listening on port 3493
- The UPS Server name is: qnapups (🐾 Note: This name is fixed across all QNAP NAS devices)
- Username: admin
- Password: 123456
This information will be needed later when configuring the UPS Client on the N100 machines.
4. N100 Mini PCs: UPS Client Configuration
My N100 mini PCs run Ubuntu 24.04. To interact with a UPS server on a Linux system and automatically shut down 5 minutes after a power outage, you typically need UPS monitoring software. The most common tool is NUT (Network UPS Tools), an open-source UPS monitoring and management tool.
Since upsd is already running on the NAS and the UPS is an APC Back-UPS 650 connected to the NAS via USB, you can configure the NUT client (upsmon) on the mini PCs to interact with the NAS’s upsd and achieve automatic shutdown 5 minutes after power loss.
Here are the detailed steps:
4.1. Install the NUT Client on Linux Devices
On the Linux devices that need to monitor the UPS, install the NUT client tools:
-
For Debian/Ubuntu-based systems:
1
2sudo apt-get update
sudo apt-get install nut-client -
For Red Hat/CentOS-based systems:
1
sudo yum install nut-client
4.2. Configure the NUT Client
On the Linux device, edit the NUT client configuration file /etc/nut/upsmon.conf and add the following:
1 | |
- qnapups: The UPS name on the QNAP NAS (🐾 Note: This name is fixed across all QNAP NAS devices).
- nas_ip: The IP address of the NAS.
- admin: The username defined on the NAS.
- 123456: The password defined on the NAS.
- slave: Indicates this device is a client, not the master.
4.3. Set Up Shutdown After Power Failure
In /etc/nut/upsmon.conf, add the following line to shut down 5 minutes after power loss:
1 | |
4.4. Set the NUT Operating Mode
In /etc/nut/nut.conf, there are 4 operating modes:
- none: NUT is not configured, or uses integrated power management, or some external system starts NUT components. Therefore, no scripts or services bundled with the NUT package need to start anything.
- standalone: This mode is for local-only configurations where 1 UPS protects the local system. It requires starting all 3 NUT layers (driver, upsd, and upsmon) with their corresponding configuration files. This mode can also handle UPS redundancy.
- netserver: Same as standalone, but also requires some additional network access controls (firewall, TCP wrappers) and possibly a specific LISTEN directive in upsd.conf. Since this mode is open to the network, special attention should be paid to security. – Clearly, the NAS UPS Server uses this mode.
- netclient: This mode only requires upsmon (and any tools it may use, such as upssched or custom scripts) to monitor a remote NUT server and potentially shut down the local system (in which case, part of upsmon must run as root). – Clearly, this is the mode we need for the Linux devices.
Set the mode configuration to:
1 | |
4.4. Start the NUT Client Service
Start the upsmon service and enable it at boot:
-
For systemd-based systems:
1
2sudo systemctl start nut-client
sudo systemctl enable nut-client -
For SysVinit-based systems:
1
2sudo service nut-client start
sudo update-rc.d nut-client defaults
Check the service status:
4.4.1 Error Fix
The first startup produced an error, specifically:
- Failed to open ‘/usr/lib/tmpfiles.d/nut-common-tmpfiles.conf’: No such file or directory
1 | |
Fix it by running:
1 | |
After restarting, no more errors:
1 | |
4.5. Test the Configuration
4.5.1 Check UPS Status
On the Linux device, use the following command to verify that UPS status can be retrieved correctly:
1 | |
If configured correctly, you should see detailed UPS information such as battery status, input voltage, etc.
4.5.2 Simulate a Power Outage Test
You can test the configuration by disconnecting the UPS from the power source. If everything is working properly, the Linux devices should automatically shut down 5 minutes after the power outage.
All done! 🎉🎉🎉
5. Other Considerations
- Firewall Configuration: Make sure the NAS firewall allows connections from the Linux devices on port 3493.
- Permission Issues: If you’re using a different NAS, ensure the permissions defined in the upsd.users file on the NAS allow client devices to access UPS information.
- Time Synchronization: Ensure the NAS and Linux devices have synchronized clocks to avoid monitoring issues caused by time discrepancies.
Summary
By following the steps above, you should be able to achieve:
When the UPS loses power:
- The NAS shuts down automatically
- The other Linux devices shut down automatically
🎉🎉🎉