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.2subchart for simple deployments. - External MySQL/MariaDB mode for production.
- CronJob-based
core:archiveexecution. - 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
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.
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 SyncedVerified 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
Matomo Values Schema Reference
Official schema parameters, default values, and types extracted directly from the chart repository.
Global(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| global | object | - | Global settings shared by the chart. |
Name Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| nameOverride | string | - | Chart configuration parameter |
Fullname Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| fullnameOverride | string | - | Chart configuration parameter |
Namespace Override(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| namespaceOverride | string | - | Chart configuration parameter |
Cluster Domain(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| clusterDomain | string | - | Chart configuration parameter |
Common Labels(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| commonLabels | object | - | Chart configuration parameter |
Common Annotations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| commonAnnotations | object | - | Chart configuration parameter |
Replica Count(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| replicaCount | integer | - | Chart configuration parameter |
Image(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| image.repository | string | - | Chart configuration parameter |
| image.tag | string | - | Chart configuration parameter |
| image.pullPolicy | string | - | Chart configuration parameter Allowed: AlwaysIfNotPresentNever |
Image Pull Secrets(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| imagePullSecrets | array | - | Chart configuration parameter |
Matomo(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| matomo.siteUrl | string | - | Chart configuration parameter |
| matomo.trustedHost | string | - | Chart configuration parameter |
| matomo.extraEnv | array | - | Chart configuration parameter |
| matomo.extraEnvFrom | array | - | Chart configuration parameter |
Web Server(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| webServer.mode | string | - | Chart configuration parameter Allowed: apacheexternal |
Database(13)
| Parameter | Type | Default | Description |
|---|---|---|---|
| database.mode | string | - | Chart configuration parameter Allowed: autoexternalmysql |
| database.waitForConnection.enabled | boolean | - | Chart configuration parameter |
| database.waitForConnection.resources | object | - | Chart configuration parameter |
| database.waitForConnection.securityContext | object | - | Chart configuration parameter |
| database.waitForConnection.image.repository | string | - | Chart configuration parameter |
| database.waitForConnection.image.tag | string | - | Chart configuration parameter |
| database.external.host | string | - | Chart configuration parameter |
| database.external.port | integer | - | Chart configuration parameter |
| database.external.name | string | - | Chart configuration parameter |
| database.external.username | string | - | Chart configuration parameter |
| database.external.password | string | - | Chart configuration parameter |
| database.external.existingSecret | string | - | Chart configuration parameter |
| database.external.existingSecretPasswordKey | string | - | Chart configuration parameter |
Mysql(10)
| Parameter | Type | Default | Description |
|---|---|---|---|
| mysql.enabled | boolean | - | Chart configuration parameter |
| mysql.architecture | string | - | Chart configuration parameter Allowed: standalonereplication |
| mysql.auth.database | string | - | Chart configuration parameter |
| mysql.auth.username | string | - | Chart configuration parameter |
| mysql.auth.password | string | - | Chart configuration parameter |
| mysql.auth.rootPassword | string | - | Chart configuration parameter |
| mysql.standalone.persistence.enabled | boolean | - | Chart configuration parameter |
| mysql.standalone.persistence.size | string | - | Chart configuration parameter |
| mysql.replication.source.persistence.enabled | boolean | - | Chart configuration parameter |
| mysql.replication.source.persistence.size | string | - | Chart configuration parameter |
Persistence(8)
| Parameter | Type | Default | Description |
|---|---|---|---|
| persistence.enabled | boolean | - | Chart configuration parameter |
| persistence.storageClass | string | - | Chart configuration parameter |
| persistence.accessMode | string | - | Chart configuration parameter |
| persistence.size | string | - | Chart configuration parameter |
| persistence.existingClaim | string | - | Chart configuration parameter |
| persistence.annotations | object | - | Chart configuration parameter |
| persistence.codeSync.enabled | boolean | - | Chart configuration parameter |
| persistence.codeSync.resources | object | - | Chart configuration parameter |
Archiver(15)
| Parameter | Type | Default | Description |
|---|---|---|---|
| archiver.enabled | boolean | - | Chart configuration parameter |
| archiver.schedule | string | - | Chart configuration parameter |
| archiver.concurrencyPolicy | string | - | Chart configuration parameter Allowed: AllowForbidReplace |
| archiver.successfulJobsHistoryLimit | integer | - | Chart configuration parameter |
| archiver.failedJobsHistoryLimit | integer | - | Chart configuration parameter |
| archiver.activeDeadlineSeconds | integer | - | Chart configuration parameter |
| archiver.extraArgs | array | - | Chart configuration parameter |
| archiver.resources.requests.cpu | stringnumber | - | Chart configuration parameter |
| archiver.resources.requests.memory | stringnumber | - | Chart configuration parameter |
| archiver.resources.limits.cpu | stringnumber | - | Chart configuration parameter |
| archiver.resources.limits.memory | stringnumber | - | Chart configuration parameter |
| archiver.sameNodeAsMatomo | boolean | - | Chart configuration parameter |
| archiver.nodeSelector | object | - | Chart configuration parameter |
| archiver.tolerations | array | - | Chart configuration parameter |
| archiver.affinity | object | - | Chart configuration parameter |
Php(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| php.ini | string | - | Chart configuration parameter |
Container Ports(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| containerPorts.http | integer | - | Chart configuration parameter |
Service & Networking(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| service.type | string | - | Chart configuration parameter |
| service.port | integer | - | Chart configuration parameter |
| service.annotations | object | - | Chart configuration parameter |
| service.ipFamilyPolicy | string | - | Chart configuration parameter Allowed: SingleStackPreferDualStackRequireDualStack |
| service.ipFamilies | array | - | Chart configuration parameter |
Ingress(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| ingress.enabled | boolean | - | Chart configuration parameter |
| ingress.ingressClassName | string | - | Chart configuration parameter |
| ingress.annotations | object | - | Chart configuration parameter |
| ingress.hosts | array | - | Chart configuration parameter |
| ingress.tls | array | - | Chart configuration parameter |
Gateway API(2)
| Parameter | Type | Default | Description |
|---|---|---|---|
| gatewayAPI.enabled | boolean | - | Chart configuration parameter |
| gatewayAPI.httpRoutes | array | - | Chart configuration parameter |
External Secrets(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| externalSecrets.enabled | boolean | - | Chart configuration parameter |
| externalSecrets.refreshInterval | string | - | Chart configuration parameter |
| externalSecrets.items | array | - | Chart configuration parameter |
Metrics & Observability(5)
| Parameter | Type | Default | Description |
|---|---|---|---|
| metrics.serviceMonitor.enabled | boolean | - | Chart configuration parameter |
| metrics.serviceMonitor.interval | string | - | Chart configuration parameter |
| metrics.serviceMonitor.scrapeTimeout | string | - | Chart configuration parameter |
| metrics.serviceMonitor.labels | object | - | Chart configuration parameter |
| metrics.serviceMonitor.namespaceSelector | object | - | Chart configuration parameter |
Network Policy(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| networkPolicy.enabled | boolean | - | Chart configuration parameter |
| networkPolicy.ingressFrom | array | - | Chart configuration parameter |
| networkPolicy.egress.enabled | boolean | - | Chart configuration parameter |
| networkPolicy.egress.allowDNS | boolean | - | Chart configuration parameter |
| networkPolicy.egress.extraTo | array | - | Chart configuration parameter |
| networkPolicy.egress.extraEgress | array | - | Chart configuration parameter |
Pod Disruption Budget(3)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podDisruptionBudget.enabled | boolean | - | Chart configuration parameter |
| podDisruptionBudget.maxUnavailable | any | - | Chart configuration parameter |
| podDisruptionBudget.minAvailable | any | - | Chart configuration parameter |
Update Strategy(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| updateStrategy.type | string | - | Chart configuration parameter Allowed: RecreateRollingUpdate |
Service Account(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| serviceAccount.create | boolean | - | Chart configuration parameter |
| serviceAccount.name | string | - | Chart configuration parameter |
| serviceAccount.annotations | object | - | Chart configuration parameter |
| serviceAccount.automountServiceAccountToken | boolean | - | Chart configuration parameter |
Pod Security(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podSecurityContext | object | - | Chart configuration parameter |
Container Security(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| securityContext | object | - | Chart configuration parameter |
Startup Probe(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| startupProbe.enabled | boolean | - | Chart configuration parameter |
| startupProbe.path | string | - | Chart configuration parameter |
| startupProbe.initialDelaySeconds | integer | - | Chart configuration parameter |
| startupProbe.periodSeconds | integer | - | Chart configuration parameter |
| startupProbe.timeoutSeconds | integer | - | Chart configuration parameter |
| startupProbe.failureThreshold | integer | - | Chart configuration parameter |
Liveness Probe(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| livenessProbe.enabled | boolean | - | Chart configuration parameter |
| livenessProbe.path | string | - | Chart configuration parameter |
| livenessProbe.initialDelaySeconds | integer | - | Chart configuration parameter |
| livenessProbe.periodSeconds | integer | - | Chart configuration parameter |
| livenessProbe.timeoutSeconds | integer | - | Chart configuration parameter |
| livenessProbe.failureThreshold | integer | - | Chart configuration parameter |
Readiness Probe(6)
| Parameter | Type | Default | Description |
|---|---|---|---|
| readinessProbe.enabled | boolean | - | Chart configuration parameter |
| readinessProbe.path | string | - | Chart configuration parameter |
| readinessProbe.initialDelaySeconds | integer | - | Chart configuration parameter |
| readinessProbe.periodSeconds | integer | - | Chart configuration parameter |
| readinessProbe.timeoutSeconds | integer | - | Chart configuration parameter |
| readinessProbe.failureThreshold | integer | - | Chart configuration parameter |
Resources(4)
| Parameter | Type | Default | Description |
|---|---|---|---|
| resources.requests.cpu | stringnumber | - | Chart configuration parameter |
| resources.requests.memory | stringnumber | - | Chart configuration parameter |
| resources.limits.cpu | stringnumber | - | Chart configuration parameter |
| resources.limits.memory | stringnumber | - | Chart configuration parameter |
Termination Grace Period Seconds(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| terminationGracePeriodSeconds | integer | - | Chart configuration parameter |
Pod Labels(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podLabels | object | - | Chart configuration parameter |
Pod Annotations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| podAnnotations | object | - | Chart configuration parameter |
Priority Class Name(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| priorityClassName | string | - | Chart configuration parameter |
Node Selector(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| nodeSelector | object | - | Chart configuration parameter |
Tolerations(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| tolerations | array | - | Chart configuration parameter |
Affinity(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| affinity | object | - | Chart configuration parameter |
Topology Spread Constraints(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| topologySpreadConstraints | array | - | Chart configuration parameter |
Extra Init Containers(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraInitContainers | array | - | Chart configuration parameter |
Extra Containers(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraContainers | array | - | Chart configuration parameter |
Extra Volumes(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraVolumes | array | - | Chart configuration parameter |
Extra Volume Mounts(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraVolumeMounts | array | - | Chart configuration parameter |
Extra Manifests(1)
| Parameter | Type | Default | Description |
|---|---|---|---|
| extraManifests | array | - | Chart configuration parameter |
No schema parameters match your search
Try searching for a different keyword or reset the filter.