Linux serverlinux web serverNETWORK ADMINISTRATIONS

Network UPS Tools (NUT Server) Ultimate Guide

Meet NUT Server, or Network UPS Tools. It’s an open source UPS monitoring tool that runs on many different operating systems and processors. This means you can run the server on Linux, MacOS, or BSD and run the client on Windows, MacOS, Linux, and more. It’ perfect for your Pi, server, or desktop. It works with hundreds of UPS devices, PDUs, and many other power management systems.

This is the ultimate guide to configuring Network UPS Tools (NUT). We cover everything from installing and configuring the server on as Raspberry Pi, configuring the client on Windows and Linux, configure a charting and graphing website to visualize NUT data, spin up an additional web site use Docker, and finally set up monitoring and alerting to automate shutdowns of your machine.

Video Notes: https://technotim.live/posts/NUT-server-guide/

https://networkupstools.org/

Also, note to self, don’t eat a salad before you record a video….

Items in this video

Tripp Lite SMART1500LCD Rackmount – https://amzn.to/2XGN6yt
APC UPS, 1500VA UPS Pro – https://amzn.to/3AHxSrG
APC UPS, 850VA – https://amzn.to/3CZGFWP
Raspberry Pi 4 Model B – https://amzn.to/3kEyDfu
Zebra Classic PoE Hat Case for Raspberry Pi – https://amzn.to/3ubAYl5
Official Raspberry Pi Power Over Ethernet (PoE) HAT – https://amzn.to/3lZjO6M
AXTRA 12-Outlet Surge Protector Power Strip – https://amzn.to/3o2BkcV
Wall Control Galvanized Steel Pegboard – https://amzn.to/3ENLlk5

Support me on Patreon: https://www.patreon.com/technotim
Sponsor me on GitHub: https://github.com/sponsors/timothystewart6
Subscribe on Twitch: https://www.twitch.tv/technotim
Gear Recommendations: https://l.technotim.live/gear
Get Help in Our Discord Community: https://l.technotim.live/discord
2nd channel: https://www.youtube.com/@TechnoTimTalks

(Affiliate links may be included in this description. I may receive a small commission at no cost to you.)

00:00 – Intro
00:28 – What is NUT Server
01:33 – NUT Configurations
01:49 – What will we cover?
02:33 – Required Hardware (UPS)
04:33 – Required Hardware (System)
05:22 – Connecting your UPS
05:50 – Configuring the UPS Driver
11:07 – Configuring upsmon.conf
14:32 – Configuring upsd.conf
15:39 – Configuring nut.conf
16:48 – Configuring upsd.users
18:49 – Restarting services
19:50 – Query UPS with NUT Server
20:52 – Installing nut-cgi web dashboard
20:13 – Configuring hosts.conf
22:14 – Configuring upsset.conf
22:46 – UPS Dashboard
24:26 – WebNut Docker Container
27:50 – WinNUT Windows Client
30:36 – The Tripp Lite UPS Fix dmesg
33:21 – Install NUT Client on a Remote System
34:30 – Configuring upsmon.conf on remote
39:00 – Configuring nut.conf on remote
39:36 – Configuring upssched.conf on remote
41:32 – Configuring upssched-cmd
43:23 – Testing Remote Communication
45:00 – Testing Remove Shutdown
45:47 – Testing my UPS in Production
47:21 – Reviewing the Logs
47:59 – My thoughts of NUT Server
48:47 – Stream Highlight – Ubuntu is the Windows of Linux

“Lowkey Free” is from Harris Heller’s album Low-key.
https://l.technotim.live/sb-music-license

#NUT #HomeLab #OpenSource

Thank you for watching!

source

by Techno Tim

linux web server

