Sign inSign up

oidagroup/matomo

By oidagroup

Updated about 2 months ago

Image
0

7.8K

oidagroup/matomo repository overview

Matomo Worker

Cloud-ready Matomo analytics container with automated setup, CLI installation, and security-hardened configuration.

Features

  • Zero-touch installation - Automatic download, CLI-based setup, no web installer required
  • Auto-upgrades - Database migrations run automatically on container restart
  • Built-in cron - Report archiving and scheduled tasks pre-configured
  • Plugin management - Separate volumes for managed and custom plugins
  • Security hardened - Whitelist-based PHP execution following official Matomo recommendations
  • Non-root execution - Runs as dedicated docker user

Quick Start

docker run -d -p 80:80 \
  -e MATOMO_DOMAIN=matomo.example.com \
  -e MATOMO_DB_HOST=db \
  -e MATOMO_DB_PASSWORD=secret \
  -e MATOMO_ADMIN_PASSWORD=YourSecurePassword \
  -v matomo-config:/matomo/config \
  -v matomo-plugins-managed:/data/plugins-managed \
  -v matomo-plugins-custom:/data/plugins-custom \
  oidagroup/matomo-worker:latest

Prerequisites

Database must exist before starting the container. This image does not create the database - you must create it manually or via your database provisioning process:

CREATE DATABASE matomo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'matomo'@'%' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'%';

Key Environment Variables

VariableDescription
MATOMO_DOMAINYour Matomo domain
MATOMO_SSL_ENABLEDEnable HTTPS (true/false)
MATOMO_TLS_EMAILEmail for Let's Encrypt certificates
MATOMO_DB_HOSTDatabase hostname
MATOMO_DB_PASSWORDDatabase password
MATOMO_ADMIN_PASSWORDAdmin user password
MATOMO_MANAGED_PLUGINSMarketplace plugins to auto-install (comma-separated)
MATOMO_PREMIUM_PLUGINSPremium plugins (comma-separated)
MATOMO_LICENSE_KEYLicense key for premium plugins

TLS/HTTPS

To enable automatic TLS with Let's Encrypt:

-e MATOMO_SSL_ENABLED=true \
-e [email protected] \
-p 443:443

Caddy automatically obtains and renews certificates. Ensure your domain points to the server and port 443 is accessible.

Plugin Directories

This image uses a two-tier plugin system with separate persistent volumes:

PathPurpose
/data/plugins-managedAuto-managed plugins - Downloaded on startup based on MATOMO_MANAGED_PLUGINS and MATOMO_PREMIUM_PLUGINS. Default includes ExtraTools (required for CLI installation).
/data/plugins-customUser plugins - Plugins you install via Matomo's web UI or manually. Never touched by the container.

Why separate volumes?

  • Managed plugins can be auto-updated via MATOMO_MANAGED_PLUGINS_UPDATE=true
  • Custom plugins are preserved independently
  • Clear separation between infrastructure-managed and user-managed plugins
  • Both persist across container restarts and Matomo upgrades

Example with premium plugins:

-e MATOMO_MANAGED_PLUGINS=ExtraTools \
-e MATOMO_PREMIUM_PLUGINS=HeatmapSessionRecording,FormAnalytics \
-e MATOMO_LICENSE_KEY=your_license_key \
-v matomo-plugins-managed:/data/plugins-managed \
-v matomo-plugins-custom:/data/plugins-custom

Volumes

PathPurpose
/matomo/configConfiguration file (config.ini.php) - must persist
/data/plugins-managedAuto-managed plugins
/data/plugins-customUser-installed plugins

Tag summary

Content type

Image

Digest

sha256:6b7978a8d

Size

174.3 MB

Last updated

4 months ago

docker pull oidagroup/matomo