Deploy Paperless-ngx + Paperless-AI

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

Deploy Paperless-ngx + Paperless-AI

Just deployed

/app/data

Just deployed

/data

/var/lib/postgresql/data

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):

  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

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.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

Tracklayer
1