Configuring NUT on the primary proxmox server for UPS
May 2026
I have a modded APC UPS connected via USB to my main proxmox server. If there is a power outage, I want the system to perform a proper shutdown. Also alert me when there is a power outage,just before the system is powered off,then again once power is restored.
apt install nut
Append to /etc/nut/ups.conf:
[UPSNAMEHERE]
driver = usbhid-ups
port = auto
Execute upsdrvctl start as root. Output should look something like this:
Network UPS Tools - UPS driver controller 2.8.1
Network UPS Tools - Generic HID driver 0.52 (2.8.1)
USB communication driver (libusb 1.0) 0.46
Using subdriver: APC HID 0.100
Append to /etc/nut/upsd.users. Set the username and password:
[upsuser]
password = password
upsmon primary
actions = SET
instcmds = ALL
Edit /etc/nut/nut.conf:
mode=standalone
We are using standalone because we have 1 UPS protecting the entire system. Then start/enable the nut-server.service. Query using upsc upsname, replace upsname with what you set in ups.conf, this should return stats of the UPS:
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
...
...
Edit /etc/nut/upsmon.conf
MONITOR upsname@localhost 1 upsuser password primary
Replace upsuser and password with what you set in upsd.users, this will be the primary because we only have 1 UPS.