I have had a UPS in my homelab for years. I sized the first one by approximate gut feel, then got unhappy, then replaced it, then got happy, then added a NAS and got unhappy again. Here’s the walk.

Round one: the “I’ll figure it out later” UPS

First UPS was a 900 VA / 540 W consumer CyberPower. Cost $120. Plugged in my router, modem, switch, one Intel NUC. Total draw about 50 W idle. Ran my network for maybe an hour on battery, which was plenty. The fan was off, the LCD was dim, and it stayed unnoticeable in the closet.

This worked for 18 months. I added a Synology NAS. Now load was closer to 120 W. Runtime dropped to maybe 25 minutes. Still fine.

Round two: more gear, less happy

I added two more NUCs, a managed switch with PoE, a PoE camera, and a Raspberry Pi. Load climbed to 220 W. Runtime estimate dropped to 10 minutes. I was not comfortable with that number during a real outage; 10 minutes is barely enough to do a clean shutdown, let alone run through a surge.

Also, at 220 W the UPS started ramping its fan. Not loud, but audible in the same room as a bedroom wall. Spouse complaint incoming.

The right way to size

Three things matter:

  1. Steady-state load, measured at the wall. Not the sticker power of your gear, not the PSU rating. Use a Kill-A-Watt or the UPS’s own screen.
  2. Runtime goal. How long do you need to stay up? If your power outages are typically 30 seconds of blinks, 2-3 minutes is enough. If you have a generator but it takes 60 seconds to kick in, size for 2 minutes. If you want to ride through a 30-minute outage on the utility, you need much more.
  3. Power factor. Consumer UPSes rate in VA (volt-amps) AND watts. The watt number is what you care about for real loads. A 1500 VA unit might only deliver 900 W. The label hides this from you; read the spec sheet.

My target: 220 W steady, 20 minutes runtime, ability to survive a 600 W brief surge when a NAS spins up. Quiet at idle.

Round three: CyberPower CP1500PFCLCD

Cost $250. Rated 1500 VA / 1000 W. Pure sine wave (which some gear cares about, most consumer stuff does not).

At 220 W load, the LCD reports 22 minutes runtime. Fan is off until about 600 W load. It is silent. Spouse unaware. Mission accomplished.

Battery is sealed lead acid, which means it will need replacement every 3-5 years. I set a calendar reminder for year 4.

The NUT setup

My UPS talks to Proxmox over USB via Network UPS Tools (NUT):

# /etc/nut/ups.conf
[home-ups]
  driver = usbhid-ups
  port = auto
  desc = "homelab UPS"

# /etc/nut/upsd.conf
LISTEN 127.0.0.1 3493
LISTEN 192.168.30.10 3493

# /etc/nut/upsmon.conf
MONITOR home-ups@localhost 1 monuser secret master
SHUTDOWNCMD "/sbin/shutdown -h +0"
FINALDELAY 5

upsc home-ups@localhost reports the current state:

upsc home-ups@localhost
# battery.charge: 100
# battery.runtime: 1308
# input.voltage: 122.0
# output.voltage: 121.0
# ups.load: 21
# ups.status: OL

OL means online. OB means on battery. LB means low battery. My upsmon config tells secondaries (the other NUCs) to watch the master over the network and initiate shutdown when the UPS says battery is getting low.

A tiny prometheus exporter converts the NUT state to metrics. Two alerts:

  1. UPS on battery for more than 60 seconds.
  2. Battery charge under 50% when not actively discharging (i.e., failing battery).

The shutdown dance

When the UPS enters LB state, upsmon triggers shutdown on all registered hosts. Proxmox dutifully shuts down VMs first, then the host. The NAS runs hd-idle and syncs before power-off.

The order matters: I want the laptops-on-UPS (none in my setup, but conceptually) to stay up longest, the disks to write out first, and the core network to stay up so that the Pi-hole can keep answering as VMs shut down. I use OFFDELAY and ONDELAY on the UPS settings to stagger the recovery.

What I got wrong the first time

I under-sized the UPS and overestimated how fast I could shut down. My first “clean shutdown” test from battery took 4 minutes because Proxmox waits for VMs to stop, and a couple of VMs had shutdownGracefully configured to wait 90 seconds each. Math: if shutdown takes 4 minutes and my battery only gives me 10, my window for riding through a short outage is 6 minutes. Not great.

Now with 22 minutes of runtime I have a generous window. I also tuned the Proxmox VM shutdown timeouts to a faster number; anything that takes more than 30 seconds to gracefully stop is not special enough to delay the rest of the cluster.

Reflection

UPS sizing is not glamorous. It is, however, the kind of thing that becomes important the one day you actually need it. I now think of a UPS as a “give me time to gracefully drop” device rather than “give me continuous power” device. Runtime target: enough for a clean shutdown plus a buffer.

If you are starting fresh, get something in the 1000-1500 VA range with pure sine wave output, measure your load once it is running, aim for 15+ minutes at that load, and make sure the UPS can talk to at least one of your hosts so it can signal shutdown. Related: see my post on shaving 40W off my homelab rack for what I did to make the load smaller so the UPS lasts longer.