Kiwix · OpenStreetMap · Offline Knowledge · Raspberry Pi

The Prepper's Wiki — Offline Knowledge on a Pi

Wikipedia, maps, medical references, and survival guides — all accessible from any device within Wi-Fi range, with no internet connection. Because knowledge shouldn't depend on a cell tower.

⏱ 25 min read📊 Beginner–Intermediate📅 May 4, 2026

★ Companion Guides

This guide covers the software and content side of offline knowledge hosting. For making the hardware run off-grid indefinitely, see The Solar-Powered Server. Combined with a Meshtastic mesh network for text communication, you have a complete community resilience stack that runs without any external infrastructure.

Why Host Knowledge Locally?

During extended outages — hurricanes, ice storms, wildfires, infrastructure attacks — internet access can be down for days or weeks. Cellular networks are fragile: towers need power and backhaul, and during a regional crisis, the surviving towers overload immediately with everyone trying to reach family. The internet doesn't "go down" as a monolith, but your access to it disappears when the last mile fails.

Meanwhile, the information you actually need in a crisis is finite and well-defined:

  • How do I purify water? (A few paragraphs, known for decades)
  • What are the symptoms of dehydration vs. heat stroke? (Medical reference)
  • Where is the nearest alternate water source? (A map)
  • How do I splint a fracture? (First aid guide)
  • What plants in my region are edible? (Field guide)

None of this information requires real-time updates. All of it is freely available. And all of it fits on a Raspberry Pi with room to spare. The absurdity is that we've routed access to this knowledge through fragile infrastructure when the knowledge itself is static and compact.

This guide sets up two core offline services: Kiwix for serving offline Wikipedia (and other ZIM-format content), and a tile server for serving offline OpenStreetMap maps. Both run on a Raspberry Pi, both are accessible via any browser on the local network, and neither requires internet after the initial download.

Kiwix — Your Offline Wikipedia

Kiwix is an open-source project specifically designed for offline content delivery. It reads ZIM files — highly compressed archives that bundle an entire website (HTML, images, search index) into a single file. The Wikimedia Foundation publishes official ZIM snapshots of Wikipedia in dozens of languages, updated roughly quarterly. Kiwix-serve turns a ZIM file into a web server that behaves exactly like the real Wikipedia — search, article links, categories, everything works. The only difference is the URL bar says 192.168.x.x instead of wikipedia.org.

Installation

kiwix-tools install — Raspberry Pi 5 (ARM64)
# Download kiwix-tools (precompiled ARM64 binary)
wget https://download.kiwix.org/release/kiwix-tools/kiwix-tools_linux-arm64.tar.gz
tar -xzf kiwix-tools_linux-arm64.tar.gz
sudo cp kiwix-tools*/kiwix-serve /usr/local/bin/
sudo cp kiwix-tools*/kiwix-manage /usr/local/bin/

# Verify installation
kiwix-serve --version
kiwix-serve 3.7.0 — ready

