Calibre Web Automated
Calibre Web Automated is a web application for managing, browsing, and reading eBooks with automatic book ingestion and metadata fetching.
This compose file deploys Calibre Web Automated with volumes mounted using NFS. It uses
Hardcover as an optional metadata provider.
The web interface is proxied through a Traefik
reverse proxy with Cloudflare TLS certificates. A X-Scheme: https header is added to the traefik
response to allow Kobo eReader syncing to work correctly over https.
Docker Compose
# compose.yaml
---
services:
calibre-web-automated:
image: crocodilestick/calibre-web-automated:latest
container_name: calibre-web-automated
restart: unless-stopped
# ports:
# - 8083:8083
networks:
- calibre_proxy
volumes:
- type: volume
source: ebooks
target: /calibre-library
- type: volume
source: docker-nfs
target: /cwa-book-ingest
volume:
subpath: calibre-web-automated/ingest
- type: volume
source: docker-nfs
target: /config
volume:
subpath: calibre-web-automated/config
environment:
PUID: 1000
PGID: 1000
TZ: Europe/London
# Hardcover API Key required for Hardcover as a Metadata Provider, get one here: https://docs.hardcover.app/api/getting-started/
HARDCOVER_TOKEN: ${HARDCOVER_TOKEN}
# If your library is on a network share (e.g., NFS/SMB), disable WAL to reduce locking issues
NETWORK_SHARE_MODE: true
CWA_PORT_OVERRIDE: 8083
labels:
- "traefik.enable=true"
- "traefik.docker.network=calibre_proxy"
- "traefik.http.services.calibre.loadbalancer.server.port=8083"
- "traefik.http.middlewares.kobo-sync-headers.headers.customrequestheaders.X-Scheme=https"
- "traefik.http.routers.calibre.rule=Host(`calibre.${TRAEFIK_BASE_URL}`)"
- "traefik.http.routers.calibre.entrypoints=websecure"
- "traefik.http.routers.calibre.tls=true"
- "traefik.http.routers.calibre.tls.certresolver=cloudflare"
- "traefik.http.routers.calibre.middlewares=kobo-sync-headers@docker"
volumes:
ebooks:
driver: local
driver_opts:
type: nfs
o: addr=xxx.xxx.xxx.xxx,nolock,soft,rw,nfsvers=4.2
device: ":/mnt/nfs-volume"
docker-nfs:
driver: local
driver_opts:
type: nfs
o: addr=xxx.xxx.xxx.xxx,nolock,soft,rw,nfsvers=4.2
device: ":/mnt/nfs-volume"
networks:
calibre_proxy:
name: calibre_proxy
Environment Variables
# .env
HARDCOVER_TOKEN=
TRAEFIK_BASE_URL=example.com
Traefik Configuration
# compose.yaml (excerpt)
services:
traefik:
image: traefik:latest
container_name: traefik
...
networks:
- traefik
# here
- calibre_proxy
...
networks:
# here
calibre_proxy:
name: calibre_proxy