In short: On a Pi 5, a pogo-pin UPS board such as the Geekworm X1200 or X1202, or Waveshare's UPS HAT (E), with PSU_MAX_CURRENT=5000 set in the bootloader. On a mini PC or a Mac, a small line-interactive UPS on USB, read by NUT on Linux. Runtimes printed by the makers are their claims: measure your machine's draw and read the UPS maker's chart.
| Why bother | Raspberry Pi: power dropouts can cause storage corruption, and so can low quality supplies |
|---|---|
| Pi 5 boards | Geekworm X1200 (two 18650 cells), X1202 (four 18650), Waveshare UPS HAT (E) (four 21700) |
| Pi 5 setting | PSU_MAX_CURRENT=5000 in sudo rpi-eeprom-config --edit, so the board gets its 5 A budget |
| Mini PC or Mac | A USB line-interactive UPS; NUT reads HID Power Device Class units with usbhid-ups |
| NUT pieces | upsd (data server, port 3493), upsmon (monitor and shutdown), the driver; Debian package nut-server |
| Mac mini setting | Start up automatically after a power failure, in System Settings, Energy |
Why an agent host wants one
Raspberry Pi puts it plainly: "power dropouts can cause storage corruption." An agent writes all the time (logs, its database, session files, container layers), so the chance that a cut lands in the middle of a write is real. A UPS turns a cut into an event the machine can react to: keep running through a short dropout, or shut down cleanly before the battery is empty. The other half of the job is coming back: a host that stays off after the power returns is as down as one with a broken disk. If an SD card has already died on you, the causes and fixes are on SD card corruption.
UPS boards for the Raspberry Pi 5
These boards mount under the Pi, feed it through pogo pins and leave the 40-pin header free. The figures below are the makers' own.
| Board | Cells | Output | What it reports | Notes from the maker |
|---|---|---|---|---|
| Geekworm X1200 | Two 18650, not included | 5.1 V, up to 5 A | Power loss over GPIO; battery voltage and percentage over I2C | Auto power-on when power returns; programmable safe shutdown on low battery; "up to 6 hours" (maker claim, depends on cells and load) |
| Geekworm X1202 | Four 18650, not included | 5.1 V, up to 5 A | Power-loss detection and battery status | Feed it from its USB-C or its DC input, never both |
| Waveshare UPS HAT (E) | Four 21700, not included | 5 V, up to 6 A | Voltage, current, power and remaining capacity from a fuel gauge IC | PD 3.0 charging up to 40 W; pogo pins for Pi 5, 4B and 3B+ |
Three warnings from Geekworm's wiki apply to the whole category:
- Power the Pi through the UPS board, not through the Pi's own USB-C socket.
- Use unprotected, flat-top cells: the X1200 page says not to use 18650 cells with a built-in protection circuit.
- If the X1200 does not detect the Pi 5, it shuts itself down within 3 seconds; that is expected, not a fault.
Older boards are not all for the Pi 5: Waveshare's UPS HAT (B) wiki lists the Pi 3, 3B+ and 4B, and Geekworm marks its X1209 for the Pi 5B, 4B, 3B and 3B+. Check the listing names the Pi 5 (UPS HAT for the Pi 5 on Amazon).
The 5 A message, PSU_MAX_CURRENT and the power-off draw
A Pi 5 asks its supply for 5 A through USB Power Delivery. Behind a UPS board that negotiation does not happen, and Waveshare notes that the Pi then limits the current to 3 A: USB peripherals drop to 600 mA, and Geekworm's FAQ quotes the message you see, "This power supply is not capable of supplying 5A". Geekworm and Waveshare give the same fix: tell the bootloader the supply's rating.
sudo rpi-eeprom-config --edit
PSU_MAX_CURRENT=5000Raspberry Pi documents the setting: on the Pi 5 only, it makes the firmware "skip USB power-delivery negotiation and assume that it is connected to a power supply with the given current rating". Waveshare also mentions usb_max_current_enable=1 in config.txt as an alternative. More on the message itself: the Pi 5 power supply warning.
One more EEPROM setting matters on a battery. Raspberry Pi says a Pi 5 that is shut down still draws about 1 W to 1.4 W; with POWER_OFF_ON_HALT=1 in the same bootloader config, that drops to about 0.01 W. Our reading: after a low-battery shutdown, that keeps the cells from draining further while the Pi waits for the mains.
Clean shutdown on a Pi board
The HAT boards report over I2C and GPIO, not over USB. We found no NUT driver for them, so NUT is not the tool here: use the maker's scripts, or the board's own behaviour. The X1200 does a programmable safe shutdown when the battery runs low and powers the Pi back on when the mains returns. The UPS HAT (E) does not restart the Pi by default; Waveshare gives a command that tells its controller to cut the Pi's power 30 seconds later, check the charging port after 60 seconds, and restart the Pi if power is back:
i2cset -y 1 0x2d 0x01 0x55Whatever the board, test the whole cycle once (pull the plug, wait for the shutdown, plug back in) before you trust it with the agent, and make sure the agent starts as a service at boot.
Mini PC or Mac mini: a USB UPS and NUT
A box with a mains adapter takes an ordinary desk UPS. A line-interactive model with a USB port is the usual small choice (line-interactive UPS on Amazon). On Linux, Network UPS Tools (NUT) turns that USB cable into a clean shutdown. NUT lists at least 201 manufacturers and 1441 known compatible models, and is free software under the GPL. Its parts:
- A driver.
usbhid-upshandles USB units that use the HID Power Device Class: full support for newer Eaton USB units, MGE, Dell and AMETEK Powervar UPM; partial for APC, Belkin, Cyber Power Systems, EcoFlow, Powercom, PowerWalker, TrippLite and Vertiv. upsd, the data server, which listens on port 3493 unless you configure another.upsmon, the monitor and shutdown controller, which shuts the machine down when the UPS reports a low battery.
On Debian the package is nut-server (version 2.8.1 in Trixie; NUT's latest release is 2.8.5, April 2026), which ships the core system and the serial and USB drivers. Because upsd serves the status over the network, one UPS can protect several machines: the one on the USB cable shares it, the others run upsmon as clients.
On a Mac mini, set the restart side in System Settings, Energy: "Start up automatically after a power failure", or on newer macOS "Start up when power is connected" with After power failure. Without it, the Mac stays off when the power returns.
How big a UPS
Small machines draw little: Raspberry Pi gives a typical bare-board current of 800 mA for the Pi 5, Apple measured the Mac mini M4 at 4 W idle at the wall, and Intel rates the N100 at 6 W (a chip figure, not the box at the wall). Runtime charts are the UPS makers' claims, made for their own test loads, so read your real draw with a plug-in meter (power meter on Amazon), add the router if it shares the UPS, and pick the model whose chart covers a clean shutdown with margin. Our view: for an agent host, the goal is minutes to shut down safely, not hours of uptime. Yearly consumption by machine is on the power cost guide.
What to buy
- UPS HAT for Raspberry Pi 5: a pogo-pin board that names the Pi 5; cells are usually sold separately.
- Line-interactive UPS with USB: for a mini PC, a NAS or a Mac mini; check it is a USB HID unit if you want NUT.
- Plug-in power meter: to read what the host really draws before you trust a runtime chart.
Shop links go through /go/ and open Amazon (amazon.fr in the EU and Switzerland, amazon.com elsewhere). As an Amazon Associate we earn from qualifying purchases. Your price does not change and no brand pays for a place on this page (disclosure). We write no price down: it moves, the shop shows today's.
Questions
Does NUT work with a Raspberry Pi UPS HAT?
Why does my Pi 5 say the power supply is not capable of supplying 5A on a UPS board?
How long will a UPS HAT keep a Raspberry Pi 5 running?
Will a Mac mini turn back on after a power cut?
Which port does NUT use?
Sources
- Raspberry Pi documentation source, power supplies (power-supplies.adoc), read on 21 November 2026.
- Raspberry Pi documentation source, bootloader configuration (eeprom-bootloader.adoc), read on 21 November 2026.
- Geekworm wiki, X1200 (archived copy of 3 November 2026), read on 21 November 2026.
- Geekworm wiki, X1202 (archived copy of 2 November 2026), read on 21 November 2026.
- Waveshare wiki, UPS HAT (E), read on 21 November 2026.
- Waveshare wiki, UPS HAT (B), read on 21 November 2026.
- Network UPS Tools, read on 21 November 2026.
- NUT, usbhid-ups man page, read on 21 November 2026.
- NUT, upsd.conf man page (port 3493), read on 21 November 2026.
- NUT, upsmon man page, read on 21 November 2026.
- Debian, nut-server package (trixie), read on 21 November 2026.
- Apple, change Energy settings on Mac, read on 21 November 2026.
- Apple, Mac mini power consumption and thermal output, read on 21 November 2026.