Something went wrong. Try again.
A self-hosted custom sync server for kobo devices.
Something went wrong. Try again.
kobo-shelf config.example.toml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293# kobo-shelf configuration file.## Copy to `config.toml` (or point $KOBO_SHELF_CONFIG at it) and uncomment the keys# you want to set. Every key is optional.## Precedence, highest to lowest:# CLI flags > environment / .env > config.toml > built-in defaults
# Listen address (host:port, or unix:/path/to.sock). Default: 127.0.0.1:8080# host = "0.0.0.0:8080"
# Public base URL used to build download and image links. Required behind a# reverse proxy. Default: http://<host># external_url = "https://books.example.com"
# Path to a Calibre library directory (the one containing metadata.db).# Optional: when unset, the catalog is served entirely from uploaded books.# When set, the library is ingested into the catalog on startup.# calibre_library = "/srv/calibre"
# Ingest the Calibre library into the catalog on startup. Default: true.# Ignored when no library path is configured. Set false to keep an existing# catalog and re-ingest only on demand (POST /api/ingest/calibre).# calibre_ingest = true
# Path to the kobo-shelf application SQLite database. Default: kobo-shelf.db# app_db = "/var/lib/kobo-shelf/kobo-shelf.db"
# Directory where uploaded books and their covers are stored. Default: uploads# upload_dir = "/var/lib/kobo-shelf/uploads"
# Maximum accepted upload size, in bytes. Default: 209715200 (200 MiB)# max_upload_size = 209715200
# Path to the `kepubify` binary (or just "kepubify" if on PATH). When set,# uploaded EPUBs are converted to KEPUB for Kobo's native per-page progress# sync. Optional: when unset, uploads are stored and served as plain EPUB.# kepubify_path = "kepubify"
# Online metadata provider used to fill gaps in an uploaded EPUB's metadata and# cover: "none" (default), "openlibrary", or "google". Best-effort — a provider# outage never blocks an upload.# enrichment = "openlibrary"
# Maximum number of items returned per sync response. Default: 100# sync_item_limit = 100
# Store profile UserId returned by /v1/user/profile. Falls back to a UUID# derived from the auth token when unset.# store_user_id = "00000000-0000-0000-0000-000000000000"
# Fallback contact email for /v1/user/profile when the token's owning web# user has no usable username. Default: "" (empty)# store_email = "reader@example.com"
# Store account country/storefront (ISO code). Default: US# store_country = "US"
# Allow self-service account registration via /register. Default: false# allow_registration = false
# Enable the local username/password login form. Default: true. Set false (with# OIDC configured below) for SSO-only login. The server refuses to start if this# is false and OIDC is not configured.# local_login = true
# --- OIDC / SSO login (e.g. Authelia, Keycloak) ---# Setting issuer + client id + client secret enables a "Continue with SSO" button# on the login page (Authorization Code flow with PKCE). The redirect URL to# register with the IdP is <external_url>/auth/oidc/callback.## OIDC issuer URL (serves /.well-known/openid-configuration).# oidc_issuer_url = "https://auth.example.com"# oidc_client_id = "kobo-shelf"# Client secret. Prefer KOBO_SHELF_OIDC_CLIENT_SECRET_FILE (a Docker/systemd secret)# or an environment variable over putting the secret in this file.# oidc_client_secret = "..."# Space-separated scopes requested at login. Default: "openid profile email"# oidc_scopes = "openid profile email"# ID-token claim used as the kobo-shelf username when provisioning/linking an SSO# account (falls back to the email local-part, then sub). Default: preferred_username# oidc_username_claim = "preferred_username"
# Log filter (sets RUST_LOG). Default: info# log = "kobo_shelf=debug,info"
# The initial admin account is bootstrapped from the ENVIRONMENT only (not this# file), and only on a fresh database with no users:# KOBO_SHELF_ADMIN_ACCOUNT / KOBO_SHELF_ADMIN_ACCOUNT_FILE# KOBO_SHELF_ADMIN_PASSWORD / KOBO_SHELF_ADMIN_PASSWORD_FILE# The *_FILE variants read the value from a file (Docker/systemd secrets). If no# credentials are set on a fresh database, no account is created.