Deploy paperless-ngx
Document management system with automated tagging, search and AI
Database
Valkey
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Services
Gotenberg
Just deployed
Tika
Just deployed
paperless-ngx
Just deployed
/data
Deploy and Host paperless-ngx on Railway
paperless-ngx is an open-source document management system that turns your physical and digital paperwork into a searchable online archive. It scans, OCRs, and indexes documents, then automatically tags and sorts them by correspondent, type, and date, so you can find any receipt, contract, or letter in seconds.
About Hosting paperless-ngx
Hosting paperless-ngx involves running several cooperating services: the Django web application and its background workers, a PostgreSQL database for metadata, Redis for the task queue, and optionally Apache Tika and Gotenberg for parsing Office files and emails. Documents, thumbnails, and the search index must live on persistent storage so nothing is lost between deploys. You also need to set a secret key, configure the public URL and allowed hosts, and wire the services together over a private network. This template provisions and connects all of these for you, with sensible defaults and persistent volumes already in place.
Common Use Cases
- Going paperless at home: scan bills, tax documents, warranties, and medical records into a private, searchable archive
- Small business record-keeping: centralize invoices, receipts, and contracts with automatic tagging and full-text search
- Email archiving: pull attachments and messages from IMAP mailboxes and file them automatically using mail rules
- Replacing filing cabinets for freelancers, landlords, and households who need quick access to documents on any device
Dependencies for paperless-ngx Hosting
- PostgreSQL: stores document metadata, tags, users, and settings
- Redis: message broker for background tasks such as OCR and document consumption
- Apache Tika: extracts text and metadata from Office documents and emails
- Gotenberg: converts Office documents and emails to PDF for archiving
Implementation Details
Creating your admin account. On first deploy, add these variables to the paperless-ngx service to create a superuser automatically, then remove them once you have logged in:
PAPERLESS_ADMIN_USER=admin
PAPERLESS_ADMIN_PASSWORD=choose-a-strong-password
Custom domain. If you attach a custom domain, update PAPERLESS_URL (e.g. https://docs.example.com) and add the hostname to PAPERLESS_ALLOWED_HOSTS, otherwise logins will fail CSRF checks.
Adding documents. Railway has no shared network folder, so the consumption directory is not directly reachable from your computer. Upload documents through the web interface (drag and drop), the REST API, a mobile app such as Paperless Mobile, or by configuring mail accounts in the admin panel.
Storage. Documents and the search index are stored on a Railway volume mounted at the paths set in PAPERLESS_MEDIA_ROOT and PAPERLESS_DATA_DIR. Monitor volume usage as your archive grows, and use the built-in document exporter for regular off-platform backups.
OCR language. OCR defaults to English. To recognize other languages, set PAPERLESS_OCR_LANGUAGE (e.g. eng+deu+ita).
Why Deploy paperless-ngx 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 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
Valkey
valkey/valkey:9Gotenberg
gotenberg/gotenberg:8Tika
apache/tikapaperless-ngx
paperlessngx/paperless-ngx:3.3PAPERLESS_URL
Public URL where Paperless is reachable (e.g. https://docs.example.com). Used for CSRF checks and generated links.
PAPERLESS_ADMIN_USER
Super admin username
PAPERLESS_ALLOWED_HOSTS
Comma-separated list of hostnames Paperless will accept requests for.
PAPERLESS_ADMIN_PASSWORD
Super admin password


