The Epube
=========
Self-hosted web EPUB reader backed by a Calibre library.
Features
--------
- Reads metadata and books from a Calibre library (metadata.db + books directory)
- Full EPUB reader with pagination, table of contents, and search within books
- Offline/PWA support via service worker and IndexedDB caching
- Reading progress tracking per user, synced between sessions
- Favorites system
- Multi-user authentication (local or OpenID Connect)
- Downloads in any format Calibre holds (EPUB, MOBI, etc.)
- Series and author browsing with search
- Night mode, customizable font family/size/line-height
- Word definition lookup via optional dictionary service (dictd)
Requirements
------------
- PHP 7.1+
- SQLite or PostgreSQL
- A Calibre library directory
- HTTPS recommended (required for service worker registration)
Installation
------------
1. Clone this repository.
2. Run `npm install & npm run build`.
3. Copy `.env-dist` to `.env` and configure paths and credentials.
4. Ensure the `db/` directory is writable (for SQLite) or set `EPUBE_DB_TYPE=pgsql` for PostgreSQL.
5. Point your web server at the repository root.
Docker
------
Development and production deployment via docker-compose:
docker compose up
The default setup includes PostgreSQL, the application, and an Nginx frontend.
See `.env-dist` for configuration options.
Development
-----------
Run the stack with the dev overlay, which bind-mounts the source tree into the
`app` and `web-nginx` containers and exposes PostgreSQL on `127.0.0.1:15432`:
npm run dev # docker compose -f docker-compose.yml -f docker-compose.dev.yml
npm run dev -- up
npm run dev -- up -d app
npm run dev -- logs -f app
The overlay is deliberately plain Compose (no `!override` YAML tag), so it works
with both Docker Compose and `podman-compose`, which only concatenates the volume
lists of the two files and keeps the last entry per mount target.
Docker Compose v2.24+ users who prefer auto-loading may keep a local
`docker-compose.override.yml` instead, where the `!override` tag replaces volume
lists outright:
```yaml
services:
app:
volumes: !override
- .:/var/www/html/books
- ${BOOKS_DIR}:/books:ro
```
Note that `podman-compose` cannot parse that tag and loads
`docker-compose.override.yml` automatically, so remove or rename the file if you
use `podman-compose` without explicit `-f` arguments.
License
-------
GNU GPL version 3. See COPYING for details.
Copyright (c) 2017 Andrew Dolgov (unless explicitly stated otherwise).
