UPS Handling with NUT
11 (bullseye) |
|
As always... | |
---|---|
Start with: |
|
Install NUT
sudo apt install nut
Configure NUT
Select your mode
none |
Disable automatic startup of NUT |
standalone | This MODE is for local only configuration |
netserver | This MODE is open to the network. (A NUT server) |
netclient | This MODE is for client machines that will access a NUT server |
See the nut.conf documentation for more details.
Set up communications
(needed if you've set up as MODE = netserver...)
You can determine your servers IP address using:
ip a
sudo vi /etc/nut/upsd.conf
LISTEN 192.168.0.7 LISTEN 127.0.0.1 3493 LISTEN ::1 3493
Where 192.168.0.7 should be replaced with the actual IP of the machine.
See the upsd.conf documentation for more details.
Set up access
sudo vi /etc/nut/upsd.users
[upsmon] password = supersecretpassword upsmon master
See the upsd.users documentation for more details.
sudo vi /etc/nut/upsmon.conf
MONITOR cyberpower@192.168.0.7 1 monuser supersecretpassword master
See the upsmon.conf documentation for more details.
Managing NUT
The usual:
sudo service nut-server [start|stop|restart|status]
Client commands:
upsc cyberpower
upscmd -l cyberpower
upsrw cyberpower
nut-scanner
further Usage Concepts
NUT gives lots of options.
Things like:
- Cleanly shutting down all of the VMs on a server & the server itself too.
- Sending notifications about power issues.
- Managing redundant UPSs on your system.
- etc...