feature: calibre content server - #1530
Open
benjitobz wants to merge 3 commits into
Open
Conversation
Start calibre-server as a managed subprocess next to the web UI, off by default. Access is either basic-auth against a generated userdb or an explicit anonymous-writes mode; the admin page gains the toggle, port, and credential fields, with set/clear handling for the stored password.
…d through the running server Expose the listen address and trusted IPs as settings, and point CWA's own calibredb invocations (ingest, conversion, cover enforcement, embedding) at the running content server instead of opening the library database directly, so the two never contend for it.
…ally Watch the library's metadata.db and restart the content server when another writer (ingest, an external tool) changes it, so it never serves stale records.
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Runs calibre's own content server alongside the CWA web UI, off by default. When enabled, calibre-server starts as a managed subprocess against the library, giving external tools a real calibre API endpoint (OPDS, cdb/* writes) without a second container.
Admin page gains the toggle, port, listen address, and trusted-IP settings. Access is either basic-auth (a userdb is generated from configured credentials) or an explicit anonymous-writes mode; the password field supports set/clear without ever redisplaying the stored value.
calibredb is routed through the running server. calibre-server holds the library open, and calibredb refuses to open the same library directly while it does — so the metadata embedder, conversion task, cover enforcer, and ingest processor address the library through the server, falling back to the library path when it's disabled. convert-library works on format files on disk and needs the library to itself, so the server is stopped around it and restarted afterwards.
The server reloads when the library database changes externally (ingest, another tool writing metadata.db), so it never serves stale records.
With the setting off (the default), nothing starts and behavior is unchanged.
Database Migration
NO migration file. New settings columns are added automatically by the existing settings-table column migration on startup.
How was this tested?
Docker (linux/amd64) on an Ubuntu server host.