---
title: "Deploy paperless-ngx"
description: "Self-hosted document archive with OCR, search, and tagging in one web app"
category: "Storage"
url: https://railway.com/deploy/paperless-ngx-1
---

# Deploy paperless-ngx

Self-hosted document archive with OCR, search, and tagging in one web app

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

- **Creator:** kmaki's Projects
- **Category:** Storage
- **Total deploys:** 2

## Template content

### webserver

- **Image:** ghcr.io/paperless-ngx/paperless-ngx:2.20.15
- **Public domain:** Yes

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

- **Image:** redis:8.2.1
- **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"`

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

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

## Documentation

# Deploy and Host Paperless-ngx on Railway

## About Hosting Paperless-ngx on Railway
Paperless-ngx runs well on Railway as a Docker-based web service backed by managed Postgres and Redis, giving you quick browser access to document ingestion, OCR, and search.

## Tech Stack
- Paperless-ngx (Django + Celery)
- PostgreSQL 18
- Redis 8
- Docker image deployment on Railway

## Why Deploy Paperless-ngx on Railway
Railway provides fast Docker deploys, built-in private networking between services, and simple environment variable wiring for multi-service apps like Paperless-ngx.

## Common Use Cases
- Personal paperless office and scanned invoice archive
- Team document indexing and full-text retrieval
- Email/consume-folder based document intake workflows

## Deployment Notes
- Web service uses pinned upstream image `docker.io/paperlessngx/paperless-ngx:2.20.15` and listens on container port `8000`.
- Set `PORT=8000` for Railway HTTP routing.
- Required app variables include database/redis wiring plus `PAPERLESS_SECRET_KEY`.
- Admin bootstrap is enabled via `PAPERLESS_ADMIN_USER` and `PAPERLESS_ADMIN_PASSWORD`.
- Postgres and Redis are private internal services; only the web service is public.
- App media persistence is not mounted by default in this template; add a volume based on your retention requirements.

## Dependencies for Paperless-ngx on Railway
Paperless-ngx depends on PostgreSQL for metadata persistence and Redis for task queue/broker functionality.

### Deployment Dependencies

| Service   | Image                                                   | Port | Volume                      |
|-----------|---------------------------------------------------------|------|-----------------------------|
| webserver | docker.io/paperlessngx/paperless-ngx:2.20.15            | 8000 | -                           |
| Postgres  | ghcr.io/railwayapp-templates/postgres-ssl:18            | 5432 | /var/lib/postgresql/data    |
| Redis     | redis:8.2.1                                             | 6379 | /data                       |

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