---
title: "Deploy paperless-ngx"
description: "Document management system with automated tagging, search and AI"
category: "Storage"
url: https://railway.com/deploy/paperless-ngx-6
---

# Deploy paperless-ngx

Document management system with automated tagging, search and AI

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

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/paperless-ngx-6/manifest.json

- **Creator:** Giovanni Gardin
- **Category:** Storage

## Template content

### Valkey https://valkey.io/img/valkey-logo-og.png

- **Image:** valkey/valkey:9

### Gotenberg https://gotenberg.dev/assets/ideal-img/logo_hero.79666ec.495.png

- **Image:** gotenberg/gotenberg:8
- **Health check:** /health

### Tika https://cdn.jsdelivr.net/gh/selfhst/icons/webp/apache-tika.webp

- **Image:** apache/tika

### paperless-ngx https://cdn.jsdelivr.net/gh/selfhst/icons/png/paperless-ngx.png

- **Image:** paperlessngx/paperless-ngx:3.3
- **Public domain:** Yes

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

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

## Documentation

# Deploy and Host paperless-ngx on Railway

paperless-ngx is an open-source document management system that turns your physical and digital paperwork into a searchable online archive. It scans, OCRs, and indexes documents, then automatically tags and sorts them by correspondent, type, and date, so you can find any receipt, contract, or letter in seconds.

## About Hosting paperless-ngx

Hosting paperless-ngx involves running several cooperating services: the Django web application and its background workers, a PostgreSQL database for metadata, Redis for the task queue, and optionally Apache Tika and Gotenberg for parsing Office files and emails. Documents, thumbnails, and the search index must live on persistent storage so nothing is lost between deploys. You also need to set a secret key, configure the public URL and allowed hosts, and wire the services together over a private network. This template provisions and connects all of these for you, with sensible defaults and persistent volumes already in place.

## Common Use Cases

- Going paperless at home: scan bills, tax documents, warranties, and medical records into a private, searchable archive
- Small business record-keeping: centralize invoices, receipts, and contracts with automatic tagging and full-text search
- Email archiving: pull attachments and messages from IMAP mailboxes and file them automatically using mail rules
- Replacing filing cabinets for freelancers, landlords, and households who need quick access to documents on any device

## Dependencies for paperless-ngx Hosting

- PostgreSQL: stores document metadata, tags, users, and settings
- Redis: message broker for background tasks such as OCR and document consumption
- Apache Tika: extracts text and metadata from Office documents and emails
- Gotenberg: converts Office documents and emails to PDF for archiving

### Implementation Details

**Creating your admin account.** On first deploy, add these variables to the paperless-ngx service to create a superuser automatically, then remove them once you have logged in:

    PAPERLESS_ADMIN_USER=admin
    PAPERLESS_ADMIN_PASSWORD=choose-a-strong-password

**Custom domain.** If you attach a custom domain, update `PAPERLESS_URL` (e.g. `https://docs.example.com`) and add the hostname to `PAPERLESS_ALLOWED_HOSTS`, otherwise logins will fail CSRF checks.

**Adding documents.** Railway has no shared network folder, so the consumption directory is not directly reachable from your computer. Upload documents through the web interface (drag and drop), the REST API, a mobile app such as Paperless Mobile, or by configuring mail accounts in the admin panel.

**Storage.** Documents and the search index are stored on a Railway volume mounted at the paths set in `PAPERLESS_MEDIA_ROOT` and `PAPERLESS_DATA_DIR`. Monitor volume usage as your archive grows, and use the built-in document exporter for regular off-platform backups.

**OCR language.** OCR defaults to English. To recognize other languages, set `PAPERLESS_OCR_LANGUAGE` (e.g. `eng+deu+ita`).

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

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.

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