The Solar-Powered Server — Off-Grid Pi Station
A Raspberry Pi, a solar panel, and a battery. Host critical documents, local maps, and emergency communication tools that stay online when the grid goes down — indefinitely.
A Raspberry Pi, a solar panel, and a battery. Host critical documents, local maps, and emergency communication tools that stay online when the grid goes down — indefinitely.
This project involves lithium batteries, solar charge controllers, and DC wiring. LiFePO4 cells are significantly safer than Li-ion (no thermal runaway), but short circuits across a battery that can source 20A will melt wires and start fires. Always fuse between the battery positive terminal and anything it powers. A 5A blade fuse costs $0.50 and prevents a bad day.
A server that depends on grid power is a server that goes dark during an extended outage — exactly when you need it most. If you're hosting local maps, emergency contact lists, medical references, or community coordination tools, the value of that data is highest when infrastructure is compromised.
This guide describes a Raspberry Pi-based server designed for continuous off-grid operation. It uses a solar panel as the primary power source, a LiFePO4 battery as buffer storage, and a charge controller to manage the relationship between them. The Pi serves as an access point and web server — anyone within Wi-Fi range can access whatever you've chosen to host: documents, offline Wikipedia, maps, messaging, or family communication.
The design target: 24/7/365 uptime with zero grid input, assuming a reasonable solar window and properly sized components. Total hardware cost: $180–250 depending on component choices.
Before buying anything, calculate your power budget. A Pi 5 at idle draws roughly 5W (5.1V at ~1A with typical peripherals). Under compute load — serving web pages, running a database, transcoding — it can spike to 8–10W. If you're using an SSD (recommended for reliability), add 1–2W. A Pi 4 is slightly more efficient at idle (~3.5W) but has less headroom for concurrent services.
Now work backward from your available sunlight. Most of the continental US averages 4–6 peak sun hours (PSH) per day, with seasonal variation. A "peak sun hour" means 1,000 W/m² irradiance — direct, unshaded noon-level sunlight. Morning and afternoon light is less intense, which is why the PSH metric exists: it compresses a full day's solar energy into an equivalent number of noon hours.
Panel Wattage = Daily Wh ÷ Peak Sun Hours ÷ 0.7
The 0.7 factor accounts for: charge controller efficiency, wiring losses, panel temperature derating (panels lose ~0.4% efficiency per °C above 25°C), and the fact that you can't fully drain a battery daily without killing it.
For our 179 Wh target with 5 PSH: 179 ÷ 5 ÷ 0.7 = 51W minimum panel. Round up to a 60W or 100W panel for cloudy-day margin.
The battery bridges the gap between what the panel produces and what the Pi consumes — specifically through nights and cloudy days. LiFePO4 (lithium iron phosphate) is the correct chemistry for this application:
For autonomy — how many days the system runs without sun — I recommend 3 days minimum. With 179 Wh daily consumption and a 12V nominal battery:
Battery Capacity = (179 Wh × 3 days) ÷ 12V ÷ 0.8 (max depth of discharge) = 56 Ah
A 12V 60Ah LiFePO4 battery (~$130–160) gives you three full sunless days before shutdown. If your region gets extended overcast periods (Pacific Northwest in winter, monsoon season), size up to 100Ah.
| Component | Recommendation | Approx. Cost |
|---|---|---|
| Solar Panel | Renogy 100W 12V monocrystalline (or equivalent) | $70–90 |
| Charge Controller | Victron SmartSolar MPPT 75/10 (overkill but bulletproof) | $70–85 |
| Battery | LiFePO4 12V 60Ah (LiTime, Eco-Worthy, or similar) | $130–160 |
| DC-DC Converter | DROK 12V→5V 5A buck converter (or Waveshare Pi UPS HAT for integrated solution) | $12–25 |
| Raspberry Pi | Pi 5 8GB (or Pi 4 4GB for lower power draw) | $50–80 |
| Storage | Samsung T7 or WD Green NVMe in USB enclosure | $30–50 |
| Enclosure | Weatherproof ABS junction box (IP65+), cable glands | $20–30 |
A PWM controller connects the panel directly to the battery through a switching transistor — it's effectively a voltage clamp. Panel voltage is pulled down to battery voltage, wasting the voltage difference as heat. An MPPT controller uses a DC-DC converter to track the panel's maximum power point, converting excess voltage into additional charge current. For a 100W "12V" panel (which actually operates at ~18V Vmp), an MPPT controller recovers 25–30% more power than PWM — roughly 20–25 extra watt-hours per day. That's the difference between the Pi staying online through a cloudy day or dying at 3am. The $50 premium over a PWM controller buys actual reliability.
This is where many solar Pi builds get it wrong. The Pi 5 negotiates power via USB-C PD (Power Delivery). If you simply wire 5V from a buck converter to the GPIO 5V pins, you bypass the Pi's polyfuse and ESD protection. It works — until a transient from the charge controller or a voltage sag from a cloud passing over the panel causes a brownout and corrupts your SSD.
There are three approaches, in order of reliability:
I recommend option 1 for anything you want to set and forget. The UPS HAT's I²C reporting also lets you monitor battery voltage from the Pi itself — useful for remote health checks.
Physical notes:
With the hardware running, the question becomes: what do you serve? The Pi runs a standard LAMP or Flask stack — Apache or Nginx, a database if needed, and whatever applications you choose. Here's what I consider the "off-grid starter pack":
Use a 256 GB or 512 GB NVMe in a USB 3.0 enclosure. Don't run the OS from an SD card for a solar server — SD cards develop write fatigue and corrupt on unexpected power loss. The Pi 5 can boot directly from NVMe via USB. Enable the overlayfs or use log2ram to reduce writes to the boot partition. Set up a cron job to run fstrim weekly on the SSD to maintain performance.
In an off-grid scenario, the Pi serves Wi-Fi as well as web pages. Configure it as an access point with a DHCP server so anyone within range can connect without knowing an existing network password:
Configure the web server (Apache/Nginx) to serve a simple landing page at whatever address the Pi's DHCP assigns itself — this becomes the "portal" anyone sees when they connect. Include a directory of available services: links to the wiki, maps, document library, and message board.
An unattended solar server needs health telemetry. You don't need a cloud dashboard — just a simple status page and some logging:
If your UPS HAT supports I²C voltage reporting, the battery-read.py script reads it via smbus2 or the vendor's Python library. The log gives you a record of when the battery was charging (panel producing), when it was discharging (night/clouds), and whether the system ever approached shutdown voltage.
☐ Power budget confirmed (panel wattage ≥ 1.5× calculated minimum)
☐ All wiring fused at battery positive
☐ Enclosure is weatherproof (IP65+) with cable glands, not drilled holes
☐ Pi boots from SSD, not SD card
☐ AP mode tested: connect a phone to the Pi's Wi-Fi and load the landing page
☐ All critical content loaded and verified accessible (wiki, maps, documents)
☐ Health logging active and writing to persistent storage
☐ Run for 72 hours on battery alone (panel disconnected) to verify autonomy
☐ Labels inside enclosure: fuse ratings, wire gauge, service passwords
If you need more compute (separate Pi for maps, another for Kiwix), you can hang multiple Pis off the same solar+battery infrastructure rather than building separate power systems for each. The DC-DC converter just needs enough current capacity: a Pi 5 at 5W draws ~1A at 5V, so a 5A buck converter comfortably powers three Pis. The limiting factor is the solar panel and battery — recalculate the power budget with each additional Pi.
For a neighborhood-scale deployment, one 200W panel + 100Ah LiFePO4 + three Pi 5s covers a robust suite of services with 3+ days of autonomy. Total hardware cost: roughly $600. That's a community-scale information infrastructure for less than the price of a single generator.
Built a solar Pi server? Share your power numbers, hardware choices, and what you're hosting.