Railway

Deploy Paperless-ngx

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

Deploy Paperless-ngx

Just deployed

Just deployed

/usr/src/paperless/export

Redis

redis:7

Just deployed

/data

Postgres

postgres:16

Just deployed

/var/lib/postgresql/data

Just deployed

Deploy and Host Paperless-ngx on Railway

Deploy on Railway

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

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.


Template Content

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
8
View Template
Redis
Self Host Latest Redis with Railway

2
View Template
NEW
EasyImg
Simple self-hostable Nuxt.js personal image hosting system.

Muhammad Bilal
0