Connecting a Synology DiskStation to a NUT server

Synology DiskStations internally use NUT to interface with several UPS devices. You can also configure DSM to act as a server, to connect several of them together.

But what if you want to connect the DSM to an already existing NUT setup? The only thing that you can configure from the control panel is the server IP… let’s see how to configure the NUT server to handle connections from your DiskStation.

First of all, make sure upsd listens on the required network interface. Edit upsd.conf and add a couple of lines like these:

LISTEN 127.0.0.1
LISTEN 192.168.1.1

(by default it listens only on the loopback interface).

Then you should match your configuration to the one hardcoded in the DiskStation. You can use the values in this post for reference: in case Synology decides to change them in a future product, you can enable SSH on your device then look for the new values in /usr/syno/etc/ups/

The first thing to do is to change the name of the ups to… err… ups 🙂 This means editing ups.conf:

[ups]
    driver = ...

(remember to update your upsmon.conf file too, if you changed the name).

Next, you’ll need to create the user that Synology requires. Edit upsd.users and append these lines:

[monuser]
    password = secret
    upsmon slave

Restart upsd, enable UPS support in DSM, enter the IP of your server and Bob’s your uncle. 🙂

9 comments

  1. Stefano says:

    Hi,

    I’m just setting up NUT in my environment and ended up here 🙂

    You’re basically saying that, in order to allow DSM to connect to the NUT server, the configuration of the SERVER should be modified according to the DSM default one, aren’t you?

    What if I simply change the NUT scripts on the DSM according to the existing setup?

    Thanks for the post, it’s really one of the few relevant ones about this stuff available on the web.

    • Simone says:

      I guess you can change the settings on the Synology too. I’ve chosen to change them on my server because there’s a chance that Synology might overwrite its settings when you edit something from the web interface or during a system update

      • Stefano says:

        Ok, that makes sense. I think I’ll try your way, it’s safer to modify the server configuration than the DSM one.
        I haven’t really understood the connection between the web interface and the scripts, however; most of the options are hardcoded, even the USB driver (my UPS is not an APC, for example) and the user/password. No SHUTDOWNCMD has been defined, and I am quite worried to specify one.

      • Tim says:

        I figured I’d post this for posterity reasons for anyone else running into the same issue. This was a great quick little guide for pointing me in the right direction.

        You *HAVE* to use “ups” as the name for the UPS at the server side. When you start the ups-net service on the Synology, it triggers a process that changes your upsmon.conf file MONITOR statement back to “MONITOR ups@ …”. Granted, if you’ve got the determination, you can probably find what continues to modify this file and correct it, but that would increase the risk of problems in my opinion.

        I was losing my mind trying to figure out why the synology wasn’t connecting, and after three times modifying upsmon.conf and finally noticing what was going on, I switched everything to “ups”, and everything worked.

  2. Jonathan says:

    This is very frustrating.

    I’ve tried what you describe here in every possible way imaginable, and the Synology just says “cannot connect”.

    I can’t even see any evidence of it attempting to connect to the NUT server at all.

    It’s like they’ve completely broken network UPS support.

    • Simone says:

      it’s still working fine with the latest DSM for me.

      You might want to check your firewall settings on your server, or that NUT is listening on the right interface. Also check your server logs, to see if there’s any error.

      • R says:

        I’m having the same issue. My NUT server is definitely set up right but my Synology can’t talk to it at all. It’s definitely username “monuser” password “secret” isn’t it?

        • Simone says:

          on my NAS, yes. I don’t know if it’s the same across all of Synology products though (but I guess so, since they should be interoperable). You can enable SSH on your Synology and check its config, though.

Leave a Reply

Your email address will not be published. Required fields are marked *