← Back to Articles
Tech Ethics

Self-Hosted Library with Booklore

Turn a Raspberry Pi into a private eBook and document library for literacy programs, letting you control access, eliminate subscription fees, and keep reading data off third-party servers.

Literacy programs, community centers, and small schools often rely on commercial eBook platforms that charge per-title, track student reading habits, and retain the right to remove content without notice. Booklore (now continued as Grimmory) is a self-hosted eBook server that runs comfortably on a Raspberry Pi, giving your organization full ownership of its digital library, reader progress data, and access policies.

Why a Self-Hosted Library?

Commercial eBook services can cost $10–25 per user per month. For a program serving fifty participants, that is $6,000–$15,000 annually—money that could fund instructors or materials. A self-hosted alternative eliminates those fees after a small upfront hardware investment.

More importantly, reading logs and progress data stay on your server. Student reading habits are sensitive educational records. Hosting them in-house removes compliance concerns and ensures the data cannot be repurposed for advertising or sold to data brokers.

Finally, volunteers learn hands-on skills: Docker (a tool that packages an app and all its dependencies into a portable, isolated container) container management, basic database concepts, and web application administration. Those skills transfer directly to maintaining other digital-commons tools your organization might adopt.

What You Need

Installing Docker and Booklore

Booklore is distributed as a Docker container, making installation repeatable and easy to back up. If Docker is not already installed on your Pi:

curl -sSL https://get.docker.com | sh
sudo usermod -aG docker $USER

Log out and back in for the group change to take effect. Then create a directory for Booklore and run the container:

mkdir -p ~/booklore/data ~/booklore/books
cd ~/booklore

Launch the container with a persistent volume for your library:

docker run -d \
  --name booklore \
  -p 5000:8080 \
  -v $(pwd)/data:/data \
  -v $(pwd)/books:/books \
  --restart unless-stopped \
  ghcr.io/booklore-app/booklore:latest

Booklore will be accessible at http://YOUR_PI_IP:5000.

Initial Setup

Open the web interface and create the first admin account. Then upload your eBooks by dragging them into the web interface or placing them in the ~/booklore/books/ directory and triggering a scan.

Booklore automatically fetches metadata (title, author, cover art) from online sources. You can edit any field through the web interface. The "magic shelves" feature dynamically organizes books by genre, author, or custom tags—useful for sorting curriculum materials from pleasure reading.

Reader Sync with KOReader

If your participants use eInk devices or Android tablets, the KOreader app can sync reading progress with Booklore. This lets students pick up reading on any device without losing their place. Setup instructions are in the Booklore web interface under Settings → KOReader.

Backing Up the Library

Because everything lives in ~/booklore/, backups are trivial:

rsync -avz ~/booklore/ /path/to/backup/drive/

Or automate nightly backups with a cron job:

0 2 * * * rsync -avz ~/booklore/ /mnt/backup/booklore/

Access Control and Privacy

Booklore does not enforce DRM (Digital Rights Management — copy protection that may prevent reading files on different devices). That is a feature for community programs: students can read on any device, copy passages for study, and keep their books after leaving the program. If you need to restrict access to internal networks only, use your Pi's firewall:

sudo ufw allow from 192.168.1.0/24 to any port 5000

Adjust the subnet to match your organization's local network.

Training Volunteers

Maintaining a Booklore instance is an excellent entry-level project for technically curious volunteers. Document the following in a shared notebook:

Rotate the "digital librarian" role every quarter so multiple people gain familiarity with the system.

Why This Matters for Nonprofits

A community that controls its own library controls its own curriculum. There are no licensing expirations, no vendor lock-in, and no surveillance of reading habits. For the price of a Raspberry Pi and a few hours of volunteer time, your organization can run a library that would cost thousands annually on commercial platforms. The independence is worth more than the savings.

💬
Continue the conversation in the forum
Town Square · Community Tool Shed · The Tech Collective · Sustainable Communities · and more
Join the Forum →