Configuration
Tome is configured entirely through environment variables. None are strictly required — even TOME_SECRET_KEY is auto-generated to /data/secret.key on first boot if you don't set one. Everything else has a sensible default.
Quick reference
| Variable | Default | Purpose |
|---|---|---|
PUID / PGID | 1000 / 1000 | Host UID/GID the container runs as — set to the owner of your mounts (see File ownership) |
TOME_SECRET_KEY | auto-generated | JWT signing key |
TOME_DATA_DIR | /data | SQLite DB, covers, secret key |
TOME_LIBRARY_DIR | /books | Ebook library root |
TOME_INCOMING_DIR | /bindery | Inbox for new files |
TOME_PORT | 8080 | HTTP listen port |
TOME_PUBLIC_URL | — | Canonical public origin (e.g. https://tome.example.org) — pin it behind a reverse proxy so the KOReader plugin bakes the correct https:// URL |
TOME_HARDCOVER_TOKEN | — | Hardcover API token (optional) |
TOME_HARDCOVER_SYNC_ENABLED | true | Kill switch for per-user Hardcover sync (the token above is metadata-only) |
TOME_GOOGLE_BOOKS_KEY | — | Google Books API key — your own quota instead of the shared anonymous pool (fixes 403/429 on busy fetch days; recommended for non-English catalogues) |
TOME_RELEASE_DETECTION | false | Follow series + new-volume alerts (needs the Hardcover token) — see Wishlist |
TOME_RELEASE_CHECK_INTERVAL | 86400 | Seconds between release checks |
TOME_AUTO_IMPORT | false | Auto-ingest from Bindery |
TOME_AUTO_IMPORT_INTERVAL | 300 | Seconds between scans |
TOME_YEARBOOK_ALWAYS | false | Keep the Yearbook open all year instead of 1 December to 31 January. The Home card and bell notice still come only in their season |
TOME_SCAN_WORKERS | 1 | Parallel scan worker processes (1 = serial) |
TOME_LOG_LEVEL | INFO | Level of Tome's own log lines: DEBUG, INFO, WARNING or ERROR |
TOME_JWT_ALGORITHM | HS256 | JWT algorithm |
TOME_JWT_EXPIRE_MINUTES | 60 | Lifetime of admin impersonation tokens (1 hour); sign-ins do not expire |
TOME_WEB_SESSION_IDLE_DAYS | 90 | Sign out a browser not used for this many days (0 = never; the app is not affected) |
TOME_SMTP_HOST | — | SMTP server (enables Send to Device) |
TOME_SMTP_PORT | 587 | SMTP port |
TOME_SMTP_USER | — | SMTP username |
TOME_SMTP_PASSWORD | — | SMTP password / app password |
TOME_SMTP_FROM | TOME_SMTP_USER | "From" address |
TOME_SMTP_USE_TLS | true | STARTTLS (port 587) |
TOME_SMTP_USE_SSL | false | Implicit SSL (port 465) |
TOME_SMTP_DAILY_LIMIT | 50 | Per-user sends/day (0 = unlimited) |
TOME_UPDATE_CHECK | true | Admin "update available" indicator in Settings → About. Once a day Tome asks upgrades.bndct.dev for the latest release, sending only the version number. Set false for air-gapped installs; the post-upgrade "What's new" panel is local and unaffected |
TOME_UPDATE_CHECK_URL | https://upgrades.bndct.dev/latest.json | Where the update check asks. Forks and test instances point this elsewhere |
TOME_OUTBOUND_NOTIFY | true | Kill switch for per-user outbound notification channels (ntfy / Gotify / webhook). Nothing is ever sent unless a user configures a channel |
TOME_WEBHOOK_ALLOWED_HOSTS | — | Comma-separated host names or IPs (e.g. ntfy.lan,192.168.1.20) that members' notification channels may reach. Admins' channels may point anywhere; everyone else's must resolve to public internet addresses unless the host is listed here |
TOME_MAX_UPLOAD_MB | 4096 | Largest upload the server accepts, in MB; a bigger book upload is refused with 413 before it is written to disk. 0 = no limit. Backup restores are not limited |
TOME_CONTENT_SECURITY_POLICY | on | Send a Content-Security-Policy with the web interface, which stops script inside a book from running in the reader. off drops the header (only if a proxy or setup of yours breaks with it) |
TOME_ALLOW_INFILE_BAKE | true | Hard off-switch for the admin "Bake to File" action that rewrites library files with Tome's metadata |
TOME_WISHLIST_ENABLED | true | Kill switch for the Wishlist |
TOME_SEND_TO_KOREADER | false | Enable the Send to KOReader inbox (beta) — queue books to the device, no email |
Secrets can also be read from a file (Docker/Kubernetes secrets): TOME_SECRET_KEY, TOME_HARDCOVER_TOKEN, TOME_GOOGLE_BOOKS_KEY, TOME_SMTP_USER, TOME_SMTP_PASSWORD and TOME_OIDC_CLIENT_SECRET each accept a _FILE variant, e.g. TOME_SECRET_KEY_FILE=/run/secrets/tome_secret_key. Set one or the other, not both.
The secret key
TOME_SECRET_KEY signs every JWT and every API token. If unset, Tome generates a cryptographically random 64-byte key on first boot and writes it to <data_dir>/secret.key with mode 0600. Subsequent boots reuse it.
File ownership (PUID / PGID)
Inside the container Tome runs as an unprivileged user. PUID and PGID set that user's numeric UID and GID (the same convention as LinuxServer.io images), so the bind-mounted /data, /books and /bindery are read and written as the user that owns them on the host. The default is 1000:1000, which is what the image always ran as, so an existing install needs no change.
Set them when the logs show PermissionError on /books or /bindery. On Synology, QNAP and TrueNAS the share ACL is granted to your docker user, not to uid 1000; run id <user> on the host and pass those ids. On Unraid shares are usually 99:100.
On start the container fixes ownership of /data to match, so switching PUID on an existing install works without a manual chown. It never touches /books or /bindery — those are your files (and may be read-only mounts). If Tome already created files there under the old uid, chown those yourself. Compose files that pass user: "uid:gid" instead still work; in that mode the container cannot fix /data ownership for you.
Paths
The three path variables tell Tome where to keep state, where your library lives, and where to pick up incoming files.
TOME_DATA_DIR— SQLite database, cover cache, baked downloads, secret key. Defaults to/datain Docker. Must be persistent across restarts.TOME_LIBRARY_DIR— your ebook collection. Read-write so Tome can organise files (move intoSeries/orAuthor/folders). Defaults to/books.TOME_INCOMING_DIR— the Bindery drop folder. Files appear here, then get reviewed (or auto-imported) into the library. Defaults to/bindery.
Hardcover metadata
TOME_HARDCOVER_TOKEN turns on the Hardcover lookup path during metadata fetch. Hardcover has the best coverage for modern fiction and manga. Grab a free token from hardcover.app/account/api and pass it in.
With no token set, Tome still fetches metadata via Google Books and Open Library — Hardcover just gets skipped.
Library scanning
TOME_SCAN_WORKERS— worker processes for the CPU-bound part of a library scan (metadata extraction + hashing). Default1(serial, in-process) — the lowest-RAM option, and already fast, so it suits the modest hardware most self-hosters run on. Set it higher (e.g. your CPU core count) to parallelise large imports on machines with RAM to spare — each worker adds roughly 60–80 MB. Database writes always stay single-process (SQLite is single-writer), so this only speeds up extraction, not the writes.
Auto-import (Bindery)
TOME_AUTO_IMPORT— set totrueto ingest files dropped in/binderyon a schedule. Default isfalse(manual review queue).TOME_AUTO_IMPORT_INTERVAL— seconds between scans. Default300(5 min).
Even with auto-import on, books land marked is_reviewed=false and surface in the "Unreviewed" queue so an admin can sanity-check the detected metadata. See Bindery.
SMTP (Send to Device)
The TOME_SMTP_* variables enable Send to Device — emailing books to e-readers. The feature stays hidden until TOME_SMTP_HOST is set together with either TOME_SMTP_USER and TOME_SMTP_PASSWORD, or TOME_SMTP_FROM for a server that needs no authentication. Credentials live only in the environment, never the database. See the Send to Device page for provider-specific examples (Gmail, Fastmail) and the Kindle approved-sender step.
Sign-in lifetime
Browsers and the Tome app stay signed in until they sign out. Each sign-in is listed under Settings > Connected devices, where it can be signed out at any time; changing a password signs out every other sign-in of that user. A browser that is not used for TOME_WEB_SESSION_IDLE_DAYS days (default 90, 0 = never) is signed out on its own; the Tome app is not affected. TOME_JWT_EXPIRE_MINUTES now only sets how long an admin's "view as user" (impersonation) token lasts. Default is one week. TOME_JWT_ALGORITHM is the JWS algorithm (default HS256); leave it alone unless you have a very specific reason.