Raspberry Pi · Solar Power · Off-Grid · Self-Hosting

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.

⏱ 30 min read📊 Intermediate📅 May 4, 2026

⚠️ Safety — DC Power

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.

The Use Case

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.

Power Math — The Non-Negotiable First Step

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.

Power Budget — Pi 5 Solar Server (24h)

Pi 5 idle (5W) × 24h120 Wh
External SSD (1.5W) × 24h36 Wh
Charge controller overhead (~15%)23 Wh
Total daily consumption~179 Wh

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 Sizing Formula

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.

Battery Sizing for Autonomy

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:

  • Cycle life: 3,000–5,000 cycles to 80% capacity vs. 300–500 for lead-acid. In a daily-cycling solar setup, that's 8–13 years vs. 1–2 years.
  • Flat discharge curve: LiFePO4 holds ~13.0–13.2V through most of its discharge range, so your DC-DC converter sees stable input voltage. Lead-acid voltage sag under load can brown out a Pi.
  • Depth of discharge tolerance: LiFePO4 handles 80% depth of discharge routinely. Lead-acid degrades rapidly past 50%.
  • No thermal runaway: Unlike the Li-ion (NMC) cells in phones and laptops, LiFePO4 doesn't sustain combustion if punctured or overcharged. For unattended outdoor operation, this matters.

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 Selection

ComponentRecommendationApprox. Cost
Solar PanelRenogy 100W 12V monocrystalline (or equivalent)$70–90
Charge ControllerVictron SmartSolar MPPT 75/10 (overkill but bulletproof)$70–85
BatteryLiFePO4 12V 60Ah (LiTime, Eco-Worthy, or similar)$130–160
DC-DC ConverterDROK 12V→5V 5A buck converter (or Waveshare Pi UPS HAT for integrated solution)$12–25
Raspberry PiPi 5 8GB (or Pi 4 4GB for lower power draw)$50–80
StorageSamsung T7 or WD Green NVMe in USB enclosure$30–50
EnclosureWeatherproof ABS junction box (IP65+), cable glands$20–30

⚠️ Charge Controller — MPPT vs. PWM

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.

Power Delivery to the Pi

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:

  1. Waveshare Pi UPS HAT (or similar): Plugs onto the Pi's GPIO header, accepts 8–18V input, provides regulated 5V to the Pi, and includes a small Li-ion buffer cell. Handles the transition between solar and battery seamlessly. The Pi sees it as a HAT, reads voltage/current via I²C. About $25.
  2. Quality buck converter → GPIO 5V pins: A DROK or similar 12V→5V converter with output filtering. Add a 1000 µF electrolytic capacitor across the output to absorb transients. This works but lacks the graceful shutdown signaling of a proper UPS HAT.
  3. USB-C PD trigger board: A small board that negotiates 5V from a USB-C PD source. Use this if your battery setup includes a USB-C PD power bank rather than a raw battery. Clean, but adds conversion layers and inefficiency.

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.

Assembly & Wiring

wiring diagram — text schematic
# Power flow: Sun → Load
Solar Panel (+) ──── [FUSE 10A] ──── MPPT PV (+)
Solar Panel (−) ──────────────────── MPPT PV (−)
MPPT Battery (+) ── [FUSE 5A] ──── Battery (+)
MPPT Battery (−) ───────────────── Battery (−)
Battery (+) ────── [FUSE 5A] ──── DC-DC IN (+)
Battery (−) ────────────────────── DC-DC IN (−)
DC-DC OUT 5V ────────────────────── Raspberry Pi (UPS HAT or GPIO)

# Wire gauge: 14–16 AWG for panel/battery, 18–20 AWG for Pi power
# All fuses within 6" of battery positive terminal (ABYC standard)

