01Why I Digitized Everything
02Docker Compose Setup
1services: 2 paperless: 3 image: ghcr.io/paperless-ngx/paperless-ngx:2.154 depends_on: 5 db: 6 condition: service_healthy7 redis: 8 condition: service_started9 gotenberg: 10 condition: service_started11 tika: 12 condition: service_started13 ports: 14 - "8000:8000"15 volumes: 16 - paperless-data:/usr/src/paperless/data17 - paperless-media:/usr/src/paperless/media18 - ./consume:/usr/src/paperless/consume19 - ./export:/usr/src/paperless/export20 env_file: .env21 restart: unless-stopped2223 db: 24 image: postgres:16-alpine25 environment: 26 POSTGRES_DB: paperless27 POSTGRES_USER: paperless28 POSTGRES_PASSWORD: ${DB_PASSWORD}29 volumes: 30 - postgres-data:/var/lib/postgresql/data31 healthcheck: 32 test: ["CMD", "pg_isready", "-U", "paperless"]33 interval: 10s34 timeout: 5s35 retries: 536 restart: unless-stopped3738 redis: 39 image: redis:7-alpine40 volumes: 41 - redis-data:/data42 restart: unless-stopped4344 gotenberg: 45 image: gotenberg/gotenberg:846 command: 47 - "gotenberg"48 - "--chromium-disable-javascript=true"49 - "--chromium-allow-list=file:///tmp/.*"50 restart: unless-stopped5152 tika: 53 image: apache/tika:3.154 restart: unless-stopped5556volumes: 57 paperless-data: 58 paperless-media: 59 postgres-data: 60 redis-data: OCR processing is CPU-intensive. When you first import a large batch of documents, expect high CPU usage for hours. On a 4-core VPS, processing 500 pages takes about 2-3 hours. Set PAPERLESS_TASK_WORKERS=2 to limit concurrent OCR tasks and prevent the server from becoming unresponsive during bulk imports.
03Configuration and First Run
1# Database2DB_PASSWORD=use-a-strong-random-password3PAPERLESS_DBHOST=db4PAPERLESS_DBNAME=paperless5PAPERLESS_DBUSER=paperless6PAPERLESS_DBPASS=${DB_PASSWORD}78# Redis9PAPERLESS_REDIS=redis://redis:63791011# Core settings12PAPERLESS_SECRET_KEY=change-this-to-a-long-random-string13PAPERLESS_URL=https://paperless.example.com14PAPERLESS_TIME_ZONE=America/New_York15PAPERLESS_OCR_LANGUAGE=eng16PAPERLESS_ADMIN_USER=admin17PAPERLESS_ADMIN_PASSWORD=initial-admin-password1819# Performance tuning20PAPERLESS_TASK_WORKERS=221PAPERLESS_THREADS_PER_WORKER=222PAPERLESS_WEBSERVER_WORKERS=22324# Tika and Gotenberg25PAPERLESS_TIKA_ENABLED=126PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://gotenberg:300027PAPERLESS_TIKA_ENDPOINT=http://tika:9998Point a network scanner's 'Scan to Folder' feature at the consume directory (shared via SMB/NFS). Every scanned document automatically appears in Paperless within seconds. This is the workflow that makes going paperless actually sustainable — scan and forget.