Deploy index-library-template
Railway template for index_library: of books and objects, phone scan + lend
Just deployed
/data
Deploy and Host Index Library on Railway
Index Library is a single-owner library of books and objects: searchable private notes, collections, share tiers and private links for visitors, lending with due dates, and a phone scanner that files a book from its barcode or cover. This template runs the hosted container (ghcr.io/cheewee2000/index-library) with a volume at /data for the database, photos and history.
About Hosting Index Library
One service, one volume. The container runs the Flask app under gunicorn on port 8080 with SQLite on the volume; nothing else is needed. The owner signs in with LIBRARY_PASSWORD, which is generated for each deployment and can be changed under the service's variables. LIBRARY_TIER starts at shared (public tiers and private links on, AI off); switching to full on the Settings page and pasting an Anthropic API key there turns on cover reading and the librarian. Settings → History keeps every change in a Mercurial repository on the volume, and Download the repository saves it as one file for another computer. Updates are deliberate: the app shows a line when a newer version exists and never installs anything by itself; redeploy the service to move to the newest image.
Why Deploy Index Library on Railway?
The scanner is a phone in a browser, so the library has to be at an address the phone can reach from anywhere, over HTTPS; Railway gives it that address, the certificate, and a volume that survives redeploys. One owner per install, no accounts to run, visitors see only what the owner shares.
Common Use Cases
- A personal library scanned shelf by shelf from a phone, with private notes and where each book lives.
- A shared shelf for a studio or a house: what is here, what can be borrowed, who has it.
- A collection of objects, records and zines with photos, captions and lending history.
Dependencies for Index Library Hosting
- The container image
ghcr.io/cheewee2000/index-library:latest(public). - A volume mounted at
/data. - Optional: an Anthropic API key for cover reading and the librarian, a Google Books API key for cover lookups.
Deployment Dependencies
- Index Library on GitHub (private while the name is being settled; ask for access).
- Anthropic API keys for the AI features.
Implementation Details
The image sets LIBRARY_DATA=/data, LIBRARY_SECURE_COOKIE=1 and PORT=8080; the template carries the same values so they can be changed if needed. Health check: GET /api/me. Version: GET /api/version.
https://library-production-13e3.up.railway.app/static/icons/icon-512.png
Template Content
PORT
The port the app listens on. Keep 8080; the domain points at it.
LIBRARY_DATA
Where the database, photos and history live. Keep /data, the volume's mount path.
LIBRARY_TIER
shared: sharing on, AI off. full: AI on too (needs an API key). local: nothing for visitors.
LIBRARY_SECURE_COOKIE
1 marks the session cookie HTTPS-only. Keep 1 behind Railway's domain.
