📖 Chapter 08 — UPS & Power Protection
The chapter that keeps the data safe when the power drops.
Learning Objectives
- Explain what a UPS does (and doesn't do)
- Size a UPS for the NAS, the switch, and the router
- Calculate the runtime you need for a graceful shutdown
- Configure the NAS to shut down on UPS low battery
- Pick a NAS-grade UPS (recommendations and what to avoid)
Introduction
The power is unreliable. The grid goes down; the lights flicker; a thunderstorm rolls through. For a desktop, this is annoying. For a NAS, this is a data integrity event. The hard drives were writing; the power disappeared; the writes are incomplete; the pool might be inconsistent; the next scrub might find errors that weren't there before.
A UPS (Uninterruptible Power Supply) is the answer. A battery that bridges the gap between "the grid is down" and "the NAS has shut down cleanly." The cost is small; the protection is real.
What a UPS does
A UPS is a battery with three jobs:
- Battery backup. When the grid fails, the UPS keeps the load running for minutes to hours, depending on the size of the battery and the load.
- Surge protection. When the grid surges (a lightning strike, a motor kicking on, a brownout), the UPS absorbs the spike and protects the load.
- Power conditioning. When the grid is dirty (voltage sags, frequency drift, electrical noise), the UPS cleans the power and delivers a clean sine wave to the load.
For a NAS, the battery backup is the headline feature. The NAS needs 5-15 minutes of clean power to detect the outage, warn the users, and shut down gracefully. The surge protection is the second feature; the power conditioning is a bonus that comes with most "line interactive" and "online" UPSes.
What a UPS does NOT do
A UPS is not a generator. The battery is sized for minutes, not days. For multi-hour outages, the UPS bridges the gap to a generator or a graceful shutdown. For longer outages, the right answer is: let the NAS shut down; the data is safe; power it back up when the grid returns.
A UPS is also not a power conditioner for the entire house. It's for the specific devices you plug into it (the NAS, the switch, the router). The other devices in the house are on the grid directly.
The "what to plug in" question
For a home lab, the right answer is: plug in the things that need to survive a short outage. The minimum:
- The NAS. The data and the running services.
- The network switch. Without the switch, the NAS is unreachable; with the switch, the NAS is reachable for the shutdown signal.
- The router/modem. Without internet, remote access is gone; but for local access, the switch is enough. Plug in the router too if you want Tailscale to keep working.
Don't plug in: the workstation (the laptop has its own battery), the monitors, the printer, the speakers, the phone charger. The UPS battery is finite; use it for the things that need it.
Sizing the UPS
The math: total load (in watts) × desired runtime (in minutes) → UPS capacity (in VA or watts).
For TK's build, the load estimate:
- NAS: 80-150W (depending on the drives, the CPU, the workload)
- Network switch: 10-30W
- Router/modem: 10-20W
- Total: 100-200W typical, 250W peak
The desired runtime: 5-10 minutes is enough for a graceful shutdown. The NAS detects the outage (5-30 seconds), warns the users, and shuts down cleanly (1-5 minutes). The UPS just needs to bridge the gap.
The runtime math
UPS capacity is rated in VA (volt-amperes) or watts. The conversion: VA × 0.6 ≈ watts for a typical computer load. So a 1000 VA UPS delivers about 600W.
For a 150W load and a 1000 VA UPS (600W capacity), the runtime is roughly:
- 1000 VA / 150W = 6.7 hours of theoretical runtime (if the battery were the full capacity)
- Realistic runtime: 30-60 minutes at 150W (accounting for inverter losses, battery age, and the fact that the battery shouldn't be drained below 50%)
For a 5-10 minute shutdown window, a 1000 VA UPS is overkill. A 600 VA UPS (360W) gives 15-25 minutes at 150W, which is more than enough for a graceful shutdown.
UPS recommendations
For a home NAS, the right UPSes (2026):
- APC Back-UPS Pro 1500 (BR1500MS): ~1500 VA / 900W, pure sine wave, ~$300-400. The right answer for most home labs.
- CyberPower CP1500PFCLCD: ~1500 VA / 900W, pure sine wave, ~$250-350. Slightly cheaper than the APC; comparable quality.
- APC Smart-UPS 1500 (SMC1500-2UC): ~1500 VA / 900W, pure sine wave, network card option, ~$500-700. The "I want the right answer and I don't mind paying for it" choice.
- Tripp Lite OMNI1500LCDT: ~1500 VA / 900W, pure sine wave, ~$300-400. Comparable to the APC.
For a smaller setup: APC Back-UPS 600 (BE600M1) at ~$80-100 gives 300W, enough for a Raspberry Pi, a switch, and a small router. Not enough for a NAS.
Pure sine wave vs simulated sine wave
Modern NASes (and most modern computers) have active PFC power supplies. Active PFC power supplies are sensitive to the wave shape: a "simulated sine wave" UPS can cause the power supply to malfunction, overheat, or shut down. The right answer: pure sine wave UPS. The cost is slightly higher (~$50-100 more); the protection is real.
All the recommendations above are pure sine wave. Avoid the cheap "stepped sine wave" or "simulated sine wave" UPSes for a NAS.
USB connection to the NAS
Most UPSes have a USB port that reports the battery status, the load, and the input voltage. The right answer: plug the USB into the NAS, configure the NAS to monitor the UPS, configure the shutdown on low battery.
For TrueNAS Scale (Linux):
- Plug the UPS USB into the NAS.
- TrueNAS automatically detects the UPS via the built-in NUT (Network UPS Tools) support.
- Configure the UPS in the TrueNAS UI: System → Services → UPS. Set the driver (usually usbhid-ups), the port (auto), the shutdown mode (low battery), the battery level (e.g., 20%).
- Enable the UPS service.
For a Linux VM or container running on the NAS, the same NUT setup, but as a client: the VM/container connects to the NAS's NUT server over the network. The NAS is the UPS master; the VMs are slaves.
The shutdown sequence
The right shutdown sequence on UPS low battery:
- UPS reports "on battery" (the grid is down). The NAS logs the event; an alert is sent (Ntfy, email).
- After a configurable delay (5-10 minutes), the NAS warns the users: "Power is unstable. The system will shut down in 5 minutes." (The delay gives the grid a chance to recover; most outages are under 5 minutes.)
- After another delay (5-10 minutes) or when the battery hits a low threshold (20-30%), the NAS initiates a graceful shutdown: stop the apps, unmount the datasets, sync the disks, halt.
- The UPS continues to power the NAS (and the switch, the router) until the shutdown completes.
The discipline: the shutdown is graceful, not abrupt. The data is consistent. The pool is clean. The next power-on is a normal boot, not a recovery.
Testing the UPS
Like the backup (Chapter 1), the UPS needs to be tested. The discipline:
- Quarterly: pull the plug (literally). The UPS should kick in; the NAS should log the event; the NAS should warn the users; the NAS should shut down gracefully when the battery hits the low threshold.
- Verify the battery is holding charge. The runtime should be within 20% of the rated runtime. If it's degraded, replace the battery (most UPS batteries are user-replaceable, $30-80).
The test: pull the plug, time the shutdown, verify the NAS comes back up cleanly. The 10 minutes of testing quarterly is the price of knowing the UPS actually works.
Battery replacement
UPS batteries are sealed lead-acid (SLA); they last 3-5 years. When the runtime degrades below 70% of the rated runtime, replace the battery. The replacement:
- Order the replacement battery (the same model number, or a compatible one). Most UPSes use standard SLA batteries; the model is on the label.
- Open the battery compartment (usually a single screw on the back).
- Swap the battery. The connectors are usually spade terminals; just unplug and replug.
- Test the runtime. If it's back to the rated runtime, you're done.
The cost: $30-80 for a replacement battery. The benefit: another 3-5 years of protection. The discipline: replace the battery before it dies, not after.
What about a generator?
For multi-hour outages, a generator is the right answer (a small portable generator, a whole-house generator, or a battery-based system like a Tesla Powerwall). The UPS is the bridge; the generator is the long-term backup.
For most home labs, the UPS is enough. The graceful shutdown is the protection; the data is on the pool, the backups are offsite. When the power returns, the NAS boots up and resumes. The 5-minute outage is a non-event; the 5-hour outage is a 5-hour outage (no service, but no data loss).
The "what about a surge protector" question
A surge protector is not a UPS. A surge protector absorbs spikes; it doesn't provide battery backup. For the NAS, the UPS is the protection. For the less-critical devices (the printer, the monitor, the speakers), a surge protector is fine.
The right architecture: NAS + switch + router on the UPS; everything else on a surge protector. The UPS battery is finite; use it for the things that need it.
Engineering Note
A UPS is the cheapest data integrity insurance you can buy. A $300 UPS protects a $2000 NAS with $50,000 of irreplaceable data (family photos, creator's archive, business records). The cost-benefit ratio is absurd. The setup is an afternoon: plug in, configure, test. The discipline: size it right (1000-1500 VA for a NAS), plug in the right things (NAS, switch, router), test it quarterly, replace the battery every 3-5 years. The 30 minutes once a year is the price of knowing the data survives the outage.
Summary
A UPS bridges the gap between the grid going down and the NAS shutting down. For a home NAS, the right UPS is 1000-1500 VA, pure sine wave, with a USB connection to the NAS. The NAS detects the outage, warns the users, and shuts down gracefully when the battery hits the low threshold. The cost: $250-400. The benefit: the data survives any outage. The discipline: test quarterly, replace the battery every 3-5 years. The 30 minutes once a year is the price of knowing the data survives the outage.
Checklist
- ⬜ Buy a pure sine wave UPS, 1000-1500 VA (APC, CyberPower, or Tripp Lite)
- ⬜ Plug in the NAS, the network switch, the router
- ⬜ Connect the UPS to the NAS via USB
- ⬜ Configure NUT in TrueNAS; set the shutdown on low battery
- ⬜ Test: pull the plug, verify the graceful shutdown
- ⬜ Quarterly: test the runtime, verify the battery is healthy
- ⬜ At year 3-5: replace the battery
Volume 6 is complete
3-2-1 backups, monitoring, security hardening, capacity planning, disaster recovery, updates, the runbook, UPS & power protection. The home NAS is now an operational system that can survive anything short of a house fire. The 30 minutes a month is the discipline that makes it last. Volume 6 is the last volume of The TK Home Infrastructure Handbook. The build is done. The system is documented. The discipline is the runbook.