Getting Started

Multi-User Setup

Run separate isolated Bunko instances per user inside one container with dedicated SQLite databases, non-overlapping library folders, and shared catalog keys.

One Bunko container supports multiple people without mixing libraries, reading progress, or service credentials. Each account operates as an independent tenant inside the same process.

Per-account SQLite isolation

Bunko splits global account metadata from personal user state inside /data:

  • /data/accounts.db stores usernames, roles, scrypt password hashes, session epochs, permission restrictions, login rate-limit windows, API token ownership, /library media-root reservations, and shared optional catalog keys (catalog_settings).
  • /data/users/<id>/ holds everything belonging to that account: its private SQLite database, retained covers, proxy image cache, chapter page cache, and translation backups.

Every authenticated HTTP and SSE request runs inside a strict AsyncLocalStorage tenant context. Settings, followed works, ratings, custom lists, reading/watching positions, download queues, source preferences, Kavita/Jellyfin/Stash indexes, and worker leases are completely isolated per tenant. There is no implicit default tenant and no cross-account private cache.

Non-overlapping /library mounts

When multiple users import chapters or translate books into Kavita, mount each person's Kavita library folder as a direct subdirectory under /library (with any folder names you prefer):

services:
  bunko:
    image: ghcr.io/lucas-lepajollec/bunko:latest
    ports:
      - '2512:2512'
    volumes:
      - bunko-data:/data
      - /path/to/user-one/libraries:/library/alice
      - /path/to/user-two/libraries:/library/bob

Each account selects its own Media root under Settings › Kavita libraries (Settings.mediaRoot):

  • A user may choose /library itself (recommended for single-user setups) or any direct real subdirectory such as /library/alice.
  • Reservations are enforced transactionally in account_media_roots. Two accounts cannot claim the same directory, nor can one claim an ancestor or descendant of another user's root.
  • Sibling directories (/library/alice and /library/bob) are fully independent.
  • Symlinks, files, and nested descendants outside the selected root are refused by realpath containment checks.
  • Renaming a user account never changes its reserved folder path or moves any media files on disk.

Sharing upstream servers

If two accounts should read from the same Suwayomi, Jellyfin, or Stash server, simply enter the same server URL in each account's settings. Bunko isolates each user's library and progress in its own database, while respecting that any upstream mutations on a shared server affect that shared server.

Shared administrator catalog keys

Catalog metadata providers that require API keys are configured once by an administrator under Settings › Catalogs and shared across all accounts:

  • TMDB (TMDB_API_KEY) — unlocks the series and movies kinds, TMDB metadata, and upcoming trailers.
  • Google Books — server-side API key restricted to the Google Books API.
  • Metron — comic database API token (preferred over legacy username/password auth).
  • Hardcover — book catalog API token.
  • Rakuten Books — application ID and access key.

Members automatically benefit from configured catalogs and can see their availability, while only administrators can view, save, test, or clear credentials. All secret values are encrypted at rest with AES-256-GCM using /data/settings.key and are never returned to the browser.

Background worker fairness

A single background scheduler serves all tenants with at most two active tenant ticks in parallel. Each tenant maintains its own SQLite lease, unconfigured empty accounts are skipped automatically, and one failing upstream service in one account never blocks updates or downloads for other users.