Paperless-ngx logo

Paperless-ngx

Community-supported document management system to scan, index and archive all your documents

Alternative to: evernote, docuware, m-files

Paperless-ngx screenshot

Paperless-ngx is a document management system that transforms your physical documents into a searchable online archive, letting you scan, index, and archive your paperwork digitally. It performs OCR on scanned documents using the open-source Tesseract engine (100+ languages) and uses machine learning to automatically tag, classify, and assign correspondents and document types. It is the official community-supported successor to the original Paperless and Paperless-ng projects.

Paperless-ngx Docker Compose example

Self-host Paperless-ngx on your own server, homelab, or VPS starting from this Docker Compose example. It runs Paperless-ngx in Docker containers using the official redis:8, postgres:18, ghcr.io/paperless-ngx/paperless-ngx:latest images, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  broker:
    image: redis:8
    restart: unless-stopped
    volumes:
      - redisdata:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5

  db:
    image: postgres:18
    restart: unless-stopped
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      # Name of the PostgreSQL database Paperless-ngx connects to.
      POSTGRES_DB: "paperless"
      # PostgreSQL user Paperless-ngx authenticates as.
      POSTGRES_USER: "paperless"
      # Password for the PostgreSQL user (database is only reachable inside this compose network).
      POSTGRES_PASSWORD: "paperless"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U paperless"]
      interval: 10s
      timeout: 5s
      retries: 5

  webserver:
    image: ghcr.io/paperless-ngx/paperless-ngx:latest
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy
      broker:
        condition: service_healthy
    volumes:
      - data:/usr/src/paperless/data
      - media:/usr/src/paperless/media
      - consume:/usr/src/paperless/consume
    environment:
      # Hostname of the Redis broker used for the task queue.
      PAPERLESS_REDIS: "redis://broker:6379"
      # Hostname of the PostgreSQL database service.
      PAPERLESS_DBHOST: "db"
      # PostgreSQL database name (must match the db service).
      PAPERLESS_DBNAME: "paperless"
      # PostgreSQL user (must match the db service).
      PAPERLESS_DBUSER: "paperless"
      # PostgreSQL password (must match the db service).
      PAPERLESS_DBPASS: "paperless"
      # Public URL where Paperless-ngx is reached, used for CSRF trusted origins. Set this to your real domain.
      PAPERLESS_URL: "changeme"
      # Random secret used to sign sessions and tokens. Generate a long random value.
      PAPERLESS_SECRET_KEY: "changeme"
      # Timezone used for displaying and storing dates.
      PAPERLESS_TIME_ZONE: "UTC"
      # Default OCR language(s) as ISO 639-2/T codes (e.g. "eng", "deu"). The matching Tesseract data must be installed in the image.
      PAPERLESS_OCR_LANGUAGE: "eng"
      # Username of the superuser account created on first start.
      PAPERLESS_ADMIN_USER: "admin"
      # Password for the superuser account created on first start.
      PAPERLESS_ADMIN_PASSWORD: "changeme"
    healthcheck:
      test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
      interval: 30s
      timeout: 10s
      retries: 5

volumes:
  data:
  media:
  consume:
  pgdata:
  redisdata:

Values set to changeme are required — replace them with your own values before starting Paperless-ngx.

Prefer a managed setup? WinterFlow installs, configures, and updates Paperless-ngx for you using this same Docker Compose configuration.