Longbox¶
A self-hosted web catalogue and reader for digital comic collections. Point it at the comics on your server, or upload them from a laptop, and it builds a browsable library with covers, metadata and full-text search.
Multi-user: every account gets its own library, entirely independent of anyone else's. Sign in with a username and password, or with Google, Apple or Facebook.
Built to run on a small Linux box on a home network: FastAPI + SQLite, no external services required, comfortable in about 150 MB of RAM.
What it does¶
- Independent libraries. Each account sees only its own comics, covers, reading history, import jobs and metadata. Nothing is shared between people except the metadata response cache, which holds public upstream data.
- Imports CBZ, CBR, CB7, CBT, PDF and EPUB, either from paths on the server or through the browser.
- Extracts covers from inside each file and builds thumbnails.
- Reads metadata from embedded
ComicInfo.xml(what ComicRack, Mylar and Kavita write), from EPUB/PDF document properties, and from the filename. - Looks up Comic Vine or Metron for real metadata and cover art — one comic at a time with a candidate picker, or in bulk with a confidence threshold.
- Browses and searches by series, publisher, format, year and reading status, with SQLite full-text search over titles, characters and summaries.
- Tracks reading status, favourites and hand-edited metadata, none of which a later rescan will overwrite.
- Reads them, with keyboard navigation, fit modes, two-page spreads, right-to-left for manga, and progress that picks up where you left off.
- Writes metadata back into the files, so the library is portable to any other comic reader without an export step.
Where to start¶
-
Setting one up for the first time
Installing gets a server running in a few minutes. The deployment runbook then takes it the rest of the way — HTTPS, a real name on the network, mail and external sign-in.
-
Moving an existing one
Migrating to a new machine is the whole procedure, including the two settings stores that are easy to miss and the absolute comic paths that have to be rewritten on arrival.
-
Something is wrong
Troubleshooting lists the failures this project has actually hit, by symptom, with the cause underneath each one.
-
Understanding how it works
Architecture covers the scaling analysis and the seams built into it. Project layout maps the modules.
A note on the examples¶
Every host name, address and account name in these pages is made up.
comics.example.com stands in for whatever name you give the server, and
192.168.1.10 for its address on your network — both need replacing with your
own before anything here will work.