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
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.