---
title: "Deploy Paperless-ngx"
description: "Searchable document archive with OCR, tagging, and automated workflows."
category: "Storage"
url: https://railway.com/deploy/paperless-ngx-2
---

# Deploy Paperless-ngx

Searchable document archive with OCR, tagging, and automated workflows.

**[Deploy Paperless-ngx on Railway](https://railway.com/template/paperless-ngx-2)**

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

## Template content

### Gotenberg

- **Image:** gotenberg/gotenberg:7.10
- **Start command:** `gotenberg --chromium-disable-javascript=true --chromium-allow-list=file:///tmp/.*`
- **Health check:** /health

### Paperless-ngx

- **Image:** ghcr.io/paperless-ngx/paperless-ngx:3.0.4
- **Health check:** /
- **Public domain:** Yes

### Redis

- **Image:** redis:7

### Postgres

- **Image:** postgres:16

### Tika

- **Image:** apache/tika:3.2.3.0
- **Health check:** /tika

## Documentation

# Deploy and Host Paperless-ngx on Railway

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/paperless-ngx-2)

**Published on Railway:** https://railway.com/deploy/paperless-ngx-2 (category: Storage).

Paperless-ngx is a community-supported document management system that turns scans, PDFs, images, email, and Office files into a searchable archive. It applies OCR, preserves originals, creates archival renditions when appropriate, and helps organize documents with tags, correspondents, document types, custom fields, and automated workflows.

## About Hosting Paperless-ngx

Hosting Paperless-ngx requires the web application, PostgreSQL for relational data, Redis for background jobs and scheduling, and persistent storage for the search index, originals, thumbnails, exports, and the consumption inbox. This template also includes Apache Tika and Gotenberg for parsing email and Office documents. Only Paperless-ngx receives a public Railway domain; all four dependencies remain private. The application image runs migrations and search-index checks during startup, creates a generated administrator on an empty database, and uses Tesseract for English OCR. Railway references supply private endpoints, while generated template values protect the administrator, Django signing key, and PostgreSQL credentials.

## Common Use Cases

- Build a searchable archive of scanned receipts, invoices, statements, and correspondence
- Add OCR, tags, correspondents, document types, and workflows to an existing document collection
- Consume PDF, image, email, and Office documents without sending them to a hosted document processor

## Dependencies for Paperless-ngx Hosting

- PostgreSQL 16 and Redis 7 on Railway private networking
- Gotenberg 7.10 and Apache Tika 3.2.3 for email and Office-document conversion
- Persistent Railway volumes for PostgreSQL, Redis, and Paperless-ngx document state

### Deployment Dependencies

- [Paperless-ngx v3.0.4 release](https://github.com/paperless-ngx/paperless-ngx/releases/tag/v3.0.4)
- [Official Docker setup guide](https://docs.paperless-ngx.com/setup/#docker)
- [Official configuration reference](https://docs.paperless-ngx.com/configuration/)
- [Official administration and backup guide](https://docs.paperless-ngx.com/administration/)
- [Umbrel Paperless-ngx deployment contract](https://github.com/getumbrel/umbrel-apps/tree/master/paperless)
- [Railway volume documentation](https://docs.railway.com/volumes)

## Implementation Details

- **Application:** `ghcr.io/paperless-ngx/paperless-ngx:3.0.4` listens on port `8000`, exposes only its Railway HTTPS domain, and uses `/` for health checks. `PAPERLESS_URL` follows that generated domain, and `healthcheck.railway.app` is explicitly allowed for Railway's internal health probe.
- **Unified application storage:** the only application volume mounts at `/usr/src/paperless/export`, the image's documented export directory. Data, media, and consumption paths are configured as `data/`, `media/`, and `consume/` beneath that mount. This preserves all four state classes without mounting over `/usr/src/paperless/src` or masking application code.
- **Private services:** Paperless-ngx references PostgreSQL, Redis, Gotenberg, and Tika through exact Railway private-domain expressions. Only the application has public networking.
- **OCR and conversion:** English is installed in the image and selected with `PAPERLESS_OCR_LANGUAGE=eng`; OCR mode and archive generation remain on the recommended `auto` setting. Tika and Gotenberg are enabled at their private ports `9998` and `3000`.
- **Startup and credentials:** the official image waits for PostgreSQL and Redis, applies Django migrations, checks the Tantivy search index, and idempotently creates the configured superuser. Railway template functions generate the username, administrator password, signing key, database role, and database password once per deployment.
- **Persistence:** PostgreSQL mounts `/var/lib/postgresql/data`, Redis mounts `/data`, and Paperless-ngx mounts `/usr/src/paperless/export`. Volume persistence protects restarts and redeploys but is not a backup strategy; schedule Railway volume/database backups and periodically use Paperless-ngx's document exporter.

> Paperless-ngx stores sensitive documents in clear text on its host. Use a trusted Railway workspace, restrict workspace access, protect the generated administrator credentials, and maintain tested backups. This community template is not affiliated with or endorsed by the Paperless-ngx project.

## Why Deploy Paperless-ngx 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 Paperless-ngx 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

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/paperless-ngx-2
