---
title: "Deploy Paperless-ngx + Paperless-AI"
description: "Document manager with OCR plus AI auto-tagging, pre-wired and tested."
category: "AI/ML"
url: https://railway.com/deploy/paperless-ngx-paperless-ai
---

# Deploy Paperless-ngx + Paperless-AI

Document manager with OCR plus AI auto-tagging, pre-wired and tested.

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

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

- **Creator:** Shawn Smith's Projects
- **Category:** AI/ML
- **Total deploys:** 1

## Template content

### paperless-ai

- **Image:** clusterzx/paperless-ai:4.5.1-cpu
- **Public domain:** Yes

### paperless-ngx

- **Image:** ghcr.io/paperless-ngx/paperless-ngx:3.5.1
- **Health check:** /accounts/login/
- **Public domain:** Yes

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

## Documentation

# Deploy and Host Paperless-ngx + Paperless-AI on Railway

Paperless-ngx turns your paper pile into a searchable archive: scan or upload a document and it OCRs, files and indexes it. Paperless-AI sits next to it and uses the AI model of your choice to give every new document a title, tags, a correspondent and a document type automatically.

## About Hosting Paperless-ngx + Paperless-AI

This template deploys four services that are already wired together over Railway's private network: Paperless-ngx (web app plus its background worker), Paperless-AI, Postgres and Redis. Versions are pinned (Paperless-ngx 3.5.1, Paperless-AI 4.5.1 CPU build) and the whole stack was test-deployed before publishing. Secrets are generated at deploy time, so nothing is shared between deployments. Paperless keeps all documents on its own volume, and Paperless-AI keeps its settings on a second volume. Paperless-AI talks to Paperless over the private network only.

**After you deploy (about 5 minutes):**
1. Open the Paperless-ngx URL. Log in as `admin` with the password in the paperless-ngx service's `PAPERLESS_ADMIN_PASSWORD` variable, then change it.
2. In Paperless, open your profile and create an API token.
3. Open the Paperless-AI URL right away and finish its setup wizard (create its login, paste the API token, pick an AI provider). Do this first, because the wizard is open to anyone until it's done. The Paperless API URL is already filled in for you.
4. Upload a document and watch it get tagged.

**Cost:** about $5 to $15 a month on Railway for light personal use (Paperless idles around 650 MB of memory with the worker counts set to 1), plus whatever your AI provider charges per document. Using a local or cheap model keeps that close to zero.

## Common Use Cases

- Go paperless at home: bills, receipts, tax forms, manuals and medical paperwork, searchable in seconds
- Auto-tag a small office's incoming invoices and contracts without writing rules by hand
- Keep a private, self-hosted alternative to cloud document scanners, with your own choice of AI model

## Dependencies for Paperless-ngx + Paperless-AI Hosting

- Postgres (database for Paperless)
- Redis (task queue for Paperless's background worker)
- An AI provider for Paperless-AI: OpenAI, Anthropic Claude, OpenRouter, any OpenAI-compatible API, or a self-hosted Ollama

### Deployment Dependencies

- Paperless-ngx: https://github.com/paperless-ngx/paperless-ngx (GPL-3.0)
- Paperless-AI: https://github.com/clusterzx/paperless-ai (MIT)
- Paperless-ngx docs: https://docs.paperless-ngx.com

### Implementation Details

- Paperless-ngx uses a single volume at `/data`, with `PAPERLESS_DATA_DIR`, `PAPERLESS_MEDIA_ROOT` and `PAPERLESS_CONSUMPTION_DIR` pointing inside it.
- `PAPERLESS_ALLOWED_HOSTS` includes the private domain and Railway's healthcheck host. Without it, the healthcheck and Paperless-AI's API calls get rejected once `PAPERLESS_URL` is set.
- Change `PAPERLESS_OCR_LANGUAGE` (for example `deu` or `eng+fra`) for other languages.
- Raise `PAPERLESS_TASK_WORKERS` if you import large batches and don't mind more memory use.

This template uses the official, unmodified images and is not affiliated with the Paperless-ngx or Paperless-AI projects. Questions are answered in this template's Railway help thread.

## Why Deploy Paperless-ngx + Paperless-AI 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 + Paperless-AI 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

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

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