---
title: "Deploy paperless-gpt"
description: "AI title, tag and vision-OCR helper for Paperless-ngx, behind a login"
category: "AI/ML"
url: https://railway.com/deploy/paperless-gpt-1
---

# Deploy paperless-gpt

AI title, tag and vision-OCR helper for Paperless-ngx, behind a login

**[Deploy paperless-gpt on Railway](https://railway.com/template/paperless-gpt-1)**

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

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### paperless-gpt https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/paperless-gpt.png

- **Source:** https://github.com/aalfath/paperless-gpt-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host paperless-gpt on Railway

paperless-gpt is an open-source (MIT) companion for Paperless-ngx that uses a large language model to suggest document titles, tags, correspondents, document types and dates, and a vision model to re-read poor scans (OCR). You review suggestions in its web UI, or let it process tagged documents automatically. Results are written back to Paperless-ngx.

## About Hosting paperless-gpt

paperless-gpt is a single Go service with a built-in web UI. It doesn't store your documents: it fetches them from your Paperless-ngx through its API, sends their text or page images to your LLM provider, and writes the results back. It keeps its prompt templates, AI workflows, UI settings, undo history and OCR log in local files, so those need a persistent volume. Upstream has no login, and its API can read and change every document and spend your API key, so it must not sit on the open internet unprotected. This template handles all of that: one service, a volume, a generated password and a health check.

## Common Use Cases

* Replace scanner file names like `scan_0043.pdf` with real titles, and fill in correspondents, document types, dates and tags across an archive.
* Re-read scans with bad OCR using a vision model, page by page, and optionally upload a searchable PDF back to Paperless-ngx.
* Run tag-triggered AI workflows: tag a document `paperless-gpt-auto` in Paperless-ngx and it's processed in the background.

## Dependencies for paperless-gpt Hosting

* A running Paperless-ngx (any host, or a Paperless-ngx template in the same Railway project) and an API token from it.
* An API key for OpenAI or any OpenAI-compatible API (OpenRouter, Groq, DeepSeek, LiteLLM). Anthropic, Google AI, Mistral and Ollama also work through optional variables.

### Deployment Dependencies

* paperless-gpt: https://github.com/icereed/paperless-gpt (release v0.31.0)
* Paperless-ngx: https://github.com/paperless-ngx/paperless-ngx
* Template repository (Dockerfile, start script, changelog): https://github.com/aalfath/paperless-gpt-railway-template
* OpenAI API keys: https://platform.openai.com/api-keys

### Implementation Details

The template deploys one service, `paperless-gpt`, built from our GitHub repository on the official image `icereed/paperless-gpt:v0.31.0`, pinned by digest:

* **Caddy login proxy** on the public URL. Every page and API route needs the username `admin` and a generated password (`ADMIN_PASSWORD`, in the service's Variables tab). Only `/healthz` is open, for Railway's health check.
* **paperless-gpt** listens on localhost only, behind the proxy.
* **Volume at `/data`** holds prompts, AI workflows, settings, undo history and the OCR run log, so they survive redeploys and updates.

You enter three values when deploying: `PAPERLESS_BASE_URL`, `PAPERLESS_API_TOKEN` and `OPENAI_API_KEY`. `OPENAI_BASE_URL` (default OpenAI) and `LLM_MODEL` (default `gpt-5-mini`, which also does the vision OCR) can be changed. If Paperless-ngx runs in the same Railway project, use `http://${{Paperless-ngx.RAILWAY_PRIVATE_DOMAIN}}:8000` as the URL and set `PAPERLESS_PUBLIC_URL` to its public address.

After deploying, log in, then tag a document `paperless-gpt` in Paperless-ngx to review suggestions in the UI, `paperless-gpt-auto` to process it automatically, or `paperless-gpt-ocr-auto` for OCR. A wrong URL or token doesn't stop the service: the error shows in the UI and the logs, and you can fix the variable.

It runs on Railway's Free plan (0.5 GB RAM): tested at about 110 MB idle and a 390 MB peak during vision OCR of a 5-page scan. Below 900 MB, pages are rendered at up to 300 DPI. If paperless-gpt stops unexpectedly, the container exits with an error so Railway restarts it.

**Updates:** the service builds from our repository, so Railway shows an update notice when we release a new version. Read the repository's CHANGELOG.md first, then apply the update. Your volume is kept.

## Why Deploy paperless-gpt 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-gpt 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-gpt-1
