Self-hosting
Run the whole pipeline on your own metal.
Book Fork is MIT-licensed and deploys as a small set of services: PocketBase for data and identity, the FastAPI app for pages and API, a separate worker for translation, and local or S3-compatible storage.
What you need.
The three services
PocketBase (identity, data, job store), the API/web process, and the durable worker. Docker Compose wires them together, with an optional MinIO profile for S3.
A model to talk to
Any OpenAI-compatible endpoint — a hosted provider, or Ollama/vLLM on the same network for a fully local pipeline.
Storage
Local filesystem for a single host, or an S3-compatible bucket so the API and workers scale without shared disk.
Secrets
A signing key, an encryption key and a worker internal token — generated by the bundled script. The worker and admin also need a PocketBase service credential.
# with Docker (PocketBase included)
git clone https://github.com/Rastin-Amani/Book-Fork
cd Book-Fork
cp .env.example .env # fill the secrets
docker compose up --build
# …or bare-metal with uv + Node 24
uv sync && npm install
uv run python scripts/generate_secrets.py
npm run build
uv run fastapi dev app/main.py
uv run python -m worker.main
Reference data is seeded idempotently; PocketBase applies its migrations on serve. Node is only needed to build assets — the runtime image has none.
The operational work you are taking on.
- Keeping PocketBase, the API and the worker running
- Scheduling backups of PocketBase data, seeds and object storage together
- Scheduling the retention sweep if you want old files deleted
- Applying upgrades — schema migrations, then API, then worker
-
Watching health endpoints:
/health/readyand/health/worker -
Terminating TLS and setting
TRUSTED_HOSTSat the proxy
Built to be operated, not guessed at.
The worker registers a heartbeat, so /health/worker tells you whether translations can actually progress — not just whether the web process is alive. Jobs are resumable and carry a plan snapshot, so an upgrade mid-job never changes a job's configuration. Graceful shutdown drains in-flight work.
- /health, /health/ready, /health/worker, /metrics
- Worker heartbeats and stale-lease recovery
- Configurable retention, never a Python constant
- systemd units and production containers included
Be honest with yourself about the burden
Self-hosting means you are the operator. You will own backups, upgrades, TLS, provider keys and uptime. If you would rather not, the managed deployment is the same product without that work — and you can move between the two because the code is open.
Read the deployment guide before you start.
It covers the topology, environment, reverse proxy, backups and run order.