Starexe
📖 Tutorial

Self-Host Your eBook Collection for Under $30 – A Complete Syncing Guide

Last updated: 2026-05-04 06:22:49 Intermediate
Complete guide
Follow along with this comprehensive guide

Overview

Over the years, I accumulated hundreds of digital books across Kindle, Apple Books, and Google Play—until I heard about a publisher dispute that wiped purchased titles from users' Kindle libraries without warning. That made me wonder: if it happened to me, could I do anything? The answer is yes. By building a self-hosted eBook library for under $30, you can store, organize, and sync your entire collection across all your devices, without relying on any single retailer. This guide walks you through the entire process, from choosing hardware to setting up remote access.

Self-Host Your eBook Collection for Under $30 – A Complete Syncing Guide
Source: www.makeuseof.com

Prerequisites

  • A computer or single-board computer running Linux (e.g., Raspberry Pi 4, an old laptop, or a cheap VPS). Budget target: $30 or less (Raspberry Pi Zero 2 W + SD card fits this).
  • A free domain name (optional, but recommended for easy access) via DuckDNS or similar.
  • Basic familiarity with the command line and Docker (or willingness to follow along).
  • Your existing eBook files (even if they're DRM-protected, you'll need to remove DRM separately—this guide assumes you have legal rights to the files).

Step-by-Step Instructions

1. Choose Your Hardware

For under $30, the best option is a Raspberry Pi Zero 2 W (about $15) plus a 32GB microSD card (around $10) and a power supply (about $5). This tiny device draws minimal power and runs 24/7. Alternatively, use an old PC or a $25 VPS from a budget provider.

2. Install the Operating System

Flash Raspberry Pi OS Lite (64-bit) to the SD card using the Raspberry Pi Imager. Enable SSH by creating an empty file named ssh on the boot partition. Insert the SD card, power on, and find its IP address (e.g., via your router). Connect via SSH: ssh pi@192.168.x.x (default password: raspberry).

3. Install Docker and Calibre-Web

Calibre-Web is a web frontend for Calibre, offering a beautiful e-book library with OPDS support (for syncing). Docker simplifies setup. Run these commands on your Pi:

sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker

Create a directory for Calibre-Web and its config:

mkdir ~/calibre-web && cd ~/calibre-web
nano docker-compose.yml

Paste the following (adjust paths as needed):

version: '3'
services:
  calibre-web:
    image: linuxserver/calibre-web:latest
    container_name: calibre-web
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - ./config:/config
      - ./books:/books
    ports:
      - 8083:8083
    restart: unless-stopped

Save (Ctrl+O, Ctrl+X) and run:

docker-compose up -d

Calibre-Web will be available at http://192.168.x.x:8083. The default admin username is admin, password admin123 (change immediately). Upload your e-book files to the ~/calibre-web/books directory or use the web interface to import.

4. Enable Syncing with OPDS and Content Server

Calibre-Web supports OPDS (Open Publication Distribution System) out of the box—a protocol used by e-reader apps like KyBook 3 on iOS or Lithium on Android. In Calibre-Web, go to Admin → Edit Basic Configuration and enable "Enable OPDS" and "Enable anonymous browsing" (if desired). The OPDS feed URL is http://192.168.x.x:8083/opds.

For more advanced syncing, also install the Calibre Content Server by running (inside the container) or using a separate container. Since we already have OPDS, most apps will sync reading positions and library changes automatically.

Self-Host Your eBook Collection for Under $30 – A Complete Syncing Guide
Source: www.makeuseof.com

5. Make It Accessible Anywhere (Securely)

To access your library from outside your home network, you need a secure tunnel. Use Cloudflare Tunnel (free) or a reverse proxy like Nginx with Let's Encrypt. For simplicity, set up a DuckDNS domain and install a Cloudflare Tunnel on your Pi:

curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb -o cloudflared.deb
sudo dpkg -i cloudflared.deb
cloudflared tunnel login
cloudflared tunnel create myebooklib
cloudflared tunnel route dns myebooklib myebooklib.duckdns.org

Create a config file (~/.cloudflared/config.yml) that points to your Calibre-Web port (8083). Run the tunnel as a service. Now your library is accessible at https://myebooklib.duckdns.org.

6. Sync with Mobile Apps

On your phone or tablet, install an OPDS-compatible reader app. Add the OPDS feed URL (the same as above). The app will show your library, allow downloads for offline reading, and sync reading progress back to Calibre-Web if the app supports it. For iOS, KyBook 3 or Chunky work well; for Android, Lithium or Moon+ Reader.

Common Mistakes

  • Forgetting to change the default password. Anyone on your local network can access your library. Change it immediately in Admin → Users.
  • Not backing up your library. The SD card can fail. Periodically copy the books folder to an external drive or cloud storage (like Nextcloud).
  • Using port 8083 directly without a tunnel. This opens your network to attacks. Always use a secure tunnel or VPN.
  • Assuming DRM-protected files will work. Calibre-Web cannot read Kindle or Apple Books formats with DRM. Remove DRM first (if legally permissible) using tools like Calibre + DeDRM plugin.
  • Ignoring metadata. Spend 10 minutes organizing author names and cover images using Calibre's built-in metadata downloader—it makes browsing far more pleasant.

Summary

With a $30 Raspberry Pi zero 2 W, a few hours of setup, and free software like Docker and Calibre-Web, you can build a self-hosted eBook library that syncs across all your devices. The OPDS protocol handles syncing, and a Cloudflare tunnel provides secure remote access. You'll never worry about a publisher deleting your purchases again.