Deploy Docspell

Paperless document archive with OCR and full-text search, invite-only

Deploy Docspell

/var/lib/postgresql/data

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

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:

  1. In Railway, open the restserver service, then Variables, and copy DOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD.
  2. Open https://YOUR-DOMAIN/app/newinvite, paste the password and create an invitation key.
  3. Open https://YOUR-DOMAIN/app/register and 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

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0