Deploy Docspell
Paperless document archive with OCR and full-text search, invite-only
Just deployed
/var/lib/postgresql/data
Just deployed
restserver
Just deployed
Deploy and Host Docspell on Railway
Docspell is an open-source, self-hosted document organizer. You upload scanned letters, invoices and other PDFs or images; it runs OCR, extracts the text, suggests correspondents, dates and tags from what it reads, and makes everything searchable. It is built for households and small teams that want a paperless archive.
About Hosting Docspell
Docspell runs as two Java services that share one PostgreSQL database. The REST server serves the web app and API. The job executor (joex) does the heavy work: OCR with Tesseract and OCRmyPDF, conversion of office files, emails and HTML to PDF, previews and full-text indexing. Both need the same database settings, and each must reach the other over the network so new uploads are processed at once. This template wires that up on Railway's private network, keeps full-text search inside PostgreSQL instead of a separate Solr server, generates every secret, and makes sign-up invite-only so strangers can't register on your public URL. Uploaded files are stored in PostgreSQL, on its volume.
Common Use Cases
- Scan and archive household paperwork (bills, contracts, tax letters) with OCR and full-text search
- Organize a small team's or freelancer's invoices and receipts by correspondent, date and tag
- Collect documents from email or scanners through the upload API and find them later by content
Dependencies for Docspell Hosting
- PostgreSQL (Railway's managed PostgreSQL, included)
- Two app services built from the template repo: the REST server (public) and the job executor joex (private)
Deployment Dependencies
- Docspell documentation: https://docspell.org/docs/
- Docspell 0.43.0 release: https://github.com/eikek/docspell/releases/tag/v0.43.0
- Template source and changelog: https://github.com/aalfath/docspell-railway-template
Implementation Details
The template deploys Docspell 0.43.0 from the official ghcr.io/docspell/restserver and ghcr.io/docspell/joex images, pinned by digest. There are no prompts: database settings are Railway references and secrets are generated.
First login:
- In Railway, open the
restserverservice, then Variables, and copyDOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD. - Open
https://YOUR-DOMAIN/app/newinvite, paste the password and create an invitation key. - Open
https://YOUR-DOMAIN/app/registerand sign up with that key. Use the same name for collective and user.
To change other settings, add environment variables as described in Docspell's configuration docs, for example DOCSPELL_SERVER_BACKEND_SIGNUP_MODE=closed once your accounts exist. Updates to this template arrive as Railway update notices; read the changelog and back up the Postgres volume first, because Docspell migrates its database on start and can't be downgraded.
Why Deploy Docspell on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Docspell on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
