---
title: "Deploy Docspell"
description: "Paperless document archive with OCR and full-text search, invite-only"
category: "Other"
url: https://railway.com/deploy/docspell-1
---

# Deploy Docspell

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

**[Deploy Docspell on Railway](https://railway.com/template/docspell-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/docspell-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### joex https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/docspell.png

- **Source:** https://github.com/aalfath/docspell-railway-template

### restserver https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/docspell.png

- **Source:** https://github.com/aalfath/docspell-railway-template
- **Health check:** /api/info/version
- **Public domain:** Yes

## Documentation

# 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:

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.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/docspell-1
