Setting up an APC UPS, Synology and NUT

I figured I’d document setting up an uninterruptible power supply (UPS) with a Synology NAS that can also shutdown a Mac and two Raspberry Pis that drive certain aspects of my home network.

I am using NUT as clients on the Raspberry Pi and macOS computers that connects to my Synology NAS with an APC UPS connected.

Synology NAS Setup

For the Synology, follow Synology’s instructions to enable UPS support in DSM with the following exceptions:

  • Enable the Network UPS server
  • Put in the IP addresses of the computers you want to send shutdown messages to. While it says, “Permitted Synology NAS Devices”, you can use Network UPS Tools (NUT) clients in both macOS and Raspberry Pi OS to monitor
  • You do need to give those clientsand your NAS static IP addresses, which they have on my network

Raspberry Pi Setup

Setting up the client on Raspberry Pi is pretty straight forward. The link provided covers setting up as both server and client if you ever wanted to use a Raspberry Pi as a server.

For the purposes of my setup, I’m going to recommend letting the NAS be the server in this case.

Make sure you pay attention to upssched-cmd

macOS Setup

macOS is a bit trickier.

  • If you don’t have Mac Ports installed, install it
  • I followed these instructions to install NUT with the exception of
  • Making sure I used the MONITOR, NOTIFYMSG, NOTIFYFLAG details from the Raspberry Pi Setup
    • I used nano instead of emacs
  • I then follow the configuration files as described in the Raspberry Pi setup with the changes in the Mac instructions in this section