---
title: "Deploy Paperless-ngx"
description: "Secure Paperless-ngx with native PostgreSQL, Redis, OCR, and recovery."
category: "Other"
url: https://railway.com/deploy/paperless-ngx-4
---

# Deploy Paperless-ngx

Secure Paperless-ngx with native PostgreSQL, Redis, OCR, and recovery.

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

- **Creator:** l4time's Projects
- **Category:** Other
- **Total deploys:** 1

## Template content

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

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

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### paperless-ngx

- **Source:** https://github.com/l4time/railway-paperless-ngx-template
- **Health check:** /accounts/login/
- **Public domain:** Yes

## Documentation

# Deploy and Host Paperless-ngx with Railway

Run Paperless-ngx `v3.0.5` with Railway-native PostgreSQL, authenticated Redis,
a persistent `/paperless` volume, generated administrator credentials, and an
immutable upstream image pin.

## About Hosting Paperless-ngx

Paperless-ngx indexes scanned and digital documents for authenticated search,
classification, metadata, workflows, and export. This template wires the three
required services without exposing the database or Redis publicly. It prepares
the app volume securely and runs the steady-state application as UID/GID 1000.

## Common Use Cases

- Maintain a private searchable household or team document archive.
- Ingest scans through upload, API, or the persistent consumption directory.
- Apply tags, correspondents, document types, custom fields, and workflows.
- Export content as part of a coordinated off-platform recovery process.

## Dependencies for Paperless-ngx Hosting

- One public Paperless-ngx app on fixed port `8000`.
- One private Railway-native PostgreSQL service.
- One private Railway-native authenticated Redis service.
- One volume mounted at `/paperless`.
- Generated `PAPERLESS_SECRET_KEY` and `PAPERLESS_ADMIN_PASSWORD`.
- Login health path, one replica, Serverless off, and on-failure restart.

## Why Deploy Paperless-ngx with Railway?

The package supplies immutable source provenance, generated secrets,
native-service references, strict pre-bind URL validation, root-owned-volume
recovery to UID/GID 1000, persistent storage, health configuration, and tested
backup/update guidance. It removes manual database and Redis URL assembly while
keeping credentials out of source.

### Persistence and recovery

Back up PostgreSQL and the stopped complete `/paperless` tree together after
quiescing ingestion and draining tasks. Restore both matching artifacts into an
isolated environment with a clean Redis dependency and the same stable secret
key. Verify login, status, OCR/search, metadata, documents, exports, and restart
before relying on the recovery.

### Update and rollback

Update immutable version, source, image, and manifest pins together only after
testing a coordinated backup. The proven rollback method restores matching
pre-update PostgreSQL and volume artifacts before starting v3.0.4; in-place
downgrade of migrated v3.0.5 state is not claimed.

### Support

Template support covers package pins, Railway topology and references,
validation, health, volume ownership, and documentation. Application features
belong upstream; Railway account, billing, domains, databases, Redis, and
volume platform incidents belong to Railway. Never post passwords, secret
keys, database or Redis URLs, tokens, cookies, documents, OCR text, exports,
backups, private domains, or unredacted logs.


## 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) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

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