Site Tools


Hotfix release available: 2026-07-14a "Mort". upgrade now! [57.1] (what's this?)
New release available: 2026-07-14 "Mort". upgrade now! [57] (what's this?)
hosting:docker:bookwyrm

BookWyrm

BookWyrm is a federated social reading platform built on ActivityPub. It runs as a Django/Gunicorn application and requires a web server in front of it to serve static files correctly.

Why a web server is required

Gunicorn does not serve static files. Without nginx in front of it, requests for CSS, JavaScript, and images return an HTML error page with the wrong MIME type, breaking the entire UI. Browsers enforce X-Content-Type-Options: nosniff and block the resources entirely.

nginx must sit between your reverse proxy and Gunicorn and handle /static/ and /images/ directly from the Docker volumes.

Two deployment approaches

The right setup depends on whether you are using the official BookWyrm docker-compose or integrating BookWyrm into your own existing stack.

First-run setup

On first start, BookWyrm runs database migrations and collects static assets automatically. After the web (or bookwyrm-web) container is healthy, run:

```bash docker compose exec web python manage.py admin_code ```

This outputs a one-time code. Visit https://books.example.com/setup and enter it to create your admin account and configure the instance.

Celery beat note

The celery-beat container imports all of BookWyrm's Django settings, including EMAIL_HOST. This variable is required even though the beat scheduler never sends email. Omitting it causes the container to crash on startup with:

``` ValueError: Couldn't import 'celerywyrm': Environment variable “EMAIL_HOST” not set ```

Pass the full email environment block to celery-beat, the same as for the web container.

References

See Also

hosting/docker/bookwyrm.txt · Last modified: by 127.0.0.1