---
title: "Deploy Paperless-ngx + Postgres/Redis - Document Archive with OCR"
description: "Paperless-ngx document archive with Postgres, Redis, Tika, and OCR."
category: "Storage"
url: https://railway.com/deploy/paperless-ngx-postgres-redis
---

# Deploy Paperless-ngx + Postgres/Redis - Document Archive with OCR

Paperless-ngx document archive with Postgres, Redis, Tika, and OCR.

**[Deploy Paperless-ngx + Postgres/Redis - Document Archive with OCR on Railway](https://railway.com/template/paperless-ngx-postgres-redis)**

- **Creator:** leodev
- **Category:** Storage

## Template content

### paperless

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

### redis

- **Image:** redis:8-alpine

### gotenberg

- **Image:** gotenberg/gotenberg:8.25
- **Start command:** `gotenberg --chromium-disable-javascript=true --chromium-allow-list=file:///tmp/.*`

### postgres

- **Image:** postgres:17-alpine

### tika

- **Image:** apache/tika:latest

## Documentation

# Deploy and Host Paperless-ngx + Postgres/Redis on Railway

Self-host Paperless-ngx with Postgres, Redis, Tika, Gotenberg, generated admin credentials, and persistent document storage.

## About Hosting Paperless-ngx + Postgres/Redis on Railway

- `paperless`: public Paperless-ngx web service
- `postgres`: private database for document metadata
- `redis`: private cache/broker service
- `tika` and `gotenberg`: private helpers for Office/email document conversion
- Persistent media/document volume
- Generated admin password, database password, and app secret

## Why Deploy Paperless-ngx + Postgres/Redis on Railway

The published template deploy test created `paperless`, `postgres`, `redis`, `gotenberg`, and `tika`; all services reached `SUCCESS`; token auth returned HTTP `200`; document upload returned HTTP `200`; and the uploaded document remained searchable after restarting `paperless`.

This template favors a complete document archive path over the smallest possible service count.

## Common Use Cases

- Personal document archives
- Small-team searchable document inboxes
- OCR-backed PDF and image storage
- Office document ingestion with Tika/Gotenberg
- Evaluation environments for Paperless-ngx

## Dependencies for Paperless-ngx + Postgres/Redis Hosting

Paperless depends on Postgres for metadata, Redis for scheduled/background work, persistent filesystem storage for documents and media, and Tika/Gotenberg for richer document conversion.

### Deployment Dependencies

- `PAPERLESS_SECRET_KEY`: generated Paperless secret
- `PAPERLESS_ADMIN_USER`: initial admin username
- `PAPERLESS_ADMIN_PASSWORD`: generated initial admin password
- `POSTGRES_PASSWORD`: generated database password
- `PAPERLESS_REDIS`: private Redis connection
- `PORT`: Railway public routing port for Paperless

## After Deploy

1. Open the Paperless public URL.
2. Sign in with the generated admin credentials.
3. Upload a small test document.
4. Watch resource usage if OCR jobs become large or frequent.

## Support Checklist

If a deploy fails, include all service deployment IDs, the public URL response, and log lines mentioning Postgres, Redis, document storage, Tika, or Gotenberg.


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