Configure a UPS on Linux with NUT

A UPS (Uninterruptible Power Supply) protects servers and workstations from sudden power loss, but hardware alone is not enough. Without software monitoring the UPS, your system will still crash hard when the battery runs out. Network UPS Tools (NUT) is the standard open-source solution: it speaks to hundreds of UPS models, monitors battery state, and triggers a clean shutdown before the battery dies. This guide walks through a single-machine NUT setup — one host talking directly to its own UPS — the most common scenario for a home lab or small server.

Prerequisites and Terminology

NUT has three moving parts you need to understand before touching config files: