UPS Power Protection for Your Homelab: A Complete Guide
A single power flicker can undo hours of work. Databases crash mid-write, ZFS pools degrade, and RAID arrays start rebuilding -- all because a thunderstorm two miles away caused a half-second outage. For homelab operators running always-on infrastructure, an Uninterruptible Power Supply (UPS) is not a luxury. It is a requirement.
Photo by unavailable parts on Unsplash
This guide covers the three main UPS types, how to size one for your lab, the best models for the money, and how to set up Network UPS Tools (NUT) so your servers shut down gracefully before the battery runs out.
Why Power Protection Matters
Beyond the obvious "keep things running during an outage" use case, a UPS protects your homelab in several less visible ways:
- Filesystem integrity. Journaling filesystems like ext4 and XFS handle unexpected shutdowns reasonably well, but not perfectly. ZFS is more resilient, but its own documentation recommends running behind a UPS. A dirty shutdown during a scrub can set you back hours.
- Hardware longevity. Voltage sags (brownouts) and surges stress power supply capacitors. Over time, this shortens the life of your equipment. A good UPS regulates voltage continuously.
- Network continuity. Put your router, switch, and access points on UPS power. A server that stays up during a flicker is useless if the network goes down.
- Data protection. VMs writing to disk, databases mid-transaction, containers updating images -- any of these can leave corrupted state after a hard power cut.
UPS Types: Standby, Line-Interactive, and Online
Not all UPS units work the same way. The three main topologies differ in how they handle power flow and what level of protection they provide.

Standby (Offline)
The simplest and cheapest design. Power flows directly from the wall to your equipment. When the UPS detects an outage, it switches to battery power via an internal transfer switch. The transfer takes 5-12 milliseconds -- fast enough that most equipment rides through it, but some sensitive gear may notice.
Standby units typically output a simulated (stepped) sine wave on battery, which is fine for basic equipment but can cause problems with Active PFC power supplies common in servers.
Best for: Routers, modems, basic network gear.
Line-Interactive
The recommended choice for most homelabs. Line-interactive UPS units add an autotransformer (AVR -- Automatic Voltage Regulation) that continuously adjusts voltage without switching to battery. This means your equipment gets stable power even during brownouts and voltage sags, without draining the battery.
Transfer time is faster at 2-4 milliseconds. Better models output a pure sine wave on battery, which works well with server-grade PSUs.
Best for: Servers, NAS devices, homelab racks. This is the sweet spot of price and protection.
Online (Double Conversion)
The gold standard. Power is continuously converted from AC to DC (charging the battery) and back from DC to AC (feeding your equipment). Your gear always runs from the inverter, so there is zero transfer time during an outage -- the battery simply stops charging and starts discharging.
The downside is lower efficiency (88-94% vs 95-98% for line-interactive) because of the constant double conversion. This means more heat and higher electricity costs.
Best for: Critical infrastructure where even a 2ms transfer time is unacceptable. Overkill for most homelabs.
Sizing Your UPS
Getting the right size UPS means understanding your load and how much runtime you need.
Step 1: Measure Your Load
Use a Kill-a-Watt meter or smart plug to measure the actual wattage of your equipment. Common homelab draws:
| Equipment | Typical Power Draw |
|---|---|
| Dell PowerEdge R720 (idle) | 150-200W |
| Mini PC (Intel NUC / Beelink) | 15-35W |
| Synology NAS (4-bay, spinning) | 40-60W |
| Managed switch (8-port) | 10-15W |
| Router + access point | 15-25W |
| Raspberry Pi 4 | 5-7W |
Step 2: Calculate VA Requirements
UPS units are rated in VA (Volt-Amperes), not watts. The relationship is:
VA = Watts / Power Factor
Most computer equipment has a power factor of 0.6-0.8. A safe rule of thumb: multiply your total wattage by 1.6 to get the minimum VA rating. Then add 20-30% headroom so you are not running at capacity.
Example: Your lab draws 350W total. That is roughly 580 VA (350 / 0.6). Add 30% headroom and you need at least a 750 VA UPS. A 1000 VA or 1500 VA unit gives you comfortable headroom and longer runtime.
Step 3: Check Runtime
Manufacturers publish runtime charts showing how long the UPS will last at various loads. For a graceful shutdown, you typically need 5-10 minutes. If you need more, look for models with expandable battery packs.
Like what you're reading? Subscribe to HomeLab Starter — free weekly guides in your inbox.
Recommended Models
APC
- APC Back-UPS Pro 1500 (BR1500MS2) -- Line-interactive, sine wave output, 1500VA/900W, USB connectivity. Around $200-250. The default recommendation for homelabs.
- APC Smart-UPS 1500 (SMT1500) -- Pure sine wave, SmartSlot for network management cards, extended battery option. Around $400-500. Worth it if you want network monitoring built in.
CyberPower
- CyberPower CP1500PFCLCD -- Line-interactive, pure sine wave (PFC-compatible), 1500VA/1000W. Around $200-230. Excellent value and works great with NUT.
- CyberPower PR1500LCD -- Smart App LCD series, sine wave, network management card slot. Around $350. Solid alternative to the APC Smart-UPS line.
Both brands have excellent Linux/NUT compatibility. For most homelabs, the APC BR1500MS2 or CyberPower CP1500PFCLCD at the $200-250 price point hits the sweet spot.
Monitoring with NUT (Network UPS Tools)
NUT is the standard open-source tool for UPS monitoring on Linux. It supports hundreds of UPS models from APC, CyberPower, Eaton, Tripp Lite, and others. NUT uses a client-server architecture: the server (upsd) talks to the UPS hardware, and clients (upsmon) on each machine connect to the server to monitor status and trigger shutdowns.

Installing NUT
On Debian/Ubuntu:
sudo apt install nut nut-client nut-server
On Fedora/RHEL:
sudo dnf install nut nut-client
Configuring the NUT Server
The server is the machine physically connected to the UPS via USB. You need three configuration files.
/etc/nut/nut.conf -- Set the mode:
MODE=netserver
/etc/nut/ups.conf -- Define your UPS:
[homelab-ups]
driver = usbhid-ups
port = auto
desc = "APC Smart-UPS 1500"
pollinterval = 5
/etc/nut/upsd.users -- Create a monitoring user:
[upsmon]
password = your-secure-password-here
upsmon primary
Start the services:
sudo systemctl enable --now nut-driver nut-server nut-monitor
Verify the UPS is detected:
upsc homelab-ups
You should see a full list of UPS variables: battery charge, load percentage, input voltage, estimated runtime, and more.
Configuring NUT Clients
On other machines in your lab that should shut down when power goes out, install the NUT client and configure /etc/nut/upsmon.conf:
MONITOR homelab-ups@nut-server-ip 1 upsmon your-secure-password-here secondary
SHUTDOWNCMD "/sbin/shutdown -h now"
MINSUPPLIES 1
POLLFREQ 5
POLLFREQALERT 2
HOSTSYNC 15
DEADTIME 25
FINALDELAY 5
Automated Shutdown Scripts
NUT handles basic shutdown automatically, but you may want more control -- for example, shutting down VMs in order, flushing caches, or sending notifications.
Create a custom shutdown script at /usr/local/bin/ups-shutdown.sh:
#!/bin/bash
# Graceful homelab shutdown on UPS battery low
LOG="/var/log/ups-shutdown.log"
echo "$(date): UPS shutdown initiated" >> "$LOG"
# Stop VMs gracefully (Proxmox example)
if command -v qm &> /dev/null; then
echo "$(date): Shutting down VMs..." >> "$LOG"
for vmid in $(qm list | awk 'NR>1 && $3=="running" {print $1}'); do
qm shutdown "$vmid" --timeout 60
echo "$(date): Sent shutdown to VM $vmid" >> "$LOG"
done
fi
# Stop Docker containers gracefully
if command -v docker &> /dev/null; then
echo "$(date): Stopping Docker containers..." >> "$LOG"
docker stop $(docker ps -q) --time 30 2>/dev/null
fi
# Sync filesystems
sync
# Send notification (optional - ntfy example)
curl -s -d "UPS battery low - homelab shutting down" \
https://ntfy.sh/your-homelab-alerts 2>/dev/null
echo "$(date): Shutdown complete, powering off" >> "$LOG"
/sbin/shutdown -h now
Make it executable and reference it in your NUT config:
chmod +x /usr/local/bin/ups-shutdown.sh
In /etc/nut/upsmon.conf, set:
SHUTDOWNCMD "/usr/local/bin/ups-shutdown.sh"
Battery Maintenance Tips
UPS batteries are consumables. They degrade over time regardless of how often they are used. Here is how to get the most out of them:
- Expect 3-5 years of battery life. Lead-acid batteries used in most consumer UPS units last 3-5 years. Plan for replacement before they fail completely.
- Keep the UPS cool. Every 10 degrees Celsius above 25C (77F) roughly halves battery life. Keep your lab well-ventilated.
- Run self-tests monthly. Most UPS units have a built-in self-test. APC units run one automatically every two weeks. You can trigger one manually with NUT:
upscmd homelab-ups test.battery.start.quick. - Replace batteries proactively. When NUT reports
battery.chargedropping faster than usual orups.statusshowsRB(Replace Battery), order a replacement immediately. Don't wait for a power outage to discover your battery is dead. - Buy replacement batteries, not a new UPS. Third-party compatible batteries (from brands like Mighty Max or ExpertPower) cost $30-60 instead of $150+ for OEM replacements. They work just as well in most cases.
- Recycle old batteries responsibly. Lead-acid batteries are hazardous waste. Most auto parts stores and battery retailers accept them for free recycling.
Putting It All Together
A solid homelab power protection setup looks like this: a line-interactive UPS sized at 60-70% of its rated capacity, connected to your primary server via USB, running NUT to monitor battery status and trigger graceful shutdowns across all machines. Budget $200-250 for the UPS, $0 for NUT, and $40-60 every 3-4 years for replacement batteries.
It is one of the least exciting purchases you will make for your homelab, but when the lights go out and your data stays intact, you will be glad you invested in it.
