Cloud-ready Matomo analytics container with automated setup, CLI installation, and security-hardened configuration.
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
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'@'%';
| Variable | Description |
|---|---|
MATOMO_DOMAIN | Your Matomo domain |
MATOMO_SSL_ENABLED | Enable HTTPS (true/false) |
MATOMO_TLS_EMAIL | Email for Let's Encrypt certificates |
MATOMO_DB_HOST | Database hostname |
MATOMO_DB_PASSWORD | Database password |
MATOMO_ADMIN_PASSWORD | Admin user password |
MATOMO_MANAGED_PLUGINS | Marketplace plugins to auto-install (comma-separated) |
MATOMO_PREMIUM_PLUGINS | Premium plugins (comma-separated) |
MATOMO_LICENSE_KEY | License key for premium plugins |
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.
This image uses a two-tier plugin system with separate persistent volumes:
| Path | Purpose |
|---|---|
/data/plugins-managed | Auto-managed plugins - Downloaded on startup based on MATOMO_MANAGED_PLUGINS and MATOMO_PREMIUM_PLUGINS. Default includes ExtraTools (required for CLI installation). |
/data/plugins-custom | User plugins - Plugins you install via Matomo's web UI or manually. Never touched by the container. |
Why separate volumes?
MATOMO_MANAGED_PLUGINS_UPDATE=trueExample 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
| Path | Purpose |
|---|---|
/matomo/config | Configuration file (config.ini.php) - must persist |
/data/plugins-managed | Auto-managed plugins |
/data/plugins-custom | User-installed plugins |
Content type
Image
Digest
sha256:6b7978a8d…
Size
174.3 MB
Last updated
4 months ago
docker pull oidagroup/matomo