# Build an offline library hub with a Raspberry Pi and solar power

> A small solar-powered computer that serves an offline library to every phone nearby over its own Wi-Fi, with parts list and setup script.

## Quick answer

A Raspberry Pi with an SSD, running Kiwix and a Wi-Fi hotspot, serves the whole archive to any phone or laptop with no internet. Use the setup script, copy ZIM files to /srv/library, and keep a second drive.

*Part of [Day Zero](/day-zero), the plan for an AI-related crisis that gets out of control. [Why it exists](/day-zero/purpose). General information, not medical advice: [how these guides are reviewed](/day-zero/review).*

## Build an offline library hub

A **hub** is a small computer with the archive on a drive. It makes its own Wi-Fi network, and anyone nearby can open it on a phone, tablet or laptop with no internet and no app. One hub serves a whole camp.

## Parts

- A **Raspberry Pi 4 or 5** (or any small Linux computer with Wi-Fi), a power supply and a case.
- A **storage drive**: a 256 GB to 2 TB SSD in a USB enclosure, or a large SD card (a USB SSD is more reliable).
- **Power:** 12 V battery with a 5 V converter, a 50 to 100 W solar panel and a charge controller. A Pi draws about 3 to 10 W. See [reader power](/day-zero/reader-power).
- A **spare** of everything that can fail: card, cables, charger.

## Setup

On a computer with internet (today), prepare the hub:

1. Install **Raspberry Pi OS Lite** on the card using Raspberry Pi Imager. Set a username, password and enable SSH.
2. Start the Pi, connect it to the internet by cable, and copy the setup script to it:

```
curl -fsSLO https://www.toswo.com/offline-hub/setup.sh
less setup.sh
sudo bash setup.sh
```

Read the script before you run it. It installs Kiwix, makes the Wi-Fi hotspot **TOSWO-Library**, and starts the library at boot.

3. Copy your `.zim` files from the [Downloads](/downloads) page into `/srv/library/`, then run `sudo systemctl restart toswo-library`.
4. Check: connect a phone to **TOSWO-Library** and open `http://10.42.0.1`.

## Print the instructions

Print this page and tape it to the case. In a crisis nobody will be able to look it up.

## Keep it working

- Keep **a second drive**, copied from the first, in a different place.
- Update the files **once a month** while the internet works. See [Downloads](/downloads).
- Test restarting it from cold. Test it on battery.
- Protect from damp, dust and heat. Keep silica gel in the case.

## Limits

The script has been written for Raspberry Pi OS but Toswo has not tested it on every board. Try it before you need it, and fix what breaks.

*Review status: not yet checked by a named professional. Read [how these guides are reviewed](/day-zero/review) and check anything medical or dangerous with a qualified person where you can.*

## Common questions

---
Source: https://www.toswo.com/day-zero/offline-hub
Published by TOSWO Research (https://www.toswo.com/research). Free to cite with attribution: https://www.toswo.com/cite
