Self-hosting Paperless-ngx on k3s with GitOps
Описание и применение
Самостоятельный хостинг Paperless-ngx на k3s с GitOps: локальное хранение документов на внешнем HDD, OCR и тегирование, доступ с телефона, автоматизация через Flux.
Задача
Need a local document archive that can OCR, tag, and be accessed from a phone without relying on cloud storage.
Результат
A fully self-hosted, GitOps-managed Paperless-ngx instance on a single-node k3s cluster, with documents stored on an external HDD and accessible from a phone via OCR-enabled scanning.
Рабочий процесс
- Format external HDD as ext4 and mount it by UUID
- Create directories and set ownership for Paperless
- Configure k3s to wait for mount via systemd unit
- Define StorageClass and PersistentVolume for HDD media
- Bind PVC to PV
- Deploy Paperless-ngx stack via Kubernetes manifests
- Resolve k3s errors (port conflict, IP registration, missing folders, service link env var, CSRF origins)
- Set up Flux bootstrap and GitOps repo layout
- Encrypt secrets with SOPS + age and configure Flux decryption
- Annotate resources to prevent prune deletion
- Push configuration changes to GitHub to trigger deployments
Доказательства
I ended up with Paperless-ngx running on k3s on a Beelink mini PC.
enableServiceLinks: false
PAPERLESS_CSRF_TRUSTED_ORIGINS=http://paperless.192.168.1.50.nip.io,https://paperless.192.168.1.50.nip.io
- Дата записи: 2026-10-27T10:26:49.908Z