Skip to content
Matomo icon
v2.6.2App: v5.14.3Pinned DigestS3 Backup Ready

Production Helm chart • Apache-2.0 • Zero-Root • Verified on Kubernetes v1.33-v1.36+

Matomo

Privacy-focused web analytics platform with MySQL and production archiving support.

Installation

helm repo add helmforge https://repo.helmforge.dev
helm install matomo helmforge/matomo
helm install matomo oci://ghcr.io/helmforgedev/helm/matomo

Features

  • Official Matomo Apache image pinned to 5.14.3-apache.
  • Bundled HelmForge MySQL 2.4.2 subchart for simple deployments.
  • External MySQL/MariaDB mode for production.
  • CronJob-based core:archive execution.
  • Persistent Matomo application volume.
  • Automatic synchronization of image code into the persistent application volume.
  • Ingress and Gateway API HTTPRoute support.
  • NetworkPolicy, ServiceMonitor, dual-stack Service fields.
  • External Secrets integration for database passwords.

Matomo 5.14.3 is the current stable production release. Review the 5.14.3 changelog, and back up the database and persistent application volume before production rollout so the native updater can be rolled back together with its data. The release contains no major database upgrade.

Matomo 5.14.2 also carries an upstream security notice for two critical PHP vulnerabilities. The pinned image contains PHP 8.4.27, which includes the upstream fixes. Deploy the new tag instead of relying on a mutable rebuild of an older Matomo tag that a Kubernetes node may already have cached.

Quick Start

matomo:
  siteUrl: http://matomo.local
mysql:
  enabled: true

Production Example

mysql:
  enabled: false
database:
  mode: external
  external:
    host: mysql.prod.svc.cluster.local
    name: matomo
    username: matomo
    existingSecret: matomo-database
matomo:
  siteUrl: https://analytics.example.com
archiver:
  enabled: true
  schedule: "5 * * * *"
ingress:
  enabled: true
  ingressClassName: nginx
  hosts:
    - host: analytics.example.com

Upgrades

Before upgrading from chart 2.4.x or earlier, move every retained value under mysql.primary to the equivalent mysql.standalone path. The bundled HelmForge MySQL dependency no longer reads mysql.primary; the chart now fails with an explicit migration message instead of silently ignoring those values. For example, migrate mysql.primary.persistence.size to mysql.standalone.persistence.size.

Do not upgrade from chart 2.4.x with --reuse-values or --reset-then-reuse-values. Those options retain the obsolete mysql.primary path, while --reuse-values can also omit the newer networkPolicy parent map and make template rendering fail at .Values.networkPolicy.enabled. Export the release overrides with (umask 077 && touch retained-values.yaml && chmod 600 retained-values.yaml && helm get values RELEASE -n NAMESPACE -o yaml > retained-values.yaml) so the file has owner-only permissions before Helm writes to it, even if it already exists. In that file, move every mysql.primary setting to the equivalent mysql.standalone path and remove the mysql.primary map. On Helm versions that support --hide-secret, preview with helm upgrade RELEASE helmforge/matomo -n NAMESPACE --reset-values -f retained-values.yaml --dry-run --hide-secret. Then perform the actual upgrade, without either preview-only flag, with helm upgrade RELEASE helmforge/matomo -n NAMESPACE --reset-values -f retained-values.yaml. Use this migrated-file upgrade procedure for every affected release, regardless of Helm version. If --hide-secret is unavailable, skip the preview rather than expose rendered Secret manifests. Run previews only in a trusted environment and keep any remaining sensitive output out of logs. Use an equivalent owner-only creation method on non-POSIX systems and remove retained-values.yaml immediately after the upgrade.

The official image keeps its release code under /usr/src/matomo, while this chart persists /var/www/html. The sync-matomo-code init container copies the release files into the persistent volume on every web pod start, so changing image.tag also changes the code Matomo executes. The copy is additive: it overwrites files shipped by the image but retains PVC-only files such as config/config.ini.php, installed plugins, and misc/user content.

The sync archives the entries inside /usr/src/matomo rather than the source directory itself, and preserves metadata on directories that already exist in the volume. This allows the init container to run as a non-root UID when the volume is writable through podSecurityContext.fsGroup; it does not need to change the ownership, mode, or timestamps of the volume root.

The Deployment defaults to updateStrategy.type=Recreate, ensuring the old web pod is stopped before the new init container changes application files. Plan a brief maintenance window for image upgrades. Override this only when application code is not shared with a serving pod during rollout.

Back up the database and PVC before changing image.tag. After the pod is running with the new code, apply any required database migrations during the planned maintenance window:

kubectl exec -n matomo deploy/matomo -- php /var/www/html/console core:update --yes --no-interaction

