Deploy Paperless-ngx | Open Source Document Manager
Self Host Paperless ngx. Scan, index, tag, OCR and archive documents
DBs
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Paperless-ngx
Just deployed
/data

Deploy and Host Paperless-ngx on Railway
Deploy Paperless-ngx on Railway to run a fully self-hosted document management system with automatic OCR, intelligent tagging, and full-text search. Self-host Paperless-ngx to transform physical documents into a searchable, organized digital archive — no SaaS vendor lock-in, no subscription fees, complete data privacy.
This Railway template pre-configures Paperless-ngx with PostgreSQL for document metadata storage, Redis for background task processing, and a persistent volume for document files. One click gives you a production-ready instance with admin authentication, OCR in 100+ languages, and Celery workers for asynchronous document processing.

Getting Started with Paperless-ngx on Railway
After deployment completes, open your Railway-generated public URL. You'll see the Paperless-ngx login page. Sign in with username admin and the password set in PAPERLESS_ADMIN_PASSWORD.
Once logged in, upload your first document by clicking the upload button in the top navigation bar. Paperless-ngx will automatically OCR the document, extract metadata, and make it searchable. Set up correspondents, document types, and tags from the sidebar to organize your archive. For automated ingestion, configure email polling under Settings → Mail to have Paperless-ngx pull documents from an inbox.

About Hosting Paperless-ngx on Railway
Paperless-ngx is a community-supported open-source document management system — the official successor to Paperless and Paperless-ng. It scans, indexes, and archives all your physical documents so you can search, tag, and retrieve them instantly.
Key features:
- Automatic OCR — Tesseract engine supports 100+ languages, extracting searchable text from scanned PDFs and images
- Machine-learning classification — auto-assigns tags, correspondents, and document types based on content
- Full-text search — find any document by content, metadata, dates, or custom fields
- Multi-format support — PDFs, images, plain text, Word, Excel, PowerPoint, and LibreOffice formats
- Email ingestion — automatically import documents from email attachments
- Workflow automation — trigger actions on document upload, matching, or scheduled intervals
- Multi-user with permissions — role-based access control with per-user document visibility
Why Deploy Paperless-ngx on Railway
- Zero server management — Railway handles containers, networking, and TLS
- PostgreSQL and Redis provisioned automatically with secure credentials
- Persistent volume preserves all documents and OCR data across redeploys
- Scale resources up or down from the Railway dashboard
- Public HTTPS URL generated instantly
Common Use Cases for Self-Hosted Paperless-ngx
- Personal paperless office — scan receipts, tax documents, warranties, medical records, and contracts into a searchable archive
- Small business document management — centralize invoices, purchase orders, HR documents, and compliance paperwork with multi-user access
- Legal and accounting workflows — tag and categorize client documents with custom fields, correspondents, and storage paths
- Automated email archival — pull attachments from dedicated inboxes and auto-classify them by content
Dependencies for Paperless-ngx on Railway
- Paperless-ngx —
paperlessngx/paperless-ngx:latest— the main application (web UI, API, Celery worker) - PostgreSQL — Railway-managed database for document metadata, user accounts, and search index
- Redis — Railway-managed cache for Celery task queue and background job scheduling
Environment Variables Reference for Paperless-ngx
| Variable | Description | Example |
|---|---|---|
PAPERLESS_URL | Public-facing URL for CORS and links | https://${{RAILWAY_PUBLIC_DOMAIN}} |
PAPERLESS_SECRET_KEY | Django secret key for session signing | ${{secret(64)}} |
PAPERLESS_ADMIN_USER | Superuser username created at first boot | admin |
PAPERLESS_ADMIN_PASSWORD | Superuser password (bootstrap-only) | Static generated value |
PAPERLESS_REDIS | Redis connection URL for Celery | redis://default:...@redis:6379 |
PAPERLESS_DBHOST | PostgreSQL host | ${{Postgres.RAILWAY_PRIVATE_DOMAIN}} |
PAPERLESS_OCR_LANGUAGE | Default OCR language code | eng |
PAPERLESS_TIME_ZONE | Container timezone | UTC |
PAPERLESS_DATA_DIR | Application data directory | /data/data |
PAPERLESS_MEDIA_ROOT | Document storage directory | /data/media |
Deployment Dependencies
- Runtime: Docker (Linux containers)
- Docker Hub: paperlessngx/paperless-ngx
- GitHub: paperless-ngx/paperless-ngx
- Documentation: docs.paperless-ngx.com
Hardware Requirements for Self-Hosting Paperless-ngx
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU | 2 vCPU |
| RAM | 1 GB | 2 GB |
| Storage | 5 GB + document volume | 20 GB+ (scales with archive size) |
| Runtime | Docker + Docker Compose | Docker + Docker Compose |
OCR processing is CPU-intensive. Larger archives with many concurrent uploads benefit from additional CPU and RAM. Storage requirements depend entirely on your document volume — plan for 1–10 MB per document depending on scan quality.
Self-Hosting Paperless-ngx with Docker
Run Paperless-ngx locally with Docker Compose:
services:
broker:
image: redis:7
volumes:
- redisdata:/data
db:
image: postgres:16
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: changeme
volumes:
- pgdata:/var/lib/postgresql/data
webserver:
image: paperlessngx/paperless-ngx:latest
depends_on:
- db
- broker
ports:
- "8000:8000"
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBHOST: db
PAPERLESS_DBNAME: paperless
PAPERLESS_DBUSER: paperless
PAPERLESS_DBPASS: changeme
PAPERLESS_SECRET_KEY: your-secret-key-here
volumes:
- data:/usr/src/paperless/data
- media:/usr/src/paperless/media
volumes:
redisdata:
pgdata:
data:
media:
Start the stack:
docker compose up -d
# Access at http://localhost:8000
# Create admin user:
docker compose exec webserver createsuperuser
Is Paperless-ngx Free to Self-Host?
Paperless-ngx is 100% free and open-source under the GPL-3.0 license. There are no paid tiers, no premium features, and no usage limits. The only costs are infrastructure — on Railway, you pay only for the compute, database, and storage resources your instance consumes. A typical low-traffic personal instance runs comfortably on Railway's Hobby plan.
Paperless-ngx vs Documenso vs Paperwork
| Feature | Paperless-ngx | Documenso | Paperwork |
|---|---|---|---|
| Primary use | Document archival & OCR | Digital signatures | Note & document organization |
| OCR built-in | Yes (Tesseract, 100+ languages) | No | No |
| Machine-learning tagging | Yes | No | No |
| Email ingestion | Yes | No | No |
| Self-hosted | Yes (Docker) | Yes (Docker) | Yes (Docker) |
| License | GPL-3.0 | AGPL-3.0 | Apache-2.0 |
| Active development | Very active (17k+ GitHub stars) | Active | Minimal |
Paperless-ngx is the strongest choice for scanning, OCR, and archiving physical documents. Documenso focuses on e-signatures, while Paperwork is a lightweight alternative that lacks OCR and ML features.
FAQ for Paperless-ngx on Railway
What is Paperless-ngx and why should I self-host it? Paperless-ngx is an open-source document management system that OCRs, indexes, and organizes your documents. Self-hosting gives you full ownership of sensitive documents — nothing leaves your server.
What does this Railway template deploy for Paperless-ngx? The template deploys three services: the Paperless-ngx application (web UI, REST API, Celery background workers), a PostgreSQL database for metadata and search, and a Redis instance for task queue management.
Why does Paperless-ngx need PostgreSQL and Redis on Railway? PostgreSQL stores document metadata, user accounts, tags, correspondents, and the search index. Redis powers the Celery task queue that handles asynchronous operations like OCR processing, email polling, and document classification — without Redis, background tasks won't run.
How do I add more OCR languages to Paperless-ngx on Railway?
Set PAPERLESS_OCR_LANGUAGES to a space-separated list of Tesseract language codes (e.g. deu fra spa). Paperless-ngx downloads the language packs automatically on startup. Set PAPERLESS_OCR_LANGUAGE to your primary language for default processing.
Can I import existing documents into Paperless-ngx on Railway?
Yes. Use the web UI's upload feature for manual imports, or configure PAPERLESS_CONSUMPTION_DIR and upload files to the consumption volume path. For bulk imports, use the REST API at /api/documents/post_document/ or set up email ingestion under Settings → Mail.
How do I back up my Paperless-ngx documents on Railway? Use the built-in export feature: navigate to Settings → Export or use the management command via the Railway shell. This creates a complete archive of all documents, metadata, and thumbnails that can be reimported into any Paperless-ngx instance.
Template Content
Redis
redis:8.2.1Paperless-ngx
paperlessngx/paperless-ngx:latestPAPERLESS_ADMIN_MAIL
Create Superuser email address
PAPERLESS_ADMIN_USER
Create Superuser username
PAPERLESS_ADMIN_PASSWORD
Create Superuser password