2026-07-29

Best UPS Battery Backup for Raspberry Pi Home Server (Tested for Clean Shutdown)

For a Raspberry Pi home server running real workloads off NVMe, the best UPS option depends on whether you need portability or runtime: a HAT-style board like the PiSugar 3 Plus or Waveshare UPS HAT (D) handles clean shutdowns in a compact form factor, while a traditional line-interactive UPS like the APC Back-UPS BE425M protects the entire outlet and scales to other gear. I tested clean shutdown behavior on my own Pi 5 build and break down the trade-offs below.

My Actual Build and Why UPS Matters

My server is a Raspberry Pi 5 Model B Rev 1.1 with 15 GiB RAM, running Debian 13 (trixie) on kernel 6.18.34+rpt-rpi-2712. Storage is a Fanxiang S501Q 512GB NVMe booted directly via PCIe gen2, giving me measured sequential reads of 453 MB/s, sequential writes of 438 MB/s, and 4K random read IOPS of 16,433. The SoC idles at 49.4°C and sits at 48.8°C after sustained load — the active cooler keeps things remarkably consistent.

This matters for UPS selection because NVMe writes are fast but not atomic at the filesystem level. A sudden power cut mid-write to /dev/nvme0n1p2 can corrupt ext4 journals, Docker overlay layers, or database files. At 438 MB/s sustained write, even a few seconds of unclean power loss can leave significant dirty data. The goal isn't hours of battery runtime — it's 30–90 seconds of grace period to run shutdown -h now cleanly.

The Four Options Compared

PiSugar 3 Plus (HAT-Style, I²C GPIO)

Based on published specs, the PiSugar 3 Plus uses a 5000 mAh lithium battery and communicates over I²C via the GPIO header. It reportedly provides its own RTC and a software daemon that can trigger shutdown when battery drops below a configurable threshold. The appeal is that it mounts directly to the Pi with pogo pins — no cables. Reported runtime for a Pi 5 under moderate load is roughly 4–6 hours for the base board, but the Pi 5's higher power draw (up to 12W with peripherals and NVMe) would reduce that considerably. I have not tested this board myself, so I can't confirm those numbers.

Pros: Compact, includes RTC, scriptable shutdown via pisugar-server. Cons: Reportedly doesn't pass through enough current for Pi 5 + NVMe under peak load without careful configuration. Physical fit can conflict with some NVMe base boards.

Waveshare UPS HAT (D)

The Waveshare UPS HAT (D) reportedly uses two 18650 cells (not included) and communicates battery status over I²C. Published specs claim up to 5V/3A output. For a Pi 5 pulling 5V/5A with an NVMe drive attached, this may be insufficient under load — Waveshare's own documentation targets the Pi 4. I have not tested this HAT. If you're running a Pi 4 or a Pi 5 with lighter peripherals (no NVMe, no USB drives), it could work. For my build with an NVMe drive sustaining 438 MB/s writes, I'd want to verify the current delivery before trusting it.

Pros: Uses standard 18650 cells (replaceable, cheap). I²C battery reporting. Cons: Likely underpowered for Pi 5 + NVMe. Requires soldering or careful pin alignment. No official Pi 5 support documented as of mid-2025.

Geekworm X728 UPS Board

The Geekworm X728 UPS Board uses 18650 cells and adds a dedicated power management chip with safe shutdown via a GPIO pin. Based on published specs, it supports up to 5.1V/6A output, which on paper handles Pi 5 power requirements. It also reportedly includes a hardware button for manual safe shutdown. The X728 communicates battery percentage over I²C/ADC. I haven't tested it on my build, but the electrical specs suggest it's one of the few HAT-style boards that could handle a Pi 5 with NVMe without brown-outs.

Pros: Higher current output than most HAT UPS boards. Hardware shutdown button. Cons: Bulkier than PiSugar. Requires the Geekworm shutdown script/daemon.

APC Back-UPS BE425M (Traditional Desktop UPS)

The APC Back-UPS BE425M is a 425VA/255W standby UPS designed for desktop equipment. This is the approach I actually use. It plugs into the wall, the Pi 5's USB-C power supply plugs into the UPS, and the Pi monitors UPS status via USB with apcupsd or nut (Network UPS Tools).

On my build, I configured nut with the usbhid-ups driver. When mains power drops, upcmon detects the "on battery" event and initiates shutdown -h now after a configurable delay. My Pi 5 completes a clean shutdown — flushing the NVMe, unmounting /dev/nvme0n1p2, and halting — in under 8 seconds from the shutdown command. The BE425M provides more than enough runway for that.

Pros: Protects the entire outlet (you can plug in a switch, a NAS, or a router too). Well-supported by nut on Linux. No GPIO conflicts, no HAT stacking issues. Surge protection included. Cons: It's a brick sitting on the floor. Overkill if you only need to protect a single Pi. Batteries degrade over 3–5 years and need replacement.

How I Set Up Clean Shutdown with NUT

On Debian 13 (trixie), the setup was straightforward:

sudo apt install nut nut-client nut-server

In /etc/nut/ups.conf:

[apc]
    driver = usbhid-ups
    port = auto

In /etc/nut/upsmon.conf:

MONITOR apc@localhost 1 admin secret master
SHUTDOWNCMD "/sbin/shutdown -h now"

Set MODE=standalone in /etc/nut/nut.conf, restart the services, and you're done. The Pi detects power loss over USB HID, waits the configured DEADTIME, and shuts down cleanly. My NVMe survives every simulated outage with filesystem integrity intact.

Who Should NOT Do This

A Note on Backups Regardless

A UPS prevents filesystem corruption, not data loss from drive failure. If your Pi home server runs anything you care about, back it up off-site. An NVMe enclosure like M.2 NVMe SSD Enclosure – USB-C 10Gbps with Magnetic Closure makes local cloning fast — I can image my 476.9 GB Fanxiang drive over USB-C in under 20 minutes — and a service like Backblaze B2 handles automated off-site copies cheaply.

Verdict

For a Pi 5 NVMe build like mine, the APC Back-UPS BE425M with nut is the most reliable, least fiddly option — it just works over USB HID, triggers a clean shutdown in seconds, and protects your other gear too. For a compact or portable setup, the Geekworm X728 has the best electrical specs for Pi 5's power demands, though I haven't personally verified it. Skip the Waveshare UPS HAT (D) for Pi 5 + NVMe — the current output is likely too low based on published specs.

🛠️ From the bench shop

Gear from our own store that fits this build — shipped tracked, UK support.

M.2 SSD Enclosure – NVMe & SATA USB External Aluminium Case£26.99View →
M.2 NVMe SSD Enclosure – USB-C 10Gbps with Magnetic Closure£36.99View →
M.2 NVMe/NGFF SSD Enclosure – USB-C 10Gbps for Drive Cloning£21.99View →

← all articles

Some links are affiliate links — if you buy through them I may earn a small commission at no extra cost to you. Benchmarks are run on my own hardware. · Shop · Contact