My homelab is constantly evolving. The latest will be on my homelab git repo
Currently I am using a docker-based homelab. The plan is to switch to a GitOps based homelab. (see here)
This site will serve as a place for specific projects and things that need a few more words than the ones in a config file.
Network UPS Tools (NUT)
Battery backup for all the network and homelab things. (Bonus for my desktop too!)
I will be consolidating Jeff Geerling’s blog post on this into my configs, and my exact steps.
Layout and my devices:
- Shutdown order: (defined by ansible groups)
- [nut_observer_fast_off]
- [nut_observer]
- [nut_critical]
- My UPS model:
CP1500AVRLCD3-R(purchased 02/28/2025)-Rlikely means refurbish3is a later version made. it is this one- Using 2x of this battery:
RB1290X2E
Step-by-step
NUT server setup
- Install nut, and run
nut-scannerto fetch the UPS info. Example:
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "0764"
productid = "0601"
product = "CP1500AVRLCD3"
serial = "BHPPT7G00027"
vendor = "CPS"
bus = "003"
-
Fill in the details found there into the
nut_setuprole’s template files -
Use the role
nut_setupand point it at a server also in the [nut_critical] group. My Inventory has holmie in the [controller] group, and [nut_critical] group, so it is the ideal choice.
Done! Now that server should stay on till the very end, and only shutdown when the UPS sends a critical message.
NUT clients
Similar to the server, see the roles:
nut_criticalnut_observernut_observer_fast_off
These do what you would expect:
nut_criticalwait for the critical message (actions = fsd) from the nut servernut_observershuts down with 75% battery left.nut_observer_fast_offshuts down at 90% battery left.