Potential Calibre Web Bug
Posted by PinkyBroham
TomAI recommended a bug post for this. Here is the run down of what happened as well as what has been tried: Setup: Enabling ebooks module, chose Calibre-Web backend, fresh install (no existing library). Problem: Calibre-Web's initial setup screen asks for "location of calibre database" — every path entered gets rejected with "New db location is invalid, please enter valid path," even though the path is confirmed valid from multiple angles. What we tried: Confirmed BOOKSPATH in .env points at the books folder, mounted to /books in the container. Fixed ownership: sudo chown -R 1000:1000 /volume1/sparkbox-data/books on host. Verified in-container: docker exec sb-calibre-web ls -la /books — folder owned by abc/1000, writable, empty. Entered /books in the setup field — rejected as invalid path. Manually seeded a placeholder DB: touch /books/metadata.db + chown abc:abc on it. Re-entered /books — browse dialog confirms metadata.db is visible in the folder — still rejected with same error. Checked container logs (docker logs sb-calibre-web) — only shows normal container boot output (xdg-desktop-menu warnings, harmless), nothing logged at the moment of form submission. Haven't yet tried /books/metadata.db as the literal file path in the field (folder-vs-file-path ambiguity in the UI's field label). Ask: Looks like a validation bug in Calibre-Web's fresh-install "set DB location" flow inside the SparkBox ebooks module — path exists, is writable, contains a valid-looking db file, and it's still rejected. Would help to know if this hits others or if there's a known workaround.
5 replies
tomspark wrote:
Thanks for testing that — and you've found a real gap on our side, so I'll own this one. Calibre-Web can't create a brand-new library by itself: it needs a database file that only the full Calibre program can make. The metadata.db you created with touch looks right from outside but is empty inside, so the check rejects it. The good news is the container has full Calibre built in, so one command makes a proper one: docker exec sb-calibre-web bash -c "rm -f /books/metadata.db && calibredb add --empty --with-library /books && chown -R abc:abc /books" Then go back to the setup screen and enter /books — it should accept it now (you'll see one blank placeholder book you can delete). We'll patch the module so fresh installs don't hit this at all. Great writeup by the way, made it easy to pin down.
tomspark wrote:
Great troubleshooting—you've ruled out most causes. One quick thing to try: the UI label says 'location of calibre database,' which could mean the folder or the db file itself. Since you have /books/metadata.db now, try entering that literal path instead of /books. If that fails too, this likely is a validation bug in Calibre-Web's fresh-setup flow. Either way, we've got it flagged for investigation.
PinkyBroham wrote:
I tried that as well and it sent the same error message
tomspark wrote:
Thanks for the quick follow-up—you've done all the right steps. The path validation in Calibre-Web's fresh-setup flow does look like it might have an edge case here. We're digging into the container logs and Calibre-Web's setup handler. This is flagged for investigation; we'll update you when we have more.
PinkyBroham wrote:
Just ran that command and it worked great. Thank ya much!