# Create a library file (catalog of your ZIMs)
kiwix-manage /opt/kiwix/library.xml add /opt/kiwix/zim/*.zim

Choosing Your ZIM Files

This is the most important decision — storage is finite and ZIM files are large. Here's what's available and what each one gives you:

Wikipedia EN (Full)

~95 GB

All 6.8M English articles, with images. Search, browse, everything. Requires a 128 GB+ SSD. This is the "real Wikipedia" experience.

Wikipedia EN (Mini)

~17 GB

Top ~100,000 articles by page rank. No images. Covers every major topic; misses niche articles and small-town pages. The sweet spot for most deployments.

Wikipedia EN (Nopic)

~45 GB

Full article set, no images. Good compromise: all the text knowledge, half the storage of the full version.

Wikibooks EN

~300 MB

Complete English Wikibooks — textbooks, how-to guides, manuals. First aid, knots, basic electronics, plant identification. Tiny storage footprint, outsized practical value.

Beyond Wikipedia, Kiwix hosts ZIMs for Wiktionary, Wikivoyage (travel guides), WikiHow, Stack Exchange archives, TED talks (video), and survival/medical reference packs. Browse the full library at library.kiwix.org.

★ Recommended Starter Set (~25 GB)

☐ Wikipedia EN Mini (17 GB) — general knowledge
☐ Wikibooks EN (300 MB) — practical how-to
☐ Wikivoyage EN (700 MB) — regional travel/survival info
☐ Wiktionary EN (6 GB) — comprehensive dictionary
☐ iFixit Tech Wiki (1–2 GB) — repair guides for common devices
☐ Stack Exchange "Survival" export (50 MB) — wilderness survival Q&A
Total: ~25 GB — fits on a 64 GB SD card with room to spare, or barely notices a 256 GB SSD.

Running Kiwix as a Service

Kiwix-serve needs to start automatically when the Pi boots. A systemd service file handles this:

/etc/systemd/system/kiwix-serve.service
[Unit]
Description=Kiwix Serve — Offline Wiki Server
After=network.target

[Service]
ExecStart=/usr/local/bin/kiwix-serve \
--library /opt/kiwix/library.xml \
--port 8080 \
--address 0.0.0.0
Restart=always
User=www-data

[Install]
WantedBy=multi-user.target
enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable --now kiwix-serve
sudo systemctl status kiwix-serve
Active: active (running) — Kiwix is live on port 8080

# Test from another device on the same network:
http://192.168.1.100:8080
← Wikipedia landing page loads, search works, articles render

Offline Maps — OpenStreetMap on a Pi

A text encyclopedia is half the equation. The other half is spatial: where is the water source? What's the fastest route to the community center? Where are elevation changes that might flood?

OpenStreetMap (OSM) is the Wikipedia of maps — community-maintained, freely licensed, and available as raw data you can host yourself. Unlike Google Maps, OSM's license permits offline hosting and the tooling ecosystem is built for it.

There are two approaches for serving offline maps, and they address different needs:

Option A — tileserver-gl (Full Rendered Maps)

tileserver-gl renders OSM data into the familiar "slippy map" tiles your browser expects — exactly like Google Maps but from your Pi. It serves raster and vector tiles, styles them with Mapbox GL stylesheets, and presents a browsable, zoomable map in any browser.

tileserver-gl install — Node.js on Pi 5
# Install Node.js 22.x (if not already installed)
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs

# Install tileserver-gl globally
sudo npm install -g tileserver-gl

# Download a regional .mbtiles extract
# Source: download.geofabrik.de (free, updated daily)
wget https://download.geofabrik.de/north-america/us/oklahoma-latest.osm.pbf

# Convert .osm.pbf → .mbtiles (this takes a while)
npx tilemaker oklahoma-latest.osm.pbf \
--output oklahoma.mbtiles \
--config /usr/local/lib/node_modules/tileserver-gl/config.json \
--process /usr/local/lib/node_modules/tileserver-gl/process-openmaptiles.lua

# Start the tile server
tileserver-gl oklahoma.mbtiles --port 8081
Tile server running at http://localhost:8081

⚠️ Storage Warning — Tile Generation

Converting OSM data to mbtiles for a US state takes 1–3 GB of mbtiles output and about 30–60 minutes of processing on a Pi 5. A full US extract produces a 40–60 GB mbtiles file and may take 8+ hours. For most preparedness use cases, focus on your state + neighboring states (~5–10 GB total). Geofabrik provides per-state extracts; you don't need the whole planet. The Pi 5's 8 GB of RAM handles tile generation without swapping; a Pi 4 with 4 GB may struggle on larger extracts.

Option B — Organic Maps (Lightweight, Phone-First)

If the full tileserver-gl approach feels heavy, Organic Maps takes a different strategy: download OSM data directly to each phone, no server required. The Pi's role shifts from "render tiles" to "file server" — you host the map data files and people download them to their devices. Organic Maps is a free, open-source app (iOS/Android) that works fully offline once maps are loaded.

The advantage: no rendering load on the Pi, maps work when you leave Wi-Fi range, and the app handles routing/turn-by-turn. The disadvantage: each device needs its own download, and you need the Organic Maps app installed before the crisis (it's 60 MB — pre-install it on family phones as part of prep).

To make the map files available, host them via a simple file server on the Pi — Apache directory listing or a basic Python HTTP server. Include a README with install instructions for anyone connecting to the Pi's Wi-Fi for the first time.

Systemd Service for tileserver-gl

/etc/systemd/system/tileserver.service
[Unit]
Description=OpenStreetMap Tile Server
After=network.target

[Service]
ExecStart=/usr/bin/tileserver-gl \
/opt/maps/oklahoma.mbtiles \
--port 8081
Restart=always
User=www-data

[Install]
WantedBy=multi-user.target

Landing Page — Your Knowledge Portal

With Kiwix on :8080 and the tile server on :8081, you need a simple landing page that ties them together. Anyone connecting to the Pi's Wi-Fi should see a clean directory of available resources. Create an index.html in the web root:

/var/www/html/index.html — Community Knowledge Portal
<!DOCTYPE html>
<html>
<head>
<title>Community Knowledge Portal</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body { font-family: system-ui; max-width: 600px; margin: 2rem auto; }
a { display: block; padding: 1rem; margin: 0.5rem 0; \
background: #f0f0f0; border-radius: 8px; text-decoration: none; }
</style>
</head>
<body>
<h1>Off-Grid Knowledge Hub</h1>
<p>These services are running locally — no internet required.</p>
<a href="http://192.168.50.1:8080">📚 Wikipedia (Offline)</a>
<a href="http://192.168.50.1:8081">🗺️ Local Maps</a>
<a href="/documents/">📄 Emergency Documents</a>
</body>
</html>
# Replace 192.168.50.1 with your Pi's actual IP or access-point address

Content Curation — What Actually Matters

The technical setup is straightforward. The harder question is: what content do you include? Storage is cheap but not infinite, and during a crisis, curation beats completeness. Here's what I keep on my own offline Pi:

ResourceFormatSizeWhy
Wikipedia EN MiniZIM via Kiwix17 GBGeneral reference — answers "what is X?" for nearly any topic someone might need to research
Wikibooks ENZIM via Kiwix300 MBFirst aid, knots, basic electrical, water treatment, plant identification — practical "how to" vs. Wikipedia's "what is"
State + Neighboring OSMmbtiles5 GBMaps of your region. Roads, water features, elevation, buildings. Navigation without GPS data connection
Local County PDF MapsPDF100 MBCounty-level parcel maps, flood zones, evacuation routes. Often available free from county GIS departments
FEMA / Red Cross GuidesPDF50 MBOfficial emergency preparedness and response guides. Free downloads
Medical ReferencePDF / ZIM200 MB"Where There Is No Doctor" (free PDF from Hesperian), basic pharmacology reference, wound care guide
Community Contact ListHTML / PDF<1 MBNames, radio call signs, mesh node IDs, physical addresses, skills inventory. Update quarterly

★ Content Philosophy — Depth Over Breadth

Wikipedia contains 6.8 million English articles. During a two-week power outage, your community might need 500 of them. The right curation question isn't "what could someone possibly want to know?" — it's "what knowledge, if unavailable, would cause preventable harm?" Water purification, wound care, food safety, structural assessment after a storm, generator safety. Build the collection outward from those core needs, not inward from what's available.

Regular Content Updates

ZIM files are published quarterly by the Wikimedia Foundation. Maps are updated daily on Geofabrik. Your offline content will drift from reality over time — roads get renamed, Wikipedia articles get corrections, new medical guidelines get published. The update cadence that makes sense:

  • Quarterly: Replace Wikipedia/Wikibooks ZIMs with new versions. Keep the old one while downloading the new one (Kiwixtools supports library switching without downtime).
  • Monthly: Refresh OSM map extracts. Geofabrik daily diffs are tiny; the monthly refresh is "download the new .pbf, rebuild mbtiles overnight." The Pi can run the tile build as a cron job.
  • After any local event: Update community contact list, review and refresh any locally-produced documents.

An update script that downloads ZIMs and refreshes maps can run automatically when the Pi has internet — during normal grid-connected operation, let it keep itself current so it's ready when the grid goes down.

Testing — The Dry Run

The system is useless if you discover a problem during a crisis. Run a "communications blackout drill" at least once a year:

  1. Unplug the Pi's internet connection (or disable Wi-Fi uplink).
  2. Connect a phone/tablet to the Pi's access point.
  3. Navigate to Wikipedia, search for "water purification." Confirm the article loads and images render.
  4. Open the tile server, browse to your neighborhood. Confirm zoom/pan work and labels are readable.
  5. Open every PDF in the document library. Confirm none are corrupt.
  6. Note anything that failed, fix it, and update the drill checklist.

The drill should take 15 minutes. It's the cheapest insurance you'll ever buy against discovering that your ZIM file was corrupted during the last download and you never noticed.

← Back to Guides

Join the conversation.

What's in your offline knowledge library? Share curation strategies, ZIM recommendations, or field experiences.