Paperless‑ngx Docker Compose Setup with OCR
说明与用途
Paperless‑ngx Docker Compose 设置:修复三大常见陷阱,安全密钥、本地化 OCR,绑定本地端口。
问题
The official Paperless‑ngx Docker Compose files leave three traps for new installs: a placeholder secret key that v3 refuses to start with, the web UI exposed on all interfaces before an admin account is created, and insufficient guidance on OCR languages.
结果
The guide resolves three common pitfalls in the official Paperless‑ngx Docker Compose setup, enabling secure, localized OCR and a safe web exposure. It demonstrates full lifecycle operations including backup and upgrade.
工作流
- Create directories ~/paperless/consume and ~/paperless/export and set umask 077
- Generate .env with COMPOSE_PROJECT_NAME, POSTGRES_PASSWORD, and PAPERLESS_SECRET_KEY
- Save the modified docker‑compose.yml with pinned image tags, port binding, and environment variables
- Create docker‑compose.env with USERMAP_UID, USERMAP_GID, and other Paperless settings
- Run docker compose up -d
- Open the web UI at http://127.0.0.1:8000 and create the first admin account
- Set PAPERLESS_OCR_LANGUAGE=deu+eng and PAPERLESS_OCR_LANGUAGES=pol in docker‑compose.env
- Drop files into ./consume or configure IMAP rules
- Export documents with document_exporter --passphrase
- Upgrade by changing image tags and running docker compose up -d
证据
The official compose files get you running, but they leave three traps for a new install.
Start from the official docker-compose.postgres-tika.yml, pin every image tag, bind the port to 127.0.0.1:8000, and put a random PAPERLESS_SECRET_KEY and database password in a .env file.
Open the web UI right away. The first account you sign up with becomes the superuser.
- 记录日期: 2026-10-18T07:56:21.578Z