Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jhelmink/ba54e11e6a1b9f448a4a9a5c4cb45b89 to your computer and use it in GitHub Desktop.
Save jhelmink/ba54e11e6a1b9f448a4a9a5c4cb45b89 to your computer and use it in GitHub Desktop.
Proxomox - NUT Client.md

Configuring Proxmox VE node as client for remote NUT server running on Synology NAS


  • Use Shell on Proxmox Node to install NUT
apt-get install nut
  • Edit /etc/nut/nut.conf using vi
vi /etc/nut/nut.conf

Modify the last line

x to delete existing characters

i to insert characters. ESC to go back to command mode

MODE=netclient

:q! to quit without saving if you fuck it up

:wq to save and quit when you get it right

  • Edit /etc/nut/upsmon.conf using vi
vi /etc/nut/upsmon.conf

There won't be an existing line, look for the other MONITOR example comments and add after that.

MONITOR <system> <powervalue> <username> <password> ("master"|"slave")

<system> is [email protected]

monuser and secret are the default <username> <password> for a Synology NAS

<powervalue> is going to be 1 unless you have multiple UPS's

Since you're monitoring your NAS you are in slave mode

MONITOR [email protected] 1 monuser secret slave
  • Enable monitoring services to start up with the machine:
sudo systemctl enable nut-client
sudo systemctl enable nut-monitor
  • Start monitoring:
sudo systemctl start nut-client
sudo systemctl start nut-monitor
  • Verify monitoring:
systemctl status nut-client
systemctl status nut-monitor
  • To check UPS status: upsc <name>@<address> for remote UPS
upsc [email protected]

This will return a bunch of your UPS info if everything is working correctly

  • Confirm clients are connecting:
upsc -c ups
@ylnest2018
Copy link

thanks for this been looking for an easy way to do this.

Couple questions:

  1. Will the upsmon autostart upon reboot or do you need to alter another file to do this?
  2. How do you specify the time after a power outage where a shutdown will be initiated? either by time or power percentage?

@jhelmink
Copy link
Author

jhelmink commented Dec 8, 2024

  1. Will the upsmon autostart upon reboot or do you need to alter another file to do this?

Nah you'll need to use systemctl to enable the services to automatically restart;

sudo systemctl enable nut-client
sudo systemctl enable nut-monitor
  1. How do you specify the time after a power outage where a shutdown will be initiated? either by time or power percentage?

You specify this on your NAS (as that is what is connected to the UPS, and publishes the status to NUT clients/slaves)

Control Panel -> Hardware and Power -> UPS

There are options for time or low battery.

@ylnest2018
Copy link

ah thats awesome! thank you for that been looking for a whole day on how to do this and stumbled across this page

@davoper
Copy link

davoper commented Jan 2, 2025

Instead of calling upsmon start after configuration it might be better to start services right away:

sudo systemctl enable nut-client
sudo systemctl enable nut-monitor

sudo systemctl start nut-client
sudo systemctl start nut-monitor

systemctl status nut-client
systemctl status nut-monitor

Also connect to NUT server and check that clients are registering as connected
upsc -c ups

@jhelmink
Copy link
Author

jhelmink commented Jan 2, 2025

Instead of calling upsmon start after configuration it might be better to start services right away:

sudo systemctl enable nut-client
sudo systemctl enable nut-monitor

sudo systemctl start nut-client
sudo systemctl start nut-monitor

systemctl status nut-client
systemctl status nut-monitor

Also connect to NUT server and check that clients are registering as connected upsc -c ups

Nice, I've amended this now.

@Pipitapi
Copy link

Pipitapi commented Feb 11, 2025

I did it all step by step!
But it doesn't work. It shows the data.

Felvétel03
Felvétel02
Felvétel01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment