paperless-ngx

by alexmorbo

Helm chartv0.2.0App 2.20.5MITVerified publisher

Paperless-ngx helm chart for Kubernetes - Document management system

About this chart

paperless-ngx

Paperless-ngx helm chart for Kubernetes - Document management system

Homepage: https://github.com/alexmorbo/helm-charts

Features

  • Paperless-ngx - Core document management system with OCR
  • Tika - Advanced document parsing (PDF, Office documents)
  • Gotenberg - Document conversion (HTML to PDF, Office to PDF)
  • Paperless-AI - AI-powered document tagging and classification
  • Valkey - Built-in Redis-compatible cache (optional)
  • PostgreSQL - Optional bundled database via the postgresql dependency
  • Flower - Celery task monitoring UI
  • Prometheus Monitoring - Exporters for Paperless and Valkey metrics
  • OIDC/SSO - Single sign-on integration (Keycloak, etc.)

Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│                              Ingress / Gateway API                           │
└─────────────────────────────────────────────────────────────────────────────┘
                    │                                    │
                    ▼                                    ▼
┌─────────────────────────────────┐    ┌─────────────────────────────────────┐
│         Paperless-ngx           │    │           Paperless-AI              │
│  ┌───────────┐ ┌─────────────┐  │    │  - AI tagging (OpenAI/Ollama)       │
│  │  Web UI   │ │  REST API   │  │    │  - Document classification          │
│  └───────────┘ └─────────────┘  │    │  - Chat with documents              │
│  ┌───────────┐ ┌─────────────┐  │    └─────────────────────────────────────┘
│  │  Celery   │ │   Flower    │  │
│  │  Workers  │ │  (optional) │  │
│  └───────────┘ └─────────────┘  │
└─────────────────────────────────┘
         │              │
         ▼              ▼
┌─────────────┐  ┌─────────────┐  ┌─────────────┐
│    Tika     │  │  Gotenberg  │  │   Valkey    │
│  (optional) │  │  (optional) │  │  (optional) │
└─────────────┘  └─────────────┘  └─────────────┘
         │
         ▼
┌─────────────────────────────────┐
│ External or bundled PostgreSQL  │
│    (`postgresql` subchart)    │
└─────────────────────────────────┘

Components

Core Components

ComponentDescriptionDefault
Paperless-ngxDocument management system with OCREnabled
ValkeyRedis-compatible in-memory cacheEnabled
PostgreSQLDatabase, optionally deployed via the postgresql dependencyDisabled

Optional Components

ComponentDescriptionEnable with
TikaApache Tika for advanced document parsingtika.enabled=true
GotenbergDocument conversion servicegotenberg.enabled=true
Paperless-AIAI-powered document processingpaperlessAi.enabled=true
FlowerCelery monitoring UIflower.enabled=true
PostgreSQLBundled PostgreSQL databasepostgresql.enabled=true

Monitoring Stack

ComponentDescriptionEnable with
Paperless ExporterPrometheus metrics for Paperless-ngxmonitoring.enabled=true
Valkey ExporterPrometheus metrics for Valkey/Redismonitoring.enabled=true
ServiceMonitor/VMServiceScrapeAuto-discovery for Prometheus/VictoriaMetricsmonitoring.enabled=true

Install

helm install paperless-ngx oci://ghcr.io/alexmorbo/helm-charts/paperless-ngx

Quick Start

PostgreSQL options

By default, this chart expects an existing PostgreSQL database. The app.database.* configuration is active when postgresql.enabled=false. Alternatively, enable the bundled CloudPirates PostgreSQL dependency:

postgresql:
  enabled: true

When postgresql.enabled=true and app.database.host is empty, the chart derives the Paperless database connection from the PostgreSQL dependency:

  • PAPERLESS_DBHOST from the PostgreSQL dependency fullname
  • PAPERLESS_DBPORT from postgresql.service.port, defaulting to 5432
  • PAPERLESS_DBNAME from postgresql.customUser.database
  • PAPERLESS_DBUSER from postgresql.customUser.name
  • PAPERLESS_DBPASS from the Secret named <postgresql fullname>-custom-user-credentials, using the key configured by postgresql.customUser.secretKeys.password; by default this key is CUSTOM_PASSWORD

Database password Secret precedence:

  1. If app.database.existingSecret is set, it is always used.
  2. Else if postgresql.enabled=true, the chart uses the bundled PostgreSQL custom-user Secret, normally <postgresql fullname>-custom-user-credentials with key CUSTOM_PASSWORD.
  3. Else if app.database.password is set, this chart creates and uses its own db-password Secret.
  4. Else no PAPERLESS_DBPASS environment variable is rendered.

The bundled PostgreSQL dependency is disabled by default to avoid changing existing installs. The chart pins PostgreSQL to an upstream-supported major version via postgresql.image.tag until paperless-ngx validates newer PostgreSQL releases.

Minimal Installation with external PostgreSQL

# values.yaml
app:
  url: "https://paperless.example.com"
  database:
    host: "postgres.example.com"
    existingSecret: "paperless-db-secret"
  # Or set postgresql.enabled=true to deploy the bundled database.

ingress:
  enabled: true
  hosts:
    - host: paperless.example.com
      paths:
        - path: /
          pathType: Prefix

Minimal Installation with bundled PostgreSQL

# values.yaml
app:
  url: "https://paperless.example.com"

postgresql:
  enabled: true

ingress:
  enabled: true
  hosts:
    - host: paperless.example.com
      paths:
        - path: /
          pathType: Prefix

Set a deterministic Paperless database password from CI if desired:

helm upgrade --install paperless-ngx oci://ghcr.io/alexmorbo/helm-charts/paperless-ngx \
  --set postgresql.customUser.password="$POSTGRES_PASSWORD"

Set postgresql.auth.password as well if you need a deterministic PostgreSQL superuser password.

Full Installation with All Features

# values.yaml
global:
  imageRegistry: "my-registry.example.com"  # Optional: private registry

app:
  url: "https://paperless.example.com"
  timeZone: "Europe/Moscow"
  ocrLanguages: ["rus", "eng", "deu"]
  database:
    host: "postgres.example.com"
    existingSecret: "paperless-db-secret"
  oidc:
    enabled: true
    serverUrl: "https://keycloak.example.com/realms/main"
    existingSecret: "paperless-oidc-secret"

tika:
  enabled: true

gotenberg:
  enabled: true

paperlessAi:
  enabled: true
  provider: "openai"
  openai:
    existingSecret: "openai-secret"

monitoring:
  enabled: true
  type: VMServiceScrape  # or ServiceMonitor for Prometheus

ingress:
  enabled: true
  ingressClassName: nginx
  hosts:
    - host: paperless.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: paperless-tls
      hosts:
        - paperless.example.com

Monitoring

When monitoring.enabled=true, the chart automatically:

  1. Creates a monitoring user in Paperless-ngx with view permissions
  2. Generates an API token stored in <release>-monitoring-api-token secret
  3. Deploys Paperless exporter (port 8081)
  4. Deploys Valkey exporter (port 9121) if Valkey is enabled
  5. Creates ServiceMonitor/VMServiceScrape resources

Available Metrics

Paperless Exporter:

  • paperless_documents_total - Total documents count
  • paperless_documents_inbox - Documents in inbox
  • paperless_task_* - Task/job statistics
  • paperless_correspondent_* - Correspondent statistics
  • paperless_tag_* - Tag statistics

Valkey Exporter:

  • Standard Redis metrics (redis_*)
  • Memory, connections, commands statistics

Custom Token

To use an existing API token instead of auto-generated:

monitoring:
  enabled: true
  paperlessExporter:
    existingSecret: "my-paperless-token"
    secretKey: "token"

Image Registry

All components support global.imageRegistry for private registries:

global:
  imageRegistry: "my-registry.example.com"

This affects:

  • Paperless-ngx (ghcr.io/paperless-ngx/paperless-ngx)
  • Tika (docker.io/apache/tika)
  • Gotenberg (docker.io/gotenberg/gotenberg)
  • Paperless-AI (docker.io/clusterzx/paperless-ai)
  • Paperless Exporter (ghcr.io/hansmi/prometheus-paperless-exporter)
  • Valkey Exporter (docker.io/oliver006/redis_exporter)
  • kubectl (docker.io/alpine/kubectl)

Maintainers

NameEmailUrl
AlexMorbo[email protected]

Source Code

Requirements

Kubernetes: >=1.23.0-0

RepositoryNameVersion
https://valkey.io/valkey-helm/valkey0.x.x
oci://registry-1.docker.io/cloudpiratespostgresql(postgres)~0.19.0

Values

KeyTypeDefaultDescription
affinityobject{}
app.csrfTrustedOriginsstring""CSRF trusted origins (comma-separated, defaults to app.url if set)
app.databaseobject{"existingSecret":"","existingSecretKey":"password","host":"","name":"paperless","password":"","port":5432,"sslmode":"prefer","user":"paperless"}Database configuration
app.dateOrderstring"DMY"Date order for parsing: DMY, MDY, YMD
app.filenameFormatstring""Filename format template
app.filenameFormatRemoveNonebooltrueRemove 'none' placeholders from filename
app.ocrLanguageslist[]OCR languages to install and use (e.g., ["rus", "eng", "deu"]) First language is primary. English is always included.
app.ocrModestring"skip"OCR mode: skip (default), redo, force
app.oidcobject{"clientId":"","clientIdKey":"client-id","clientSecret":"","clientSecretKey":"client-secret","disableRegularLogin":false,"displayName":"SSO Login","enabled":false,"existingSecret":"","providerId":"keycloak","redirectLoginToSSO":false,"serverUrl":""}OIDC/SSO configuration
app.taskWorkersint1Number of task workers
app.threadsPerWorkerint1Threads per worker
app.timeZonestring""Timezone (e.g., Europe/Moscow, UTC)
app.urlstring""Public URL of paperless-ngx (e.g., https://paperless.example.com)
app.valkeyobject{"enabled":true,"prefix":""}Built-in Valkey (Redis)
app.valkey.prefixstring""Prefix for Redis keys
app.valkeyExternalobject{"existingSecret":"","existingSecretKey":"url","url":""}External Valkey/Redis (when app.valkey.enabled=false)
extraEnvlist[]Environment variables to add to the pods

Deploy paperless-ngx with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has paperless-ngx on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpaperless-ngx is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply