Nut
Setup Server in TrueNAS:
Plug USB from UPS into NAS
Select System Settings then Shell
Run# nut-scanner -U
Look for "driver" field - make note of field
Select System Settings then Services.
Enable the UPS field and then click on edit
Identifier: ups
Monitor User: upsmon
UPS Mode: Master
Monitor Password: [SET_YOUR_PASSWORD]
Driver: Select from the drive field you found earlier
Port or Hostname: auto
Extra Users:
[user]
password = password
upsmon secondary
Enable Remote Monitor
Shutdown Mode: UPS reaches low battery
Host Sync: 90 (will be delay in seconds to shut down nas after shutting down other servers)
Auxiliary Parameters (ups.conf):
ignorelb
override.battery.charge.low=65
override.battery.charge.warning=40
Leave everything else as default - don't really need to override warning, but 100% need ignorelb because that's what allows the override on the low battery to be the shutdown threshhold
https://www.wundertech.net/how-to-set-up-truenas-as-a-nut-server/
Windows client setup:
This is done via nutw
run and install nutw-install.exe
edit nutw.ini to look something like this:
[nutd]
server = (server fqdn or ip)
port = 3493
interval = 15
login = (user set above on nas)
password = (pw set above on nas)
upsname = (ups name set above on nas)
usetls = 0
Launch admin cmd console and change directory to C:\Nutw
run# nutw --mode=install
That will install the service, but it won't start properly automatically. Open service in windows and open the "Nutd windows client" service. Set Startup type to be Automatic Delayed start. Go to the Recovery tab and change the First failure, Second failure (and subsequent?) to Restart the service. Set the Restart service after to something like 5 minutes. That should let the networking come up and allow the service to start properly. Otherwise it will crash at startup. I assume it's because networking wasn't up when it tried to start.
https://github.com/clamy54/nutw/blob/main/README.md
Linux client setup:
Install nut-client: sudo apt install nut-client
You can verify connection to server with this command: upsc user@IP_ADDRESS
Edit /etc/nut/upsmon.conf: by adding line
MONITOR [ups]@[IP_ADDRESS] 1 [user] [PASSWORD] secondary
where [ups] is Identifier field on NAS
where [IP_ADDRESS] is ip or FQDN of NAS
where [user] is the user from the Extra Users field on NAS
where [PASSWORD] is the password from the password field in Extra Users on NAS
Edit /etc/nut/nut.conf: find MODE=none and change it to
MODE=netclient
Restart and enable nut-client:
sudo systemctl restart nut-client
sudo systemctl enable nut-client
https://www.jeffgeerling.com/blog/2025/nut-on-my-pi-so-my-servers-dont-die
(Optional) Install nut_webgui:
For a nice web gui to show the status of the UPS, install the docker container using a compose file such as this:
services:
nut_webgui:
image: ghcr.io/superioone/nut_webgui:latest
container_name: nut_webgui
environment:
- UPSD_ADDR=nas_IP
- UPSD_USER=user
- UPSD_PASS=password
ports:
- 80:9000
restart: unless-stopped
networks: {}
change nas_IP, user, and password appropriately
https://github.com/SuperioOne/nut_webgui