Grimmory logo

Grimmory

Self-hosted library for your ebooks, comics, and audiobooks

Alternative to: Kindle, Audible, Comixology


Grimmory is a self-hosted digital library management system that combines metadata enrichment, an integrated browser-based reader, and multi-user support in a single platform. It supports EPUB, MOBI, AZW3, PDF, CBZ, CBR and audiobook formats, with device sync via Kobo, OPDS and KOReader, smart shelves, and automatic metadata lookup from Google Books and Open Library.

Grimmory Docker Compose example

Self-host Grimmory on your own server, homelab, or VPS starting from this Docker Compose example. It runs Grimmory in Docker containers using the official grimmory/grimmory:latest, lscr.io/linuxserver/mariadb:latest images, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  grimmory:
    image: grimmory/grimmory:latest
    restart: unless-stopped
    depends_on:
      mariadb:
        condition: service_healthy
    environment:
      # UID the application runs as (owns the mounted data/library files)
      USER_ID: "1000"
      # GID the application runs as
      GROUP_ID: "1000"
      # Container timezone
      TZ: "Etc/UTC"
      # JDBC connection URL to the MariaDB service on the compose network
      DATABASE_URL: "jdbc:mariadb://mariadb:3306/grimmory"
      # Database user (must match the MariaDB MYSQL_USER below)
      DATABASE_USERNAME: "grimmory"
      # Database password (must match the MariaDB MYSQL_PASSWORD below)
      DATABASE_PASSWORD: "grimmory"
      # Expose the Swagger / OpenAPI documentation UI
      SWAGGER_ENABLED: "false"
      # Force-disable OIDC single sign-on login
      FORCE_DISABLE_OIDC: "false"
      # Extra CORS origins allowed to call the API (comma-separated). Leave empty when served same-origin behind a reverse proxy.
      ALLOWED_ORIGINS: ""
    volumes:
      - data:/app/data
      - books:/books
      - bookdrop:/bookdrop

  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    restart: unless-stopped
    environment:
      # UID the database service runs as
      PUID: "1000"
      # GID the database service runs as
      PGID: "1000"
      # Container timezone
      TZ: "Etc/UTC"
      # MariaDB root password (database is internal to the compose network only)
      MYSQL_ROOT_PASSWORD: "grimmory_root"
      # Database created automatically on first start
      MYSQL_DATABASE: "grimmory"
      # Application database user
      MYSQL_USER: "grimmory"
      # Application database password (must match DATABASE_PASSWORD above)
      MYSQL_PASSWORD: "grimmory"
    volumes:
      - db_config:/config
    healthcheck:
      test: ["CMD", "mariadb-admin", "ping", "-h", "localhost"]
      interval: 5s
      timeout: 5s
      retries: 10

volumes:
  data:
  books:
  bookdrop:
  db_config:

Prefer a managed setup? WinterFlow installs, configures, and updates Grimmory for you using this same Docker Compose configuration.