Set persistence.codeSync.enabled=false only when application files are managed outside the image lifecycle.

The Apache image listens on containerPorts.http. For a custom port, the chart copies the packaged Apache configuration to a writable temporary directory and changes the real listener before startup. FPM images require an HTTP sidecar; set webServer.mode=external and make that sidecar listen on the named target port. See ci/fpm-sidecar-values.yaml for the maintained nginx example.

Configuration

Official Schema

Values & Configuration Reference

All schema parameters, types, defaults, and allowed values are extracted directly from the chart repository. Filter and search them in the interactive reference below or customize in Values Studio.

View Values Schema

Examples

Architecture Guides

Troubleshooting

Symptom Check Resolution
Web Pod is not Ready after a port override Compare listener, target port, and serving mode Use apache for the Apache image; use external only with an HTTP sidecar.
Installer cannot connect to the database Inspect database mode, Secret, and endpoints Provide database-password and verify host/port reachability.
Upgrade still reports an old Matomo version Inspect the effective Pod image and files on the application PVC Deploy the new immutable image tag and keep persistence.codeSync.enabled=true.
Reports are slow or stale Inspect the archiver CronJob and recent Jobs Keep archiver.enabled=true, validate job completion, and tune the schedule.
Multiple replicas cannot mount storage Inspect PVC access mode and Pod scheduling events Use storage that supports the topology or keep one web replica with ReadWriteOnce.

Operational procedures are documented in the production, networking, and External Secrets guides.

Security Scan

Security Scan: matomo

Framework Score
MITRE + NSA + SOC2 84.783554%

Security posture acceptable.

Local details:

  • Tool: Kubescape v4.0.9
  • Command: kubescape scan framework mitre,nsa,soc2 .tmp/matomo-render.yaml
  • Result: 0 critical failed resources, resource summary score 84.783554%.

Research Notes

Matomo production guidance requires MySQL or MariaDB, persistent application files, scheduled report archiving, and careful reverse proxy handling. The chart keeps these operational concerns explicit rather than hiding them behind a minimal deployment.

System Architecture

DESIGN.md Synced

Verified architecture contract rendered dynamically from GitHub DESIGN.md

flowchart LR
  Client[Browser and tracking clients]
  Exposure[Ingress or HTTPRoute]
  Service[Matomo Service]
  Web[Matomo web Pod]
  Sync[Code sync init container]
  PVC[(Application PVC)]
  Archive[Archiver CronJob]
  Database[(MySQL or MariaDB)]
  ESO[External Secrets Operator]
  Secret[Database Secret]
  Monitor[ServiceMonitor]

  Client --> Exposure --> Service --> Web
  Client --> Service
  Sync --> PVC
  Web --> PVC
  Archive --> PVC
  Web --> Database
  Archive --> Database
  ESO --> Secret
  Secret --> Web
  Secret --> Archive
  Monitor -. HTTP availability .-> Service
Official Contractvalues.schema.json

Matomo Values Schema Reference

Official schema parameters, default values, and types extracted directly from the chart repository.

136 parametersValues Studio

Global(1)

ParameterTypeDefaultDescription
globalobject-Global settings shared by the chart.

Name Override(1)

ParameterTypeDefaultDescription
nameOverridestring-Chart configuration parameter

Fullname Override(1)

ParameterTypeDefaultDescription
fullnameOverridestring-Chart configuration parameter

Namespace Override(1)

ParameterTypeDefaultDescription
namespaceOverridestring-Chart configuration parameter

Cluster Domain(1)

ParameterTypeDefaultDescription
clusterDomainstring-Chart configuration parameter

Common Labels(1)

ParameterTypeDefaultDescription
commonLabelsobject-Chart configuration parameter

Common Annotations(1)

ParameterTypeDefaultDescription
commonAnnotationsobject-Chart configuration parameter

Replica Count(1)

ParameterTypeDefaultDescription
replicaCountinteger-Chart configuration parameter

Image(3)

ParameterTypeDefaultDescription
image.repositorystring-Chart configuration parameter
image.tagstring-Chart configuration parameter
image.pullPolicystring-Chart configuration parameter
Allowed:AlwaysIfNotPresentNever

Image Pull Secrets(1)

ParameterTypeDefaultDescription
imagePullSecretsarray-Chart configuration parameter

Matomo(4)

ParameterTypeDefaultDescription
matomo.siteUrlstring-Chart configuration parameter
matomo.trustedHoststring-Chart configuration parameter
matomo.extraEnvarray-Chart configuration parameter
matomo.extraEnvFromarray-Chart configuration parameter

Web Server(1)

ParameterTypeDefaultDescription
webServer.modestring-Chart configuration parameter
Allowed:apacheexternal

Database(13)

