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
503from/api/health— SQLite failed to open or write/data. Verify/datais mounted writable by UID1000, 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 account1. Once account1exists,/data/setup.codeis 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
1000inside 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
/librarypaths; 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,
localhostand127.0.0.1refer 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"]indocker-compose.ymland address host-published services ashttp://host.docker.internal:<port>.
- Put Bunko and the target service on the same Docker network and use the container service name (for example
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_CHANGEDon older download batches — ChangingsuwayomiUrlinvalidates 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_CONFLICTduring chapter import — A different file already exists at the destination path without a matching Bunko fingerprint. Inspect the folder in/libraryrather than overwriting unknown files.
Kavita scans and missing chapters
KAVITA_NOT_ADMINon 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
/librarymount. 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:porttoBUNKO_VIDEO_ALLOWED_HOSTSindocker-compose.ymland 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
seriesandmoviesmedia kinds require a shared TMDB API key. Sign in as an administrator, open Settings › Catalogs, paste your TMDB key (or seedTMDB_API_KEYon 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=trueandBUNKO_SECURE_COOKIES=true, and verify your proxy forwardsX-Forwarded-Proto: httpsand preserves theHostheader. - 403 origin mismatch on save/POST — Ensure your reverse proxy passes the exact external
Hostheader (proxy_set_header Host $http_host;in Nginx). - Live search or download progress stalls — Disable proxy response buffering (
proxy_buffering off;in Nginx orflush_interval -1in 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.
Backup, Update, and Rollback
Back up /data and /library safely, pin immutable Docker tags or digests, run zero-surprise upgrades, and roll back cleanly when needed.
API and Architecture
Understand Bunko's Next.js 16 and SQLite WAL/FTS5 architecture, central domain registries, Bearer token automation, and core HTTP/SSE endpoints.