Physical notes:

  • Mount the charge controller and DC-DC converter on a DIN rail inside the enclosure. It keeps wiring organized and lets you swap components without cutting zip ties.
  • Cable glands where wiring enters/exits the enclosure maintain the weather seal. Silicone caulk is not a substitute.
  • Ventilation: The enclosure will heat up in direct sun. A small ventilation port with a Gore-Tex membrane patch (or a 3D-printed vent with desiccant) prevents condensation while allowing pressure equalization. The MPPT controller and buck converter both need air circulation.

Software — What to Host

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":

Tier 1 — Always On (Critical)

  • Kiwix-serve: Offline Wikipedia, Wikibooks, and/or Wiktionary. A full English Wikipedia ZIM file is ~95 GB (compressed). The "Wikipedia Mini" ZIM (top 100k articles, no images) is ~17 GB. Kiwix serves it as a browsable website. We'll cover this in detail in the companion guide, "The Prepper's Wiki."
  • Offline OpenStreetMap: Using tile servers like tileserver-gl or Organic Maps' offline mode. Critical for navigation when Google Maps is unavailable. A full planet OSM extract is massive, but regional extracts (your state + surrounding) fit comfortably on a 128 GB SSD.
  • Emergency document cache: First aid manuals, water purification guides, local emergency frequencies, contact lists. PDFs served via a simple directory listing or lightweight document manager.

Tier 2 — Useful (Comfort & Coordination)

  • Mesh network bridge: If you've deployed Meshtastic nodes (see the Crisis Mesh guide), a Pi connected to one node can run a simple MQTT→web bridge, giving non-phone users access to the mesh via a browser.
  • Local messaging: A simple PHP or Python web app for message-board style communication among anyone connected to the Pi's Wi-Fi. Not real-time chat, but a persistent bulletin board.
  • File share: Samba or a simple upload/download web interface for sharing documents among community members within Wi-Fi range.

Tier 3 — Nice to Have (Entertainment & Morale)

  • Calibre-web or Kavita: E-book library. A curated collection of 1,000 ebooks is under 2 GB.
  • Jellyfin (audio only): Music streaming. A Pi 5 handles direct-play audio to multiple clients without breaking a sweat. Skip video transcoding — the Pi can't do it in real-time and it'll spike your power draw.

★ Storage Strategy

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.

Pi as Access Point

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:

hostapd + dnsmasq — Pi 5 as access point
# Install access point + DHCP packages
sudo apt install hostapd dnsmasq

# Stop services until configured
sudo systemctl stop hostapd dnsmasq

# /etc/hostapd/hostapd.conf — minimal AP config
interface=wlan0
ssid=OffGridInfo
hw_mode=g
channel=6
wpa=2
wpa_passphrase=CommunityAccess2026

# /etc/dnsmasq.conf — DHCP for AP clients
interface=wlan0
dhcp-range=192.168.50.50,192.168.50.150,12h

# Set static IP for wlan0 in /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.50.1/24
# Reboot — AP appears as "OffGridInfo" network

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.

Monitoring — Don't Fly Blind

An unattended solar server needs health telemetry. You don't need a cloud dashboard — just a simple status page and some logging:

health check script — /usr/local/bin/solar-health.sh
#!/bin/bash
# Run via cron every 15 minutes — logs system + power health
LOG=/var/log/solar-health.log
echo "$(date -Iseconds) | \
CPU:$(vcgencmd measure_temp | cut -d= -f2) \
Load:$(uptime | awk '{print $NF}') \
Disk:$(df -h / | tail -1 | awk '{print $5}') \
Battery:$(python3 /opt/battery-read.py)" >> $LOG

# Set up cron (every 15 min)
crontab -l | { cat; echo "*/15 * * * * /usr/local/bin/solar-health.sh"; } | crontab -
Health logging active — check /var/log/solar-health.log

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.

Deployment Checklist

★ Before You Walk Away

☐ 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

Scaling — Multiple Pis, One Power System

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.

← Back to Guides

Join the conversation.

Built a solar Pi server? Share your power numbers, hardware choices, and what you're hosting.