Deploy Paperless-AI

AI titles, tags and RAG chat for Paperless-ngx or a built-in archive

Deploy Paperless-AI

Just deployed

/app/data

Deploy and Host Paperless-AI on Railway

Paperless-AI is an open-source (MIT) AI companion for Paperless-ngx. It reads each document and fills in its title, tags, correspondent, document type and date with an LLM. It also answers plain-language questions about your whole archive and cites its sources. It runs alongside Paperless-ngx or on its own with a built-in archive.

About Hosting Paperless-AI

This template runs Paperless-AI 4.5.1 as one service, built from a public GitHub repo that pins the official image by digest. Its database, settings, search index and archive files live on a Railway volume, so they survive redeploys. On the first boot the admin account is created with a generated password, so the setup wizard is never open to strangers. You bring an API key for OpenAI or any OpenAI-compatible provider. After deploying, sign in as admin with the ADMIN_PASSWORD from the service's Variables tab. Then choose your Paperless-ngx (its URL and an API token) or the built-in archive.

Common Use Cases

  • Automatically title, tag and file every new document in an existing Paperless-ngx
  • Ask questions such as "How much was the last electricity bill?" and get answers with sources
  • Run a small AI-indexed document archive without Paperless-ngx, with uploads, WebDAV, e-mail intake and an MCP server for AI agents

Dependencies for Paperless-AI Hosting

  • An API key for OpenAI or an OpenAI-compatible LLM provider (OpenRouter, DeepSeek, Groq, LiteLLM …)
  • Optional: a Paperless-ngx instance and the API token of a user that may view and change documents

Deployment Dependencies

Implementation Details

Service: Paperless-AI is the only service. It serves the public web UI, the REST API, the Paperless-ngx-compatible API, the MCP server at /mcp and the background processing. It has a health check on /health and a volume at /app/data. It restarts on failure: the start script exits non-zero if the app stops on its own.

Variables: you are asked only for LLM_API_KEY. LLM_BASE_URL (default https://api.openai.com/v1) and LLM_MODEL (default gpt-5-mini) can be changed. Values set this way are locked in the web interface. To use Anthropic, Azure or Ollama instead, delete LLM_API_KEY and pick the provider in Settings. ADMIN_PASSWORD is generated and only read on the first boot.

Memory: the app needs about 120 MB. OCR of scans and local embeddings for "Ask your archive" each need about 600 MB. Below 900 MB (Railway Free or Trial, 0.5 GB), the template locks OCR off and uses keyword search for "Ask your archive". Raise the service to 1 GB or more and redeploy to switch both on. On any plan, setting RAG_EMBEDDING_PROVIDER=custom uses your provider's embeddings API instead.

Instant processing: in Paperless-ngx, add a workflow with the trigger "Document Added". Give it a Webhook action to https://YOUR-DOMAIN/api/webhook/document, with the body parameter url = {doc_url} and the header x-api-key set to the key from Settings, API & webhooks. Without this workflow, a scan runs every 30 minutes.

MCP: create a key in Settings, API keys. Then add {"mcpServers":{"paperless-ai":{"type":"http","url":"https://YOUR-DOMAIN/mcp","headers":{"Authorization":"Bearer pai_..."}}}} to your AI client.

Updates: Railway shows an update notice when the template repo's main changes. The changelog lists each version, with breaking changes first. Applying an update rebuilds the image and keeps the volume.

Why Deploy 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-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