Raspberry Pi 5 Power, UPS & Hardened systemd Unit Generator

Continuous / Peak Draw
7.8W / 12.8W
2.56A peak @ 5V rail
USB Bus Current
0 / 1600 mA
24×7 Utility Bill
$0.90/mo
$10.92/yr (5.61 kWh/mo)
UPS Battery Runtime
9.2 hrs
99 Wh @ 72.3% net eff.
[OK] 5.1V PSU wattage and USB peripheral current draw are well within safe continuous limits.
[Unit]
Description=CrabPi Managed Edge Service (openclaw-gateway)
After=network-online.target tailscaled.service
Wants=network-online.target

[Service]
Type=simple
User=pi
Group=pi
WorkingDirectory=/home/pi/.openclaw
EnvironmentFile=-/home/pi/.openclaw/.env
ExecStart=/usr/local/bin/openclaw gateway run
Restart=on-failure
RestartSec=5s
MemoryMax=1536M
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ReadWritePaths=/home/pi/.openclaw
StandardOutput=journal
StandardError=journal
SyslogIdentifier=openclaw-gateway

[Install]
WantedBy=multi-user.target

Deploying Headless 24×7 Raspberry Pi 5 Appliances

MicroSD cards wear out rapidly under Docker container logs, Home Assistant SQLite commits, and NVR metadata writes. Pair an M.2 PCIe NVMe HAT with the official Active Cooler and either a 5.1V/5A USB-PD supply or an IEEE 802.3at PoE+ HAT.

  • Install the Service Unit: Save the output to /etc/systemd/system/<name>.service and run sudo systemctl daemon-reload && sudo systemctl enable --now <name>.service.
  • Powering Multiple Pi Nodes via PoE+: Check total switch watts and Cat6 cable drop in our PoE Switch Power Budget Calculator.
  • Running Self-Hosted *Claw Daemons: Pair your systemd service with a schema-validated manifest from our OpenClaw & ZeroClaw Config Generator.

Related Engineering Calculators & Workbenches

Measured Raspberry Pi Board Power & USB Current Caps

Board Model Idle Gateway 4-Core Peak USB Limit
Raspberry Pi 5 2.8 W 4.6 W 8.8 W 600 / 1600 mA
Raspberry Pi 4B 2.6 W 3.9 W 6.8 W 1200 mA
Pi Zero 2 W 0.7 W 1.3 W 2.4 W 500 mA
Compute Module 5 2.9 W 4.8 W 9.2 W 1200 / 1600 mA

Frequently Asked Questions

Why does Raspberry Pi 5 cap USB ports at 600mA on standard 5V 3A chargers?

Unless Raspberry Pi 5 negotiates a 5.1V / 5A (27W) USB-PD profile at boot, firmware restricts downstream USB current to 600mA total to protect the 5V rail. Plugging in a portable USB 3.0 SSD (~760mA) or Coral USB TPU without a 27W PD supply triggers random disk disconnects.

How is real-world Raspberry Pi UPS battery runtime calculated from Wh?

Usable runtime equals Battery_Wh × 0.85 (DC-DC 5.1V buck/boost regulator efficiency) × 0.85 (safe cell depth-of-discharge) divided by continuous board + HAT wattage (~72.25% net usable Wh).

Why include ProtectSystem=strict and MemoryMax in the generated systemd service?

Running 24×7 daemons on headless SBCs with ProtectSystem=strict, NoNewPrivileges=true, ReadWritePaths, and a cgroup MemoryMax cap stops runaway processes from corrupting the root filesystem or locking up SSH.