21 thoughts on “Network UPS Tools (NUT Server) Ultimate Guide

  • I couldn't think of any good NUT jokes during the video, so post them here. Cashew later!

  • Tim, a couple ways to either clear text files, or delete them and create a new blank file w/o having to open the file to clear contents.

    Clear the file: echo > nut.conf
    Delete the file: rm nut.conf
    Recreate a deleted blank file: touch nut.conf

    This has saved me hours of deleting file contents!
    Great Vid, well thought out and produced!

  • Another thing I've been meaning to do! Thanks for the tutorial!

  • Awesome tutorial as always @technotim! Its great to get the real life happiness of a successful configuration. Makes me wanna tinker 😁

  • What a super detailed video! I got everything working the first time!
    But the reason im doing this is so that i can control my Synology NAS, and i found a site where that says i have to create the user with the name "ups" cause thats what Synology NAS is looking for, so went through the vvideo again and changed its name in every step. But now the monitoring website can not connect, but the NAS has gone from "No ups found/connected" to "Can't connect to the network Ups server".. So i guess it see something but it does not work properly.. You should make another awsome video explaining how to connect Synology NAS to this NUT server, that would be so awsome! 🫡😊👌

  • Loved the Video and got my two UPS up and running and working like a bomb, but i added another UPS the other day and fro the life of me i cannot get it work. The problem is that the 3rd UP is identical to the 2nd UPS Vendor ID etc all identical. there is no way to tell them apart when i run nutscanner, i see all 3 UPS, and yet i dont se serial numbers, I found a thread that said that the serial numbers were generated by nutscanner, but I don't see that.
    Please if anyone can help i think i have watched this video 40 times, and read just about every page in the official site, but nothing is helping.
    Is there a way to distinguish the 2 UPS apart from each other, because in the UPS.config file it everything is the same because i cannot give it a different vendor, product, serial number, for it to know they are separate UPS's.

    Dont know where else to ask for help. (yes i have the latest 2.7.4-13 of nut server and nut-client running on a Pi 3B+)

  • Just wanted to say thank you. This was an excellent tutorial and saved me a ton of time. Love your channel, keep up the good work!

  • Thanks for a great and thorough video Tim. I was trying to do this for my home network because I have more devices than UPS units. Like some others have commented here, I too wanted to protect a pfsense firewall and some Synology NASes. I'm happy to report this worked like a champ! For the benefit of others I thought I would add a couple of things that worked for me to get those two things working.

    1. PFSense: install the NUT application. Then under Services/UPS/Settings, select 'Remote NUT Server' from the dropdown and enter your IP address, user name and PW that you defined on the NUT server in Tim's video.

    2. Synology: I read elswhere that Synology expects the UPS to be named 'ups' so that's what I did in the conf files that Tim walks us through in the video. Don't name it anything else and I kept it lowercase. Then on the Synology, go to Control Panel/Hardware & Power/UPS and select 'enable UPS Support' , choose 'Synology UPS Server' and enter the IP in the field that asks for it. No user name or PW is required here.

    Hope this helps others!

  • Could you do the absolute bare minimums of this video, to get NUT installed and functioning? It seems this software is not the easiest one to get it working in the first place – at least not before you master it, but there just is not always enough available free time to study everything. Can you squeeze the essentials to 5-10 minutes?

  • Hi Tim, can you (or anyone else) give a hint on how to format the shutdown command on a Ubuntu server please. Usually the shutdown command requires a sudo and then requests a password.

  • Too bad this does not work with (crash and burn) Unifi!

  • THAAANK YOUUU! This was so much harder than you made it look for my slightly more complicated setup, but I came back and used the website cgi-stats setup in this video and was just so happy that it just worked easily!

    I really wish you would've given a tiny bit more of a rundown of what each .conf file is used for and what each service does as I had to do a lot of reading to troubleshoot little misunderstandings I had, but I am still so happy to have a guru's quick walkthrough. "Quick" ha! If this video was over 50 minutes, I think it would have been a lot more intimidating to click on, though. I dunno.

  • You could move the example conf file, then run nano with the original file name and path. Nano will create a new file if it doesn’t exist.

  • this is an immaculate walk-through. Thanks for putting this video together and sharing. Much appreciated.

  • Struggled to find a way to get data from my salicru ups and thought "mmmmhhhhh lemme run to youtube and search nut techno tim" lol and fair enough, I found this vid lol

  • The whole nut-server, nut-client, etc took me an entire day to fully grasp. This video helped me get the bigger picture and clarify things.

  • Okay, so how do I set for instance a client to shut down when the ups battery reaches a battery percentage?

  • Nut scanner probes to get information.
    Right 😂

  • Really good video. Thank you! I am a bit confused how to set up and run both the server and the client on the linux (debian) server that is directly plugged into the UPS (via USB) and that I want to control the shutdown of. Do I edit the nut.conf file to stay as MODE=netserver and then edit the upsmon.conf as per your video? Cheers!

Comments are closed.