If you’re using a Synology NAS in your home or business environment and you want it to access a Network UPS Tools (NUT) server for power management, there are some essential configuration steps to take. NUT is a popular tool used to manage and monitor uninterruptible power supplies (UPS), especially in networked environments where a single UPS is shared by multiple devices.
In this guide, we’ll walk you through configuring your NUT server to allow access from your Synology NAS.
Why Use NUT for Synology NAS?
Synology NAS devices can connect to a UPS for protection during power outages. By using a NUT server, multiple devices (including your NAS) can share one UPS unit over the network. This setup ensures that all critical systems are protected and can be safely powered down when the UPS battery runs low during a power outage.
However, to make your Synology NAS communicate with a remote NUT server, proper configuration on the NUT server is required. This involves editing the upsd.users
and ups.conf
files.
Step-by-Step Configuration
1. Configuring upsd.users
To allow your Synology NAS to monitor the UPS, you must add a user entry to the upsd.users
configuration file on your NUT server. This file contains user credentials and permissions for accessing the UPS data.
To create a user that your Synology NAS can use to connect to the NUT server, open your upsd.users
file on the server (usually located in /etc/nut/upsd.users
), and add the following block:
[monuser]
password = secret
upsmon secondary
Let’s break this down:
- [monuser]: This is the username that your Synology NAS will use to connect to the NUT server.
- password = secret: Synology defaults to
secret
- you can probably hack around on the NAS to change this. - upsmon secondary: This line grants the user
monuser
theupsmon
rights in “secondary” mode. The “secondary” mode means that this client (in this case, the Synology NAS) can monitor the UPS but is not responsible for controlling or shutting down the UPS.
2. Configuring ups.conf
Next, you’ll need to configure the UPS settings in ups.conf
. This file tells the NUT server the name of the UPS device it is managing. On the NUT server, open the ups.conf
file (usually located in /etc/nut/ups.conf
) and set the UPS name like this:
[ups]
driver = your_driver
port = your_port
desc = "UPS Description"
Here’s what the parameters mean:
- [ups]: This is the name of the UPS device that will be shared with the Synology NAS. Synology expects the UPS to be named
ups
, so this is important to get right. - driver: Replace
your_driver
with the specific driver that works with your UPS (e.g.,usbhid-ups
for USB-based UPS units). - port: Replace
your_port
with the actual port your UPS is connected to (e.g.,/dev/usb/hiddev0
for USB devices or a network address if it’s a network-connected UPS). - desc: This is a description of the UPS. It can be anything you like, such as
"Main Office UPS"
.
After configuring these files, restart the NUT services on your NUT server to apply the changes:
sudo systemctl restart nut-server
sudo systemctl restart nut-monitor
3. Configuring the Synology NAS
On your Synology NAS, go to Control Panel > Hardware & Power > UPS and choose Synology UPS server. Enter the IP address of the NUT server (the server where you’ve configured upsd.users
and ups.conf
).
Once this is configured, your Synology NAS will begin monitoring the UPS through the NUT server.
Final Thoughts
Setting up your Synology NAS to access a NUT server is an excellent way to ensure that all your critical devices are connected to the same UPS over the network. By configuring the upsd.users
and ups.conf
files correctly, you can seamlessly integrate your Synology NAS into the NUT-powered power management setup.
Remember that while the Synology NAS will act as a secondary UPS monitor, you can have other devices or the NUT server itself act as the primary controller responsible for managing UPS shutdowns and other actions. This division of roles ensures that your network remains stable and that all systems are safely powered down in the event of a power outage.
This simple yet powerful configuration can protect your data and equipment from sudden power failures, keeping your network running smoothly.