ParameterTypeDefaultDescription
database.modestring-Chart configuration parameter
Allowed:autoexternalmysql
database.waitForConnection.enabledboolean-Chart configuration parameter
database.waitForConnection.resourcesobject-Chart configuration parameter
database.waitForConnection.securityContextobject-Chart configuration parameter
database.waitForConnection.image.repositorystring-Chart configuration parameter
database.waitForConnection.image.tagstring-Chart configuration parameter
database.external.hoststring-Chart configuration parameter
database.external.portinteger-Chart configuration parameter
database.external.namestring-Chart configuration parameter
database.external.usernamestring-Chart configuration parameter
database.external.passwordstring-Chart configuration parameter
database.external.existingSecretstring-Chart configuration parameter
database.external.existingSecretPasswordKeystring-Chart configuration parameter

Mysql(10)

ParameterTypeDefaultDescription
mysql.enabledboolean-Chart configuration parameter
mysql.architecturestring-Chart configuration parameter
Allowed:standalonereplication
mysql.auth.databasestring-Chart configuration parameter
mysql.auth.usernamestring-Chart configuration parameter
mysql.auth.passwordstring-Chart configuration parameter
mysql.auth.rootPasswordstring-Chart configuration parameter
mysql.standalone.persistence.enabledboolean-Chart configuration parameter
mysql.standalone.persistence.sizestring-Chart configuration parameter
mysql.replication.source.persistence.enabledboolean-Chart configuration parameter
mysql.replication.source.persistence.sizestring-Chart configuration parameter

Persistence(8)

ParameterTypeDefaultDescription
persistence.enabledboolean-Chart configuration parameter
persistence.storageClassstring-Chart configuration parameter
persistence.accessModestring-Chart configuration parameter
persistence.sizestring-Chart configuration parameter
persistence.existingClaimstring-Chart configuration parameter
persistence.annotationsobject-Chart configuration parameter
persistence.codeSync.enabledboolean-Chart configuration parameter
persistence.codeSync.resourcesobject-Chart configuration parameter

Archiver(15)

ParameterTypeDefaultDescription
archiver.enabledboolean-Chart configuration parameter
archiver.schedulestring-Chart configuration parameter
archiver.concurrencyPolicystring-Chart configuration parameter
Allowed:AllowForbidReplace
archiver.successfulJobsHistoryLimitinteger-Chart configuration parameter
archiver.failedJobsHistoryLimitinteger-Chart configuration parameter
archiver.activeDeadlineSecondsinteger-Chart configuration parameter
archiver.extraArgsarray-Chart configuration parameter
archiver.resources.requests.cpustringnumber-Chart configuration parameter
archiver.resources.requests.memorystringnumber-Chart configuration parameter
archiver.resources.limits.cpustringnumber-Chart configuration parameter
archiver.resources.limits.memorystringnumber-Chart configuration parameter
archiver.sameNodeAsMatomoboolean-Chart configuration parameter
archiver.nodeSelectorobject-Chart configuration parameter
archiver.tolerationsarray-Chart configuration parameter
archiver.affinityobject-Chart configuration parameter

Php(1)

ParameterTypeDefaultDescription
php.inistring-Chart configuration parameter

Container Ports(1)

ParameterTypeDefaultDescription
containerPorts.httpinteger-Chart configuration parameter

Service & Networking(5)

ParameterTypeDefaultDescription
service.typestring-Chart configuration parameter
service.portinteger-Chart configuration parameter
service.annotationsobject-Chart configuration parameter
service.ipFamilyPolicystring-Chart configuration parameter
Allowed:SingleStackPreferDualStackRequireDualStack
service.ipFamiliesarray-Chart configuration parameter

Ingress(5)

ParameterTypeDefaultDescription
ingress.enabledboolean-Chart configuration parameter
ingress.ingressClassNamestring-Chart configuration parameter
ingress.annotationsobject-Chart configuration parameter
ingress.hostsarray-Chart configuration parameter
ingress.tlsarray-Chart configuration parameter

Gateway API(2)

ParameterTypeDefaultDescription
gatewayAPI.enabledboolean-Chart configuration parameter
gatewayAPI.httpRoutesarray-Chart configuration parameter

External Secrets(3)

ParameterTypeDefaultDescription
externalSecrets.enabledboolean-Chart configuration parameter
externalSecrets.refreshIntervalstring-Chart configuration parameter
externalSecrets.itemsarray-Chart configuration parameter

Metrics & Observability(5)

ParameterTypeDefaultDescription
metrics.serviceMonitor.enabledboolean-Chart configuration parameter
metrics.serviceMonitor.intervalstring-Chart configuration parameter
metrics.serviceMonitor.scrapeTimeoutstring-Chart configuration parameter
metrics.serviceMonitor.labelsobject-Chart configuration parameter
metrics.serviceMonitor.namespaceSelectorobject-Chart configuration parameter

