Deploy Paperless-ngx + Paperless-AI
Document manager with OCR plus AI auto-tagging, pre-wired and tested.
paperless-ai
Just deployed
/app/data
paperless-ngx
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Redis
Just deployed
/data
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):
- Open the Paperless-ngx URL. Log in as
adminwith the password in the paperless-ngx service'sPAPERLESS_ADMIN_PASSWORDvariable, then change it. - In Paperless, open your profile and create an API token.
- 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.
- 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, withPAPERLESS_DATA_DIR,PAPERLESS_MEDIA_ROOTandPAPERLESS_CONSUMPTION_DIRpointing inside it. PAPERLESS_ALLOWED_HOSTSincludes the private domain and Railway's healthcheck host. Without it, the healthcheck and Paperless-AI's API calls get rejected oncePAPERLESS_URLis set.- Change
PAPERLESS_OCR_LANGUAGE(for exampledeuoreng+fra) for other languages. - Raise
PAPERLESS_TASK_WORKERSif 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.
Template Content
paperless-ai
clusterzx/paperless-ai:4.5.1-cpupaperless-ngx
ghcr.io/paperless-ngx/paperless-ngx:3.5.1Redis
redis:8.2
