umami
Umami is a simple, fast, privacy-focused alternative to Google Analytics.
About this chart
umami
Umami is a simple, fast, privacy-focused alternative to Google Analytics.
TL;DR;
helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/umami
Or install it from the OCI registry:
helm install my-release oci://ghcr.io/christianhuth/helm-charts/umami
Introduction
Umami is a simple, fast, privacy-focused alternative to Google Analytics.
This chart bootstraps Umami on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.29+
- The CloudNativePG operator if the bundled PostgreSQL database is used (
postgresql.enabled: true, the default)
Installing the CloudNativePG operator
The chart bundles a PostgreSQL cluster as a custom resource of the CloudNativePG operator (via the upstream chart cnpg/cluster). The operator itself is not part of this chart, as it is installed once per Kubernetes cluster:
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo update
helm upgrade --install cnpg cnpg/cloudnative-pg --namespace cnpg-system --create-namespace --wait
Installing the Chart
To install the chart with the release name my-release:
helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/umami
The chart is also published as an OCI artifact which can be installed like this:
helm install my-release oci://ghcr.io/christianhuth/helm-charts/umami
These commands deploy Umami on the Kubernetes cluster in the default configuration. The Values section lists the values that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall the my-release deployment:
helm uninstall my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuring the Database
Umami (since v3) only supports PostgreSQL.
Bundled PostgreSQL with an existing Secret (recommended)
Create a Secret of type kubernetes.io/basic-auth containing the credentials of the database owner. The username has to match postgresql.cluster.initdb.owner:
kubectl create secret generic umami-database \
--type=kubernetes.io/basic-auth \
--from-literal=username=umami \
--from-literal=password='<password>'
postgresql:
cluster:
initdb:
database: umami
owner: umami
secret:
name: umami-database
Umami receives the password as part of its database URL, so it must only contain URL-safe characters (A-Z, a-z, 0-9, -, ., _, ~). If no Secret is referenced, the operator generates a random password and Umami uses the connection URI from the generated Secret <release>-postgresql-app. All other settings of the PostgreSQL cluster (e.g. postgresql.cluster.instances, postgresql.cluster.storage, backups) are passed to the upstream chart. See its values for all options.
External PostgreSQL
postgresql:
enabled: false
externalDatabase:
hostname: postgresql.example.com
port: 5432
database: umami
username: umami
existingSecret: umami-database
existingSecretPasswordKey: password
Instead of externalDatabase.existingSecret you can set externalDatabase.password, which lets the chart create the Secret. As for the bundled database, the password must only contain URL-safe characters. Alternatively, provide the complete database URL (e.g. with additional connection parameters) in a Secret referenced by database.existingSecret (key database.databaseUrlKey, default database-url).
Two-Factor Authentication
Umami v3 supports two-factor authentication, which requires a 256-bit key to encrypt the secrets of the users:
kubectl create secret generic umami-two-factor --from-literal=two-factor-encryption-key="$(openssl rand -hex 32)"
umami:
twoFactor:
existingSecret: umami-two-factor
Keep the key: without it, the two-factor secrets of the users can no longer be decrypted.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity settings for pod assignment |
| autoscaling.enabled | bool | false | Enable Horizontal POD autoscaling |
| autoscaling.maxReplicas | int | 100 | Maximum number of replicas |
| autoscaling.minReplicas | int | 1 | Minimum number of replicas |
| autoscaling.targetCPUUtilizationPercentage | int | 80 | Target CPU utilization percentage |
| autoscaling.targetMemoryUtilizationPercentage | int | 80 | Target Memory utilization percentage |
| database.databaseUrlKey | string | "" | Key in the existing secret containing the database url |
| database.existingSecret | string | "" | Name of an existing Secret containing the complete database URL (postgresql://...). Takes precedence over postgresql.* and externalDatabase.*. |
| deploymentStrategy | object | {} | Update strategy for the deployment |
| externalDatabase.database | string | "umami" | Name of the database to use |
| externalDatabase.existingSecret | string | "" | Name of an existing Secret containing the password of the user. The password must only contain URL-safe characters. |
| externalDatabase.existingSecretPasswordKey | string | "password" | Key in the existing Secret containing the password |
| externalDatabase.hostname | string | "" | Hostname of the external PostgreSQL database. Used if postgresql.enabled is false. |
| externalDatabase.password | string | "" | Password of the user. Ignored if externalDatabase.existingSecret is set. Must only contain URL-safe characters. |
| externalDatabase.port | int | 5432 | Port of the external PostgreSQL database |
| externalDatabase.username | string | "umami" | Name of the user to use |
| extraEnv | list | [] | additional environment variables to be added to the pods. See https://umami.is/docs/environment-variables for a complete list of available variables. Most variables can be set under umami as well. |
| fullnameOverride | string | "" | String to fully override "umami.fullname" |
| image.pullPolicy | string | "Always" | image pull policy |
| image.registry | string | "ghcr.io" | image registry |
| image.repository | string | "umami-software/umami" | image repository |
| image.tag | string | "3.5.0" | Overrides the image tag |
| imagePullSecrets | list | [] | If defined, uses a Secret to pull an image from a private Docker registry or repository. |
| ingress.annotations | object | {} | Additional annotations for the Ingress resource |
| ingress.className | string | "" | IngressClass that will be be used to implement the Ingress |
| ingress.enabled | bool | false | Enable ingress record generation |
| ingress.hosts | list | see values.yaml | An array with hosts and paths |
| ingress.tls | list | [] | An array with the tls configuration |
| initContainers | object | {} | define additional init containers |
| livenessProbe.failureThreshold | int | 3 | Failure threshold for livenessProbe |
| livenessProbe.httpGet.path | string | "/" | Path for livenessProbe |
| livenessProbe.initialDelaySeconds | int | 15 | Initial delay seconds for livenessProbe |
| livenessProbe.periodSeconds | int | 10 | Period seconds for livenessProbe |
| livenessProbe.successThreshold | int | 1 | Success threshold for livenessProbe |
| livenessProbe.timeoutSeconds | int | 1 | Timeout seconds for livenessProbe |
| nameOverride | string | "" | Provide a name in place of umami |
| nodeSelector | object | {} | Node labels for pod assignment |
| podAnnotations | object | {} | Annotations to be added to pods |
| podLabels | object | {} | Labels to be added to pods |
| podSecurityContext | object | {} | pod-level security context |
| postgresql.cluster.imageName | string | "ghcr.io/cloudnative-pg/postgresql:18-standard-trixie" | PostgreSQL image. The tag only pins the major version, so restarted instances get the latest minor version. |
| postgresql.cluster.imagePullPolicy | string | "Always" | Pull the image on every start to get the latest minor version of the major version |
| postgresql.cluster.initdb.database | string | "umami" | Name of the database to create |
| postgresql.cluster.initdb.owner | string | "umami" | Name of the user owning the database |
| postgresql.cluster.instances | int | 3 | Number of PostgreSQL instances (one primary, the others are replicas) |
| postgresql.cluster.storage.size | string | "8Gi" | Size of the PVC of each instance |
| postgresql.enabled | bool | true | Enable a PostgreSQL cluster managed by the CloudNativePG operator. Requires the operator to be installed in the cluster (see README). |
| postgresql.version.postgresql | string | "18" | PostgreSQL major version. Has to match the major version of postgresql.cluster.imageName. |
| readinessProbe.failureThreshold | int | 3 | Failure threshold for readinessProbe |
| readinessProbe.httpGet.path | string | "/" | Path for readinessProbe |
| readinessProbe.initialDelaySeconds | int | 15 | Initial delay seconds for readinessProbe |
| readinessProbe.periodSeconds | int | 10 | Period seconds for readinessProbe |
| readinessProbe.successThreshold | int | 1 | Success threshold for readinessProbe |
| readinessProbe.timeoutSeconds | int | 1 | Timeout seconds for readinessProbe |
| replicaCount | int | 1 | Number of replicas |
| resources | object | {} | Resource limits and requests for the controller pods. |
| revisionHistoryLimit | int | 10 | The number of old ReplicaSets to retain |
| route.main.additionalRules | list | [] | Additional custom rules that can be added to the route |
| route.main.annotations | object | {} | Add annotations to the route |
| route.main.apiVersion | string | "gateway.networking.k8s.io/v1" | Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1alpha2 |
| route.main.enabled | bool | false | Enables or disables the route |
| route.main.filters | list | [] | Filters define the filters that are applied to requests that match this rule. |
| route.main.hostnames | list | [] | Hostnames to be matched |
| route.main.httpsRedirect | bool | false | adds a filter for redirecting to https (HTTP 301 Moved Permanently). To redirect HTTP traffic to HTTPS, you need to have a Gateway with both HTTP and HTTPS listeners. Matches and filters do not take effect if enabled. Ref. https://gateway-api.sigs.k8s.io/guides/http-redirect-rewrite/ |
| route.main.kind | string | "HTTPRoute" | Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute |
| route.main.labels | object | {} | Add labels to the route |
| route.main.matches | list | see values.yaml | define conditions used for matching the rule against incoming HTTP requests. |
| route.main.parentRefs | list | [] | Parent references (Gateway) |
| route.main.timeouts | object | {} | defines the timeouts that can be configured for an HTTP request |
| securityContext | object | {"runAsGroup":65533,"runAsNonRoot":true,"runAsUser":1001} | container-level security context |
| service.port | int | 3000 | Kubernetes port where service is exposed |
| service.type | string | "ClusterIP" | Kubernetes service type |
| serviceAccount.annotations | object | {} | Annotations to add to the service account |
| serviceAccount.create | bool | true | Specifies whether a service account should be created |
| serviceAccount.name | string | "" | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| startupProbe.failureThreshold | int | 30 | Failure threshold for startupProbe |
| startupProbe.httpGet.path | string | "/" | Path for startupProbe |
| startupProbe.initialDelaySeconds | int | 30 | Initial delay seconds for startupProbe |
| startupProbe.periodSeconds | int | 10 | Period seconds for startupProbe |
| startupProbe.successThreshold | int | 1 | Success threshold for startupProbe |
| startupProbe.timeoutSeconds | int | 1 | Timeout seconds for startupProbe |
| tolerations | list | [] | Toleration labels for pod assignment |
| umami.appSecret.existingSecret | string | "" | Name of an existing secret containing the app secret under the key app-secret. |
| umami.appSecret.secret | string | "" | A random string used to generate unique values. |
| umami.clientIpHeader | string | "" | HTTP header to check for the client's IP address. This is useful when you're behind a proxy that uses non-standard headers. |
| umami.cloudMode | string | "0" | Disables users, teams, and websites settings page. |
| umami.collectApiEndpoint | string | "" | Allows you to send metrics to a location different than the default /api/send. This is to help you avoid some ad-blockers. |
| umami.corsMaxAge | string | "86400" | How many seconds a CORS preflight should last. Default is 24 hours. |
| umami.customScript.data | string | "" | The custom script |
| umami.customScript.enabled | bool | false | Create and mount a ConfigMap with a custom script |
| umami.customScript.key | string | "script.js" | Key in the ConfigMap |
| umami.customScript.mountPath | string | "/app/public/script.js" | The path to mount the custom script to |
| umami.debug | string | "" | Console logging for specific areas of the application (DEBUG). Values include umami:auth, umami:clickhouse, umami:kafka, umami:middleware, and umami:prisma. |
| umami.disableBotCheck | string | "1" | By default bots |
Deploy umami with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has umami 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 chartumami is pinned at v8.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