paperless-ngx
by alexmorbo
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
postgresqldependency - 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
| Component | Description | Default |
|---|---|---|
| Paperless-ngx | Document management system with OCR | Enabled |
| Valkey | Redis-compatible in-memory cache | Enabled |
| PostgreSQL | Database, optionally deployed via the postgresql dependency | Disabled |
Optional Components
| Component | Description | Enable with |
|---|---|---|
| Tika | Apache Tika for advanced document parsing | tika.enabled=true |
| Gotenberg | Document conversion service | gotenberg.enabled=true |
| Paperless-AI | AI-powered document processing | paperlessAi.enabled=true |
| Flower | Celery monitoring UI | flower.enabled=true |
| PostgreSQL | Bundled PostgreSQL database | postgresql.enabled=true |
Monitoring Stack
| Component | Description | Enable with |
|---|---|---|
| Paperless Exporter | Prometheus metrics for Paperless-ngx | monitoring.enabled=true |
| Valkey Exporter | Prometheus metrics for Valkey/Redis | monitoring.enabled=true |
| ServiceMonitor/VMServiceScrape | Auto-discovery for Prometheus/VictoriaMetrics | monitoring.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_DBHOSTfrom the PostgreSQL dependency fullnamePAPERLESS_DBPORTfrompostgresql.service.port, defaulting to5432PAPERLESS_DBNAMEfrompostgresql.customUser.databasePAPERLESS_DBUSERfrompostgresql.customUser.namePAPERLESS_DBPASSfrom the Secret named<postgresql fullname>-custom-user-credentials, using the key configured bypostgresql.customUser.secretKeys.password; by default this key isCUSTOM_PASSWORD
Database password Secret precedence:
- If
app.database.existingSecretis set, it is always used. - Else if
postgresql.enabled=true, the chart uses the bundled PostgreSQL custom-user Secret, normally<postgresql fullname>-custom-user-credentialswith keyCUSTOM_PASSWORD. - Else if
app.database.passwordis set, this chart creates and uses its owndb-passwordSecret. - Else no
PAPERLESS_DBPASSenvironment 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:
- Creates a
monitoringuser in Paperless-ngx with view permissions - Generates an API token stored in
<release>-monitoring-api-tokensecret - Deploys Paperless exporter (port 8081)
- Deploys Valkey exporter (port 9121) if Valkey is enabled
- Creates ServiceMonitor/VMServiceScrape resources
Available Metrics
Paperless Exporter:
paperless_documents_total- Total documents countpaperless_documents_inbox- Documents in inboxpaperless_task_*- Task/job statisticspaperless_correspondent_*- Correspondent statisticspaperless_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
| Name | Url | |
|---|---|---|
| AlexMorbo | [email protected] |
Source Code
Requirements
Kubernetes: >=1.23.0-0
| Repository | Name | Version |
|---|---|---|
| https://valkey.io/valkey-helm/ | valkey | 0.x.x |
| oci://registry-1.docker.io/cloudpirates | postgresql(postgres) | ~0.19.0 |
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | |
| app.csrfTrustedOrigins | string | "" | CSRF trusted origins (comma-separated, defaults to app.url if set) |
| app.database | object | {"existingSecret":"","existingSecretKey":"password","host":"","name":"paperless","password":"","port":5432,"sslmode":"prefer","user":"paperless"} | Database configuration |
| app.dateOrder | string | "DMY" | Date order for parsing: DMY, MDY, YMD |
| app.filenameFormat | string | "" | Filename format template |
| app.filenameFormatRemoveNone | bool | true | Remove 'none' placeholders from filename |
| app.ocrLanguages | list | [] | OCR languages to install and use (e.g., ["rus", "eng", "deu"]) First language is primary. English is always included. |
| app.ocrMode | string | "skip" | OCR mode: skip (default), redo, force |
| app.oidc | object | {"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.taskWorkers | int | 1 | Number of task workers |
| app.threadsPerWorker | int | 1 | Threads per worker |
| app.timeZone | string | "" | Timezone (e.g., Europe/Moscow, UTC) |
| app.url | string | "" | Public URL of paperless-ngx (e.g., https://paperless.example.com) |
| app.valkey | object | {"enabled":true,"prefix":""} | Built-in Valkey (Redis) |
| app.valkey.prefix | string | "" | Prefix for Redis keys |
| app.valkeyExternal | object | {"existingSecret":"","existingSecretKey":"url","url":""} | External Valkey/Redis (when app.valkey.enabled=false) |
| extraEnv | list | [] | 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartpaperless-ngx is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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