Deploy Paperless-ngx | Open Source Document Manager
Railway

Deploy Paperless-ngx | Open Source Document Manager

Self Host Paperless ngx. Scan, index, tag, OCR and archive documents

Deploy Paperless-ngx | Open Source Document Manager

DBs

Just deployed

/data

/var/lib/postgresql/data

Just deployed

/data

Paperless-ngx logo

Deploy and Host Paperless-ngx on Railway

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

Paperless-ngx Railway architecture

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.

Paperless-ngx dashboard screenshot

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-ngxpaperlessngx/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

VariableDescriptionExample
PAPERLESS_URLPublic-facing URL for CORS and linkshttps://${{RAILWAY_PUBLIC_DOMAIN}}
PAPERLESS_SECRET_KEYDjango secret key for session signing${{secret(64)}}
PAPERLESS_ADMIN_USERSuperuser username created at first bootadmin
PAPERLESS_ADMIN_PASSWORDSuperuser password (bootstrap-only)Static generated value
PAPERLESS_REDISRedis connection URL for Celeryredis://default:...@redis:6379
PAPERLESS_DBHOSTPostgreSQL host${{Postgres.RAILWAY_PRIVATE_DOMAIN}}
PAPERLESS_OCR_LANGUAGEDefault OCR language codeeng
PAPERLESS_TIME_ZONEContainer timezoneUTC
PAPERLESS_DATA_DIRApplication data directory/data/data
PAPERLESS_MEDIA_ROOTDocument storage directory/data/media

Deployment Dependencies

Hardware Requirements for Self-Hosting Paperless-ngx

ResourceMinimumRecommended
CPU1 vCPU2 vCPU
RAM1 GB2 GB
Storage5 GB + document volume20 GB+ (scales with archive size)
RuntimeDocker + Docker ComposeDocker + 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

FeaturePaperless-ngxDocumensoPaperwork
Primary useDocument archival & OCRDigital signaturesNote & document organization
OCR built-inYes (Tesseract, 100+ languages)NoNo
Machine-learning taggingYesNoNo
Email ingestionYesNoNo
Self-hostedYes (Docker)Yes (Docker)Yes (Docker)
LicenseGPL-3.0AGPL-3.0Apache-2.0
Active developmentVery active (17k+ GitHub stars)ActiveMinimal

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

More templates in this category

View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
View Template
(v1) Simple Medusa Backend
Deploy an ecommerce backend and admin using Medusa

Shahed Nasser