Operations

Troubleshooting

Diagnose and fix common Docker, UID 1000 permission, container networking, Suwayomi, Kavita, Jellyfin, TMDB, and reverse-proxy issues.

Use this symptom-based guide to pinpoint and resolve the most common self-hosting issues in Bunko.

Container startup and health checks

Check live logs and the unauthenticated health endpoint first:

docker compose logs --tail=100 bunko
curl -i http://127.0.0.1:2512/api/health
  • HTTP 503 from /api/health — SQLite failed to open or write /data. Verify /data is mounted writable by UID 1000, has free disk space, and is not shared by a second Bunko replica.
  • Stuck on setup screen or lost setup code — Read /data/setup.code (docker compose exec bunko cat /data/setup.code) before creating account 1. Once account 1 exists, /data/setup.code is deleted automatically.

UID 1000 and /library permission errors

Symptom: Imports fail, or target library folders appear greyed out / unwritable in Settings › Kavita libraries.

  • Bunko runs as UID 1000 inside a read-only container and performs a real exclusive-create/remove write probe before accepting a target folder.
  • Fix ownership or group ACLs on the host directory mounted at /library:
sudo chown -R 1000:1000 /path/to/your/kavita/libraries
  • Also ensure you selected a valid Media root under Settings › Kavita libraries. If no media root is selected, enqueue requests return 409 TARGET_NOT_CONFIGURED.
  • In multi-user setups, two accounts cannot claim overlapping /library paths; mount separate sibling subdirectories under /library.

Container networking ("unreachable" errors)

Symptom: Suwayomi, Kavita, Jellyfin, Emby, *arr, Stash, or TraDoc shows Unreachable even though it works in your browser.

  • Inside the Bunko container, localhost and 127.0.0.1 refer to Bunko itself, not your Docker host.
  • Use one of three patterns:
    • Put Bunko and the target service on the same Docker network and use the container service name (for example http://suwayomi:4567).
    • Use your server's reachable host address from inside the container.
    • Add extra_hosts: ["host.docker.internal:host-gateway"] in docker-compose.yml and address host-published services as http://host.docker.internal:<port>.

Suwayomi and reading sources

  • Cloudflare or HTTP 403/503 errors on a source — Open Sources to inspect the exact sanitized error classification (Cloudflare, HTTP error, login required). Update the extension under Sources, and verify FlareSolverr is enabled in Suwayomi (FLARESOLVERR_ENABLED=true).
  • SOURCE_CHANGED on older download batches — Changing suwayomiUrl invalidates old numeric source IDs from the previous server so batches never run against the wrong instance. Re-link sources on affected titles and enqueue again.
  • IMPORT_CONFLICT during chapter import — A different file already exists at the destination path without a matching Bunko fingerprint. Inspect the folder in /library rather than overwriting unknown files.

Kavita scans and missing chapters

  • KAVITA_NOT_ADMIN on folder scans or cover uploads — The configured Kavita API key belongs to a standard user instead of a Kavita administrator. Generate and paste an admin API key in Settings › Connections › Kavita.
  • Imported chapters do not appear in Kavita — Verify that the target folder belongs to a real Kavita library, and check whether automatic path mapping matched your /library mount. If your Kavita container mounts the same host folder under a different internal path, set Kavita path of the mounted folder explicitly in Settings.

Jellyfin, Emby, and video streaming

  • Shows or movies missing from Bunko — Check library roles in Settings › Connections › Jellyfin / Emby and make sure the library is not set to ignore, then trigger a manual sync (POST /api/jellyfin/sync).
  • Self-hosted video extension blocked — Bunko's SSRF guard blocks LAN and Docker container addresses for video extensions by default. Add the specific host:port to BUNKO_VIDEO_ALLOWED_HOSTS in docker-compose.yml and recreate Bunko.
  • GPU enhancement does not activate — Confirm WebGL 2 is enabled in your browser and you are not in Picture-in-Picture or iOS native fullscreen. Direct streams from third-party hosts without CORS headers automatically fall back to plain playback unless routed through Bunko's relay.

TMDB (series and movies unavailable)

  • The series and movies media kinds require a shared TMDB API key. Sign in as an administrator, open Settings › Catalogs, paste your TMDB key (or seed TMDB_API_KEY on first start), and run Test.

Reverse proxy, login cookies, and SSE streams

  • Login succeeds but immediately returns to sign-in — When serving over HTTPS behind a reverse proxy, set BUNKO_TRUST_PROXY=true and BUNKO_SECURE_COOKIES=true, and verify your proxy forwards X-Forwarded-Proto: https and preserves the Host header.
  • 403 origin mismatch on save/POST — Ensure your reverse proxy passes the exact external Host header (proxy_set_header Host $http_host; in Nginx).
  • Live search or download progress stalls — Disable proxy response buffering (proxy_buffering off; in Nginx or flush_interval -1 in Caddy) so Server-Sent Events stream immediately.

Checking video playback telemetry in logs

Each video playback writes one clean summary line to Bunko's container logs (via=direct|relay, source_discovery_ms, time_to_first_frame_ms, stream_fallback_count, and stream_error_type) without printing private URLs or titles.