Self-hosted backend for manga, light novels, and anime.
nix develop
cd backend && go run ./cmd/serverGraphQL at http://localhost:6007/api/graphql (playground at /api/graphql/playground).
backend/— Go API server, DB, download queue, media pipelinessandbox/— JVM extension loader/executorproto/— shared gRPC contract
- Arch —
packaging/tsunagu(latest tagged release) orpackaging/tsunagu-git(latest commit). Either installs/usr/bin/tsunaguplus the sandbox jar it needs. Moku's defaultmoku/moku-gitPKGBUILDs depend on these to bundle the backend automatically. - Nix —
nix build .#tsunagu(seenix/packages.nix).
Two independent, optional gates in front of the API:
- Static API token — set
api_tokenintsunagu.toml; clients sendAuthorization: Bearer <token>or?token=. - Password + sessions — set a password (
setPasswordmutation, or from a connected client's settings). Login viaPOST /api/auth/loginreturns a 30-day HMAC-signed session token;GET /api/auth/statusreports whether a password is required. Either credential is accepted independently.
Neither is required for local/loopback use — auth only matters once the server is reachable from outside your machine.
- Mihon/Tachiyomi-format export (
.tachibk) —exportMihonBackup/importMihonBackupmutations. Manga/novel library only; anime is never included, since the format has no concept of it. - SQLite snapshots —
createDatabaseBackup/deleteDatabaseBackupmutations, plus automatic scheduled snapshots viabackup_interval_hours/backup_retention_countintsunagu.toml.
Tsunagu's sandbox reimplements the Tachiyomi/Mihon extension API so third-party manga and anime extensions run unmodified in our own JVM process, and its backup format is interchangeable with Mihon's. Its overall shape — a headless JVM extension host exposed to a non-JVM backend — follows the approach pioneered by Suwayomi.
- Mihon (Tachiyomi's successor) — manga extension API and backup format. Apache License 2.0.
- Aniyomi — anime extension API. Apache License 2.0.
- Suwayomi — architectural reference for the sandbox/backend split; no code copied. Mozilla Public License 2.0.
See NOTICE.md for exactly which files are adapted from where,
and THIRD_PARTY_LICENSES/ for full license texts.
Apache License 2.0 — see LICENSE.