Network Policy(6)

ParameterTypeDefaultDescription
networkPolicy.enabledboolean-Chart configuration parameter
networkPolicy.ingressFromarray-Chart configuration parameter
networkPolicy.egress.enabledboolean-Chart configuration parameter
networkPolicy.egress.allowDNSboolean-Chart configuration parameter
networkPolicy.egress.extraToarray-Chart configuration parameter
networkPolicy.egress.extraEgressarray-Chart configuration parameter

Pod Disruption Budget(3)

ParameterTypeDefaultDescription
podDisruptionBudget.enabledboolean-Chart configuration parameter
podDisruptionBudget.maxUnavailableany-Chart configuration parameter
podDisruptionBudget.minAvailableany-Chart configuration parameter

Update Strategy(1)

ParameterTypeDefaultDescription
updateStrategy.typestring-Chart configuration parameter
Allowed:RecreateRollingUpdate

Service Account(4)

ParameterTypeDefaultDescription
serviceAccount.createboolean-Chart configuration parameter
serviceAccount.namestring-Chart configuration parameter
serviceAccount.annotationsobject-Chart configuration parameter
serviceAccount.automountServiceAccountTokenboolean-Chart configuration parameter

Pod Security(1)

ParameterTypeDefaultDescription
podSecurityContextobject-Chart configuration parameter

Container Security(1)

ParameterTypeDefaultDescription
securityContextobject-Chart configuration parameter

Startup Probe(6)

ParameterTypeDefaultDescription
startupProbe.enabledboolean-Chart configuration parameter
startupProbe.pathstring-Chart configuration parameter
startupProbe.initialDelaySecondsinteger-Chart configuration parameter
startupProbe.periodSecondsinteger-Chart configuration parameter
startupProbe.timeoutSecondsinteger-Chart configuration parameter
startupProbe.failureThresholdinteger-Chart configuration parameter

Liveness Probe(6)

ParameterTypeDefaultDescription
livenessProbe.enabledboolean-Chart configuration parameter
livenessProbe.pathstring-Chart configuration parameter
livenessProbe.initialDelaySecondsinteger-Chart configuration parameter
livenessProbe.periodSecondsinteger-Chart configuration parameter
livenessProbe.timeoutSecondsinteger-Chart configuration parameter
livenessProbe.failureThresholdinteger-Chart configuration parameter

Readiness Probe(6)

ParameterTypeDefaultDescription
readinessProbe.enabledboolean-Chart configuration parameter
readinessProbe.pathstring-Chart configuration parameter
readinessProbe.initialDelaySecondsinteger-Chart configuration parameter
readinessProbe.periodSecondsinteger-Chart configuration parameter
readinessProbe.timeoutSecondsinteger-Chart configuration parameter
readinessProbe.failureThresholdinteger-Chart configuration parameter

Resources(4)

ParameterTypeDefaultDescription
resources.requests.cpustringnumber-Chart configuration parameter
resources.requests.memorystringnumber-Chart configuration parameter
resources.limits.cpustringnumber-Chart configuration parameter
resources.limits.memorystringnumber-Chart configuration parameter

Termination Grace Period Seconds(1)

ParameterTypeDefaultDescription
terminationGracePeriodSecondsinteger-Chart configuration parameter

Pod Labels(1)

ParameterTypeDefaultDescription
podLabelsobject-Chart configuration parameter

Pod Annotations(1)

ParameterTypeDefaultDescription
podAnnotationsobject-Chart configuration parameter

Priority Class Name(1)

ParameterTypeDefaultDescription
priorityClassNamestring-Chart configuration parameter

Node Selector(1)

ParameterTypeDefaultDescription
nodeSelectorobject-Chart configuration parameter

Tolerations(1)

ParameterTypeDefaultDescription
tolerationsarray-Chart configuration parameter

Affinity(1)

ParameterTypeDefaultDescription
affinityobject-Chart configuration parameter

Topology Spread Constraints(1)

ParameterTypeDefaultDescription
topologySpreadConstraintsarray-Chart configuration parameter

Extra Init Containers(1)

ParameterTypeDefaultDescription
extraInitContainersarray-Chart configuration parameter

Extra Containers(1)

ParameterTypeDefaultDescription
extraContainersarray-Chart configuration parameter

Extra Volumes(1)

ParameterTypeDefaultDescription
extraVolumesarray-Chart configuration parameter

Extra Volume Mounts(1)

ParameterTypeDefaultDescription
extraVolumeMountsarray-Chart configuration parameter

Extra Manifests(1)

ParameterTypeDefaultDescription
extraManifestsarray-Chart configuration parameter