Getting Started

First Start and Permissions

Initialize the administrator account with the one-time setup code, create member accounts, and manage per-user permissions.

On a brand-new installation, Bunko locks all tenant APIs (SETUP_REQUIRED) until an administrator account is created using a one-time setup code.

Creating the administrator account

  1. Start Bunko and read the generated XXXX-XXXX-XXXX setup code from container logs or /data/setup.code:
docker compose logs bunko
  1. Open http://<your-host>:2512.
  2. Enter the one-time setup code, choose an administrator username, and set a strong password.
  3. Bunko hashes the password with Node crypto.scrypt (N=32768, r=8, p=1, random 16-byte salt), creates account 1 in an immediate SQLite transaction, deletes the setup code, and issues a seven-day HttpOnly SameSite=Strict session cookie (bunko_session).

If you deploy non-interactively, you may supply BUNKO_SETUP_CODE in your container environment before first boot so you do not need to read /data/setup.code. Remove it once setup completes.

Initial configuration checklist

Once signed in as the administrator:

  1. Open Settings › Connections to connect your reading or video servers (Suwayomi, Kavita, Jellyfin/Emby, Stash, Sonarr/Radarr/Prowlarr/qBittorrent, or TraDoc).
  2. Open Settings › Kavita libraries to select your /library folder and assign destination libraries for each reading format.
  3. Open Settings › Catalogs to configure optional shared catalog API keys such as TMDB_API_KEY (required for the series and movies kinds), Google Books, Metron, Hardcover, or Rakuten Books.
  4. Pick your interface language (en, fr, es, de, it) and theme (Ciné or Bunko).

Creating member accounts

Administrators manage user accounts under Settings › Users (/api/users). Every account has a role (admin or member) and a dedicated set of five fine-grained permissions:

PermissionScopeDefault for new members
downloadsEnqueue chapter downloads, retry batches, enable automatic downloads, and trigger *arr release grabs.Enabled
translateCreate and manage TraDoc book translation jobs.Enabled
servicesEdit upstream server URLs, API keys, library targets, and /library media root selection.Disabled
extensionsInstall, update, or remove Suwayomi extensions and repositories, or add video extensions.Disabled
adultAllow the account to enable 18+ content visibility in its profile.Disabled

Administrators always hold all five permissions. New member accounts start with least-privilege defaults: downloads and translate are enabled, while services, extensions, and adult remain disabled until an administrator explicitly grants them.

Immediate enforcement

Restrictions are stored in /data/accounts.db and enforced on every route (403 PERMISSION_DENIED). Revoking the adult permission immediately turns 18+ visibility off for that member account.

Passwords, sessions, and account deletion

  • Password changes (POST /api/auth/password) atomically update the scrypt hash and rotate the account's random session epoch, signing out every other browser session while keeping only the current session active.
  • Rate limiting enforces 10 attempts per minute per normalized username (plus 30 per minute per client IP when BUNKO_TRUST_PROXY=true), preventing one account's failed logins from locking out other users.
  • Deleting an account requires explicit confirmation (confirmDeleteData: true) and cannot delete the final remaining administrator. Bunko writes a permanent deletion tombstone, invalidates active sessions, aborts in-flight transfers, and deletes /data/users/<id>/ while leaving media files under /library untouched.

To plan storage isolation for multiple people on one container, continue to Multi-User Setup.