A portable offline knowledge lighthouse. A lightweight Raspberry Pi Zero W hotspot powered by Kiwix to deliver Wikipedia and digital libraries to areas without internet connectivity—bringing the Great Library of Alexandria to the palm of your hand.
Pharos was the famous lighthouse of Alexandria, one of the Seven Wonders of the Ancient World, built to guide ships safely to harbor. Just as the original Pharos illuminated the path for seafarers, this project serves as a beacon of knowledge, illuminating minds in connectivity-challenged regions by providing offline access to humanity's collective knowledge through Wikipedia and other digital libraries.
Pharos transforms a Raspberry Pi Zero 2 W into a self-contained wireless access point that serves offline content via Kiwix. Connect to the hotspot, open your browser, and access Wikipedia, technical documentation, and educational resources—all without an internet connection.
- Portable & Battery-Friendly: Designed for the Raspberry Pi Zero W with minimal power consumption
- Offline-First: Complete offline access to Wikipedia and other ZIM-based libraries
- Easy Setup: Automated installation script handles everything
- Expandable: Add more content libraries (ZIM files) as needed
- Hotspot-Ready: Built-in wireless access point configuration
To clone and use this repository, you'll need:
- Git installed on your system
- A Raspberry Pi Zero W (or compatible model) running Debian/Raspberry Pi OS
- An SD card (512GB recommended) with the OS installed
- Root access (the setup script must be run with
sudo)
git clone https://github.com/buguno/pharos
cd pharossudo ./setup.shThe script will:
- Update package lists (
apt update) - Install required packages:
kiwix-tools(provides thekiwix-servebinary)ca-certificates(for secure HTTPS downloads)curl(installed on-demand if needed for ZIM downloads)
- Create the ZIM directory at
/srv/kiwix/content(configurable viaZIM_DIRenvironment variable) - Set up systemd service (
kiwix-serve.service) for automatic startup and management - Prompt for optional ZIM downloads:
- Bitcoin wiki ZIM (
bitcoin_en_all_maxi_2021-03.zim) - iFixit ZIM (
ifixit_en_all_2025-12.zim)
- Bitcoin wiki ZIM (
- Start the Kiwix service if ZIM files are present
You can customize the setup using environment variables:
sudo KIWIX_PORT=8080 ZIM_DIR=/mnt/storage/kiwix ./setup.shKIWIX_PORT: Port for the Kiwix web server (default:8080)ZIM_DIR: Directory where ZIM files are stored (default:/srv/kiwix/content)
┌─────────────────────────────────────┐
│ Raspberry Pi Zero W │
│ │
│ ┌───────────────────────────────┐ │
│ │ Kiwix Server (Port 8080) │ │
│ │ Serving ZIM files │ │
│ └───────────────────────────────┘ │
│ ▲ │
│ │ │
│ ┌───────────────────────────────┐ │
│ │ Hotspot (Wi-Fi AP) │ │
│ │ SSID: PHAROS │ │
│ └───────────────────────────────┘ │
│ │ │
└───────────┼─────────────────────────┘
│
▼
┌───────────────┐
│ Client │
│ (Phone/PC) │
└───────────────┘- Kiwix Server (
kiwix-serve): Serves offline content from ZIM files via HTTP - Systemd Service: Manages the Kiwix process, ensures it starts on boot, and handles restarts
- ZIM Files: Compressed archive format containing offline Wikipedia/digital library content
- Hotspot (future): Wireless access point configuration (to be implemented)
The Kiwix server runs as a systemd service:
# Check status
sudo systemctl status kiwix-serve.service
# View logs
sudo journalctl -u kiwix-serve.service -f
# Restart service
sudo systemctl restart kiwix-serve.service
# Stop service
sudo systemctl stop kiwix-serve.serviceOnce the service is running, connect to the hotspot and navigate to:
http://10.42.0.1:8080Or, if accessing from the Pi itself:
http://localhost:8080You can download additional ZIM files from the Kiwix ZIM library:
- Download the
.zimfile to your computer - Transfer it to the Pi (via
scp, USB drive, or other method) - Place it in the ZIM directory (default:
/srv/kiwix/content) - Restart the service:
sudo systemctl restart kiwix-serve.servicePopular ZIM files include:
- Wikipedia (various languages and sizes)
- Wikibooks, Wiktionary, Wikiquote
- Project Gutenberg (free e-books)
- Stack Overflow (programming Q&A)
- Khan Academy (educational content)
- And many more at download.kiwix.org
If kiwix-serve.service fails to start:
-
Check if ZIM files exist:
sudo ls -lah /srv/kiwix/content
-
Check service logs:
sudo journalctl -u kiwix-serve.service -n 50 --no-pager
-
Test the kiwix-serve command manually:
sudo /usr/bin/kiwix-serve -p 8080 /srv/kiwix/content/*.zim -
Verify the service configuration:
sudo systemctl cat kiwix-serve.service sudo cat /etc/default/kiwix-serve
The service will not start if no .zim files are present. Download at least one ZIM file using the setup script prompts or manually.
If port 8080 is already in use, set a different port:
sudo KIWIX_PORT=9090 ./setup.sh- Hotspot/access point configuration (internal Wi-Fi + USB dongle for WAN)
- Web-based management interface
- Automatic ZIM updates
- Support for multiple languages
- Battery monitoring and power management
- Docker containerization option
Licensed under the MIT License. See LICENSE for more details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Kiwix for the offline content serving technology
- Wikipedia and all content contributors for making knowledge freely available
- The Raspberry Pi Foundation for affordable computing hardware
Light the way. Share knowledge. Build bridges.