Docspell logo

Docspell

Assist in organizing your piles of documents, resulting from scanners, e-mails and other sources with minimal effort

Alternative to: evernote, devonthink, paperoffice, docuware, m-files


Docspell is a personal document organizer and document management system for files coming from scanners, e-mails and other sources. It uses machine learning (via Stanford CoreNLP) to automatically suggest tags, correspondents and other metadata, and offers OCR, full-text search and e-mail integration through a mobile-friendly web interface.

Docspell Docker Compose example

Self-host Docspell on your own server, homelab, or VPS starting from this Docker Compose example. It runs Docspell in Docker containers using the official ghcr.io/docspell/restserver:latest, ghcr.io/docspell/joex:latest, docspell/dsc:latest, postgres:18, solr:10 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:
  restserver:
    image: ghcr.io/docspell/restserver:latest
    hostname: docspell-restserver
    restart: unless-stopped
    environment:
      # Timezone used for logs and scheduled tasks
      TZ: "Europe/Berlin"
      # Address other containers use to reach the restserver
      DOCSPELL_SERVER_INTERNAL__URL: "http://docspell-restserver:7880"
      # Secret protecting the admin endpoint (account reset, etc.) — change this
      DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET: "admin123"
      # Secret used to sign session tokens; empty generates a random one on each start
      DOCSPELL_SERVER_AUTH_SERVER__SECRET: ""
      # Database connection (internal Postgres below)
      DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD: "dbpass"
      DOCSPELL_SERVER_BACKEND_JDBC_URL: "jdbc:postgresql://db:5432/dbname"
      DOCSPELL_SERVER_BACKEND_JDBC_USER: "dbuser"
      DOCSPELL_SERVER_BIND_ADDRESS: "0.0.0.0"
      # Full-text search via the bundled Solr instance
      DOCSPELL_SERVER_FULL__TEXT__SEARCH_ENABLED: "true"
      DOCSPELL_SERVER_FULL__TEXT__SEARCH_SOLR_URL: "http://docspell-solr:8983/solr/docspell"
      # Integration endpoint used by the consumedir file watcher
      DOCSPELL_SERVER_INTEGRATION__ENDPOINT_ENABLED: "true"
      DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_ENABLED: "true"
      # Shared secret between restserver and the consumedir watcher
      DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE: "integration-password123"
      # Registration mode: open, invite or closed
      DOCSPELL_SERVER_BACKEND_SIGNUP_MODE: "open"
      # Password required when SIGNUP_MODE is "invite"
      DOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD: ""
      DOCSPELL_SERVER_BACKEND_ADDONS_ENABLED: "false"
    ports:
      - "7880:7880"
    depends_on:
      - db
      - solr

  joex:
    image: ghcr.io/docspell/joex:latest
    hostname: docspell-joex
    restart: unless-stopped
    environment:
      # Timezone used for logs and scheduled tasks
      TZ: "Europe/Berlin"
      DOCSPELL_JOEX_APP__ID: "joex1"
      DOCSPELL_JOEX_PERIODIC__SCHEDULER_NAME: "joex1"
      DOCSPELL_JOEX_SCHEDULER_NAME: "joex1"
      # Address the restserver uses to reach this job executor
      DOCSPELL_JOEX_BASE__URL: "http://docspell-joex:7878"
      DOCSPELL_JOEX_BIND_ADDRESS: "0.0.0.0"
      # Full-text search via the bundled Solr instance
      DOCSPELL_JOEX_FULL__TEXT__SEARCH_ENABLED: "true"
      DOCSPELL_JOEX_FULL__TEXT__SEARCH_SOLR_URL: "http://docspell-solr:8983/solr/docspell"
      # Database connection (internal Postgres below)
      DOCSPELL_JOEX_JDBC_PASSWORD: "dbpass"
      DOCSPELL_JOEX_JDBC_URL: "jdbc:postgresql://db:5432/dbname"
      DOCSPELL_JOEX_JDBC_USER: "dbuser"
      DOCSPELL_JOEX_ADDONS_EXECUTOR__CONFIG_RUNNER: "docker,trivial"
      # HTML-to-PDF converter used when processing documents
      DOCSPELL_JOEX_CONVERT_HTML__CONVERTER: "weasyprint"
    depends_on:
      - db
      - solr

  consumedir:
    image: docspell/dsc:latest
    command:
      - dsc
      - "-d"
      - "http://docspell-restserver:7880"
      - "watch"
      - "--delete"
      - "-ir"
      - "--not-matches"
      - "**/.*"
      - "--header"
      - "Docspell-Integration:integration-password123"
      - "/opt/docs"
    restart: unless-stopped
    volumes:
      - docs:/opt/docs
    depends_on:
      - restserver

  db:
    image: postgres:18
    restart: unless-stopped
    volumes:
      - postgres_data:/var/lib/postgresql
    environment:
      # Internal database credentials — reachable only inside the compose network
      POSTGRES_USER: "dbuser"
      POSTGRES_PASSWORD: "dbpass"
      POSTGRES_DB: "dbname"

  solr:
    image: solr:10
    restart: unless-stopped
    volumes:
      - solr_data:/var/solr
    environment:
      SOLR_OPTS: "-Dsolr.modules=analysis-extras"
    command:
      - bash
      - -c
      - "precreate-core docspell; exec solr start -f --user-managed"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8983/solr/docspell/admin/ping"]
      interval: 1m
      timeout: 10s
      retries: 2
      start_period: 30s

volumes:
  postgres_data:
  solr_data:
  docs:

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