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
-----------
```yaml
services:
db:
ports:
- 127.0.0.1:15432:5432/tcp
app:
volumes: !override
- .:/var/www/html/books
- ${BOOKS_DIR}:/books:ro
web-nginx:
volumes: !override
- .:/var/www/html/books:ro
```
License
-------
GNU GPL version 3. See COPYING for details.
Copyright (c) 2017 Andrew Dolgov (unless explicitly stated otherwise).
