This guide provides instructions on how to install and configure the Network UPS Tools (NUT) server/client to manage the power supply of your homelab components through a pfSense router, VMware ESXi hypervisor, and Synology NAS.
In this configuration, the pfSense router acts as the NUT server connected to the UPS, while the VMware ESXi and Synology NAS act as NUT clients, receiving UPS status information from the NUT server running on the pfSense router.
-
Install the "NUT" package.
-
For UPS Settings, configure as follows:
- UPS type: Local USB
- UPS Name: ups
- Driver: usbhid
Add the following Extra arguments:
- ignorelb
- override.battery.charge.warning = 40
- override.battery.charge.low = 35
-
Additional configuration lines for
upsd.conf
:LISTEN <local-ip-of-pfsense>
-
Additional configuration lines for
upsd.users
:[monuser] password = secretupsmon slave
- Navigate to Control Panel -> Hardware & Power -> UPS -> Enable.
- Set UPS type as "Synology UPS server".
- Set IP as
<local-ip-of-pfsense>
.
-
Download the latest NutClient for ESXi from https://rene.margar.fr/2012/05/client-nut-pour-esxi-5-0/. For example: NutClient-ESXi-2.8.0-2.4.1.x86_64.tar.gz
-
Enable Community VIB's:
- Disable Secure Boot for UEFI / BIOS
- Navigate to Host -> Manage -> Security & Users -> Acceptance level -> Edit settings.
- Change setting to "Community".
-
Upload the
NutClient.tar.gz
to your datastore and install:cp /opt/vmfs/volumes/datastore1/somewhereNutClient-ESXi-2.8.0-2.4.1.x86_64.tar.gz /tmp cd /tmp tar -xzf NutClient-ESXi-2.8.0-2.4.1.x86_64.tar.gz sh upsmon-install.sh
-
Configure the service:
- Navigate to Host -> Manage -> System -> Advanced settings.
- Search for "UserVars.Nut" and configure as follows:
- UserVars.NutUpsName = ups@
- UserVars.NutUser = monuser
- UserVars.NutPassword = secretupsmon
-
Start the service and set policy:
- Navigate to Host -> Manage -> Services -> NutClient.
- Start the service and set Policy to "Start and stop with host".
-
Test the connection to UPS:
/opt/nut/bin/upsc ups@<local-ip-of-pfsense>
. -
Test the shutdown via UPS:
/opt/nut/sbin/upsmon -c fsd
.