How to Deploy Paperless-ngx: Go Paperless in 30 Minutes
Scan every document. OCR every page. Search your entire filing cabinet from a browser. Here is the complete Paperless-ngx deployment guide.
Paperless-ngx digitises your business documents through optical character recognition and makes them searchable. Invoices, receipts, contracts, and correspondence go from paper to searchable archive with a scanner and 30 minutes of setup.
Step 1: Create the Docker Compose File
services:
paperless-broker:
image: redis:7
container_name: paperless-broker
restart: unless-stopped
volumes:
- redis_data:/data
paperless-db:
image: postgres:16
container_name: paperless-db
restart: unless-stopped
volumes:
- pg_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: secure_password_here
paperless-webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
container_name: paperless-webserver
restart: unless-stopped
ports:
- "127.0.0.1:8083:8000"
volumes:
- ./data:/usr/src/paperless/data
- ./media:/usr/src/paperless/media
- ./export:/usr/src/paperless/export
- ./consume:/usr/src/paperless/consume
environment:
PAPERLESS_REDIS: redis://paperless-broker:6379
PAPERLESS_DBHOST: paperless-db
PAPERLESS_DBUSER: paperless
PAPERLESS_DBPASS: secure_password_here
PAPERLESS_DBNAME: paperless
PAPERLESS_SECRET_KEY: generate_a_random_50_char_string
PAPERLESS_URL: https://docs.yourdomain.com
PAPERLESS_TIME_ZONE: Asia/Brunei
PAPERLESS_OCR_LANGUAGES: eng msa
PAPERLESS_OCR_MODE: auto
depends_on:
- paperless-broker
- paperless-db
volumes:
redis_data:
pg_data:Step 2: Create the Admin User
Start the containers and create an admin account:
docker compose up -d
docker compose exec paperless-webserver python3 manage.py \
createsuperuserEnter the admin username, email, and password when prompted. Open https://docs.yourdomain.com and log in.
Step 3: Configure Automatic Consumption
Paperless-ngx watches the consume folder for new files. Any file placed in this folder is automatically processed. Configure your scanner to save files to this folder via Samba, FTP, or WebDAV.
For a network scanner:
# Configure Samba on the server
sudo apt install samba -y
sudo tee -a /etc/samba/smb.conf << EOF
[paperless]
path = /opt/paperless-ngx/consume
read only = no
browsable = yes
EOF
sudo systemctl restart smbd
sudo smbpasswd -a paperlessConfigure your scanner to save to \\your-server-ip\paperless. Every scan is automatically ingested, OCR'd, and added to your archive.
Step 4: Configure Email Ingestion
Paperless-ngx can watch an email inbox and automatically ingest attachments. This is useful for invoices that arrive by email:
# Add to paperless-webserver environment:
PAPERLESS_CONSUMER_MAIL_HOST: imap.yourdomain.com
PAPERLESS_CONSUMER_MAIL_PORT: 993
PAPERLESS_CONSUMER_MAIL_USERNAME: docs@yourdomain.com
PAPERLESS_CONSUMER_MAIL_PASSWORD: your_email_password
PAPERLESS_CONSUMER_MAIL_INBOX: INBOXForward invoices and receipts to docs@yourdomain.com. They appear in Paperless-ngx automatically.
Step 5: Train the Auto-Tagger
Paperless-ngx learns from your tagging patterns. For the first week, manually tag incoming documents with correspondents, document types, and tags. After about 50 documents, the auto-classifier becomes accurate enough to tag documents automatically. The accuracy improves with every document you process.
The automation saves hours per month compared to manual filing and hours per search compared to digging through physical folders.
If setting up Samba shares and training ML classifiers is not how you want to spend your Tuesday, VPS1 deploys Paperless-ngx with automatic ingestion. We configure your scanner, email ingestion, and backup. You search, find, and never dig through a filing cabinet again.
More articles
How to Deploy BTCPay Server: Accept Bitcoin Payments with Zero Platform Fees
BTCPay Server lets you accept Bitcoin and Lightning payments with no platform fees. Only standard Bitcoin network fees apply. Here is how to deploy it with Docker Compose.
Self-Hosted Crypto Payment Processors: BTCPay Server, Bitcart, and SHKeeper Compared
Accept Bitcoin and cryptocurrency payments directly with no platform fees, no intermediaries, and no KYC. Here is how BTCPay Server, Bitcart, and SHKeeper compare.
How to Deploy SHKeeper: Accept Crypto Payments with WooCommerce in 30 Minutes
SHKeeper supports Bitcoin, Ethereum, USDT, USDC, and 19+ cryptocurrencies with a free WooCommerce plugin. Zero platform fees -- only standard network fees apply.