umami

by christianhuth

Helm chartv8.2.0App 3.5.0Verified publisher

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

KeyTypeDefaultDescription
affinityobject{}Affinity settings for pod assignment
autoscaling.enabledboolfalseEnable Horizontal POD autoscaling
autoscaling.maxReplicasint100Maximum number of replicas
autoscaling.minReplicasint1Minimum number of replicas
autoscaling.targetCPUUtilizationPercentageint80Target CPU utilization percentage
autoscaling.targetMemoryUtilizationPercentageint80Target Memory utilization percentage
database.databaseUrlKeystring""Key in the existing secret containing the database url
database.existingSecretstring""Name of an existing Secret containing the complete database URL (postgresql://...). Takes precedence over postgresql.* and externalDatabase.*.
deploymentStrategyobject{}Update strategy for the deployment
externalDatabase.databasestring"umami"Name of the database to use
externalDatabase.existingSecretstring""Name of an existing Secret containing the password of the user. The password must only contain URL-safe characters.
externalDatabase.existingSecretPasswordKeystring"password"Key in the existing Secret containing the password
externalDatabase.hostnamestring""Hostname of the external PostgreSQL database. Used if postgresql.enabled is false.
externalDatabase.passwordstring""Password of the user. Ignored if externalDatabase.existingSecret is set. Must only contain URL-safe characters.
externalDatabase.portint5432Port of the external PostgreSQL database
externalDatabase.usernamestring"umami"Name of the user to use
extraEnvlist[]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.
fullnameOverridestring""String to fully override "umami.fullname"
image.pullPolicystring"Always"image pull policy
image.registrystring"ghcr.io"image registry
image.repositorystring"umami-software/umami"image repository
image.tagstring"3.5.0"Overrides the image tag
imagePullSecretslist[]If defined, uses a Secret to pull an image from a private Docker registry or repository.
ingress.annotationsobject{}Additional annotations for the Ingress resource
ingress.classNamestring""IngressClass that will be be used to implement the Ingress
ingress.enabledboolfalseEnable ingress record generation
ingress.hostslistsee values.yamlAn array with hosts and paths
ingress.tlslist[]An array with the tls configuration
initContainersobject{}define additional init containers
livenessProbe.failureThresholdint3Failure threshold for livenessProbe
livenessProbe.httpGet.pathstring"/"Path for livenessProbe
livenessProbe.initialDelaySecondsint15Initial delay seconds for livenessProbe
livenessProbe.periodSecondsint10Period seconds for livenessProbe
livenessProbe.successThresholdint1Success threshold for livenessProbe
livenessProbe.timeoutSecondsint1Timeout seconds for livenessProbe
nameOverridestring""Provide a name in place of umami
nodeSelectorobject{}Node labels for pod assignment
podAnnotationsobject{}Annotations to be added to pods
podLabelsobject{}Labels to be added to pods
podSecurityContextobject{}pod-level security context
postgresql.cluster.imageNamestring"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.imagePullPolicystring"Always"Pull the image on every start to get the latest minor version of the major version
postgresql.cluster.initdb.databasestring"umami"Name of the database to create
postgresql.cluster.initdb.ownerstring"umami"Name of the user owning the database
postgresql.cluster.instancesint3Number of PostgreSQL instances (one primary, the others are replicas)
postgresql.cluster.storage.sizestring"8Gi"Size of the PVC of each instance
postgresql.enabledbooltrueEnable a PostgreSQL cluster managed by the CloudNativePG operator. Requires the operator to be installed in the cluster (see README).
postgresql.version.postgresqlstring"18"PostgreSQL major version. Has to match the major version of postgresql.cluster.imageName.
readinessProbe.failureThresholdint3Failure threshold for readinessProbe
readinessProbe.httpGet.pathstring"/"Path for readinessProbe
readinessProbe.initialDelaySecondsint15Initial delay seconds for readinessProbe
readinessProbe.periodSecondsint10Period seconds for readinessProbe
readinessProbe.successThresholdint1Success threshold for readinessProbe
readinessProbe.timeoutSecondsint1Timeout seconds for readinessProbe
replicaCountint1Number of replicas
resourcesobject{}Resource limits and requests for the controller pods.
revisionHistoryLimitint10The number of old ReplicaSets to retain
route.main.additionalRuleslist[]Additional custom rules that can be added to the route
route.main.annotationsobject{}Add annotations to the route
route.main.apiVersionstring"gateway.networking.k8s.io/v1"Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1alpha2
route.main.enabledboolfalseEnables or disables the route
route.main.filterslist[]Filters define the filters that are applied to requests that match this rule.
route.main.hostnameslist[]Hostnames to be matched
route.main.httpsRedirectboolfalseadds 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.kindstring"HTTPRoute"Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute
route.main.labelsobject{}Add labels to the route
route.main.matcheslistsee values.yamldefine conditions used for matching the rule against incoming HTTP requests.
route.main.parentRefslist[]Parent references (Gateway)
route.main.timeoutsobject{}defines the timeouts that can be configured for an HTTP request
securityContextobject{"runAsGroup":65533,"runAsNonRoot":true,"runAsUser":1001}container-level security context
service.portint3000Kubernetes port where service is exposed
service.typestring"ClusterIP"Kubernetes service type
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
startupProbe.failureThresholdint30Failure threshold for startupProbe
startupProbe.httpGet.pathstring"/"Path for startupProbe
startupProbe.initialDelaySecondsint30Initial delay seconds for startupProbe
startupProbe.periodSecondsint10Period seconds for startupProbe
startupProbe.successThresholdint1Success threshold for startupProbe
startupProbe.timeoutSecondsint1Timeout seconds for startupProbe
tolerationslist[]Toleration labels for pod assignment
umami.appSecret.existingSecretstring""Name of an existing secret containing the app secret under the key app-secret.
umami.appSecret.secretstring""A random string used to generate unique values.
umami.clientIpHeaderstring""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.cloudModestring"0"Disables users, teams, and websites settings page.
umami.collectApiEndpointstring""Allows you to send metrics to a location different than the default /api/send. This is to help you avoid some ad-blockers.
umami.corsMaxAgestring"86400"How many seconds a CORS preflight should last. Default is 24 hours.
umami.customScript.datastring""The custom script
umami.customScript.enabledboolfalseCreate and mount a ConfigMap with a custom script
umami.customScript.keystring"script.js"Key in the ConfigMap
umami.customScript.mountPathstring"/app/public/script.js"The path to mount the custom script to
umami.debugstring""Console logging for specific areas of the application (DEBUG). Values include umami:auth, umami:clickhouse, umami:kafka, umami:middleware, and umami:prisma.
umami.disableBotCheckstring"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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartumami is pinned at v8.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