How to Self-Host Paperless-ngx on Contabo Storage VPS: Private OCR Digital Document Archive
Contabo High-Performance Cloud VPS
Massive 4 vCPU cores, 8GB RAM, and 32TB monthly traffic. Ideal for Linux developers.
The Digital Clutter Crisis & Data Privacy
Tax receipts, employment contracts, medical records, and corporate invoices are either piling up in physical binders or scattered across vulnerable commercial cloud platforms like Google Drive and Dropbox. Commercial cloud services scan your private financial documents for metadata and advertising profiling.
Paperless-ngx is an open-source document management system that indexes your physical and digital documents. Utilizing Tesseract OCR, it automatically scans every word of an uploaded PDF or image, auto-tags documents with machine learning, and exposes a blazingly fast full-text search interface. Deploying Paperless-ngx on a Contabo Storage VPS 1 ($5.90/mo for 800 GB storage) gives you a private digital archive capable of storing hundreds of thousands of documents with total cryptographic privacy.
System Prerequisites on Contabo Storage VPS
Log in to your Contabo Storage VPS and verify your disk capacity and software stack:
df -h /
# Contabo Storage VPS 1 provides 800GB storage space on /dev/sda
apt update && apt upgrade -y
apt install -y curl git gnupg ufw tesseract-ocr-all
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker
Step 1: Directory Structure and Permissions
Create a dedicated workspace for Paperless-ngx with folders for consumed files, media archives, export snapshots, and database storage:
mkdir -p /opt/paperless/{consume,export,media,data,redis,pgdata}
cd /opt/paperless
Step 2: Crafting the Docker Compose Configuration
Paperless-ngx utilizes a microservice architecture consisting of the web server/worker, a PostgreSQL database, a Redis caching queue, and Apache Tika/Gotenberg for processing office documents and complex PDFs.
Create docker-compose.yml:
nano docker-compose.yml
services:
broker:
image: docker.io/library/redis:7-alpine
restart: unless-stopped
volumes:
- ./redis:/data
db:
image: docker.io/library/postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: StrongDbPassword_9934!
volumes:
- ./pgdata:/var/lib/postgresql/data
webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- db
- broker
ports:
- "127.0.0.1:8000:8000"
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBENGINE: postgresql
PAPERLESS_DBHOST: db
PAPERLESS_DBNAME: paperless
PAPERLESS_DBUSER: paperless
PAPERLESS_DBPASS: StrongDbPassword_9934!
PAPERLESS_URL: https://documents.yourdomain.com
PAPERLESS_SECRET_KEY: change-this-to-a-random-64-character-string!
PAPERLESS_TIME_ZONE: "UTC"
PAPERLESS_OCR_LANGUAGE: "eng"
PAPERLESS_TASK_WORKERS: 2
PAPERLESS_THREADS_PER_WORKER: 2
PAPERLESS_AUTO_LOGIN: "false"
volumes:
- ./data:/usr/src/paperless/data
- ./media:/usr/src/paperless/media
- ./export:/usr/src/paperless/export
- ./consume:/usr/src/paperless/consume
Launch the containers:
docker compose up -d
docker compose ps
Step 3: Creating Your Admin Account
Execute the createsuperuser utility inside the webserver container to generate your master credentials:
docker compose exec webserver python3 manage.py createsuperuser
Supply your administrative username, email, and password when prompted.
Step 4: Nginx Reverse Proxy with HTTPS
Protect your sensitive documents with TLS encryption using Nginx and Certbot:
apt install -y nginx certbot python3-certbot-nginx
cat << 'EOF' > /etc/nginx/sites-available/paperless.conf
server {
server_name documents.yourdomain.com;
client_max_body_size 100M;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 180s;
}
}
EOF
ln -s /etc/nginx/sites-available/paperless.conf /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
certbot --nginx -d documents.yourdomain.com --non-interactive --agree-tos -m admin@yourdomain.com
Step 5: Automated Ingestion Methods
Paperless-ngx makes feeding documents into your archive completely effortless:
- Folder Auto-Consume: Drop files into
/opt/paperless/consumevia SFTP, Samba, or Nextcloud. Paperless automatically detects new files, performs OCR, moves them to the media vault, and purges the input directory. - Email Ingestion (IMAP): In the Paperless web UI under Manage > Mail Accounts, connect your billing email (e.g., invoices@yourdomain.com). Configure a rule to automatically process PDF attachments and tag them as Taxes/Expenses.
- Mobile Scanning Apps: Use open-source scanner apps like Paperless Mobile (iOS & Android). Snap a photo of a restaurant receipt on your phone; it automatically crops the image, uploads via API, runs OCR, and logs the vendor.
Step 6: Searching & Machine Learning Auto-Matching
Once indexed, every printed word inside your documents becomes searchable in milliseconds. If you search for an obscure serial number from an electronics receipt purchased three years ago, Paperless-ngx highlights the exact paragraph on the scanned PDF.
Over time, Paperless-ngx's embedded neural classifier learns your categorization habits. When it sees an invoice from "Contabo GmbH" or "Hostinger International", it automatically assigns the Infrastructure tag, sets the correspondent, and files it under the FY2026 Expenses document type without manual intervention.
Editorial Verdict: Pros & Cons
What We Love (Pros)
- Automated optical character recognition (OCR) scans physical invoices, contracts, and receipts into searchable text
- Pair with Contabo Storage VPS for 800GB to 1.6TB of storage at only $5.90/month
- Integrates with mobile document scanners, email inboxes (IMAP), and WebDAV network folders
Drawbacks (Cons)
- OCR processing of multi-page PDFs consumes moderate CPU spikes during document ingestion
Deploy Your Contabo Cloud Server
Includes 4 vCPU Cores, 8GB RAM, 50GB NVMe SSD, and 32TB Outbound Traffic.
Written by Alex Vance
Cloud Infrastructure Architect
Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.
Recommended Next Reads
Hostinger vs Contabo VPS (2026): Real Benchmark Test & In-Depth Comparison
A comprehensive, benchmark-driven comparison between Hostinger and Contabo VPS. We tested Geekbench CPU scores, NVMe I/O, network latency, and hPanel vs CLI.
Hostinger Review (2026): Is It Truly the Best Web Hosting for the Price?
We stress-tested Hostinger's Premium and Cloud Startup plans across 180 days. Read our honest review covering uptime, LiteSpeed speed tests, and renewal fees.