Matomo
Web analytics platform that stores visit data in your own database and shows reports in a web app.
- Replaces
-
Paid web analytics services, such as Google Analytics.
All open-source alternatives to Google Analytics
- Difficulty
-
Difficulty: Medium
2 services (1 database or broker: mariadb), 2 volume mounts, 2 env values to set, no elevated host access. Heuristic score 4 of 11: medium.
- Stack
PHP (language), MariaDB (database)
- Deployment
docker_compose
- Requirements
Not stated.
- License
-
GPL-3.0(OSI-approved open source) - Business model
-
Unknown
The README at the pinned commit does not state a business model, so it stays unknown.
Source: github.com/matomo-org/matomo/blob/476e22b/README.md, read on .
- Repository
GitHub stats
- Stars
- 21,973
- Forks
- 2,920
- Open issues and pull requests
- 2,561
- Last push
- 2026-10-22
- Latest release
- 5.14.2
- Released
- 2026-10-22
From the GitHub API on . These numbers are a snapshot, not live. GitHub detected the license as GPL-3.0.
Compose file
---
services:
db:
image: mariadb:lts
command: --max-allowed-packet=64MB
restart: always
volumes:
- db:/var/lib/mysql:Z
environment:
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DATABASE=matomo
- MARIADB_DISABLE_UPGRADE_BACKUP=1
- MARIADB_INITDB_SKIP_TZINFO=1
- MARIADB_PASSWORD=${MARIADB_PASSWORD}
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- MARIADB_USER=matomo
app:
image: matomo
restart: always
volumes:
# - ./config:/var/www/html/config:z
# - ./logs:/var/www/html/logs:z
- matomo:/var/www/html:z
depends_on:
- db
environment:
- MATOMO_DATABASE_ADAPTER=mysql
- MATOMO_DATABASE_DBNAME=matomo
- MATOMO_DATABASE_HOST=db
- MATOMO_DATABASE_PASSWORD=${MARIADB_PASSWORD}
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
- MATOMO_DATABASE_USERNAME=matomo
ports:
- 8080:80
volumes:
db:
matomo:
From a separate packaging repository: github.com/matomo-org/docker/blob/d27aefa/.examples/apache/compose.yml.
Compose file from matomo-org/docker, the project's own packaging repository.
Install
- Docker with the Compose plugin (github.com/matomo-org/docker/blob/d27aefa/.examples/apache/compose.yml)
A host with Docker and the Docker Compose plugin. This entry runs from a compose file.
- Save the compose file as compose.yml (github.com/matomo-org/docker/blob/d27aefa/.examples/apache/compose.yml)
Use the compose file shown above.
- Set the values the compose file needs (github.com/matomo-org/docker/blob/d27aefa/.examples/apache/compose.yml)
These variables have no default in the compose file: MARIADB_PASSWORD, MARIADB_ROOT_PASSWORD. Compose reads them from the shell or from a .env file next to the compose file.
- Start it (github.com/matomo-org/docker/blob/d27aefa/.examples/apache/compose.yml)
docker compose up -d - Open the app (github.com/matomo-org/docker/blob/d27aefa/.examples/apache/compose.yml)
Open http://localhost:8080. The compose file publishes host port 8080 for the app service.
Compose file check: config_ok on 2026-10-22.
Gotchas and maintenance
Gotchas
- Some images use the latest tag or no tag. Images without a pinned version: app: matomo (no tag). A later pull can get a different version. (github.com/matomo-org/docker/blob/d27aefa/.examples/apache/compose.yml, checked 2026-10-22)
- The compose file publishes host ports. Host ports: 8080 (app). A port without a host address listens on all host network interfaces. (github.com/matomo-org/docker/blob/d27aefa/.examples/apache/compose.yml, checked 2026-10-22)
Signals
- Open issues and pull requests: 2561
- Last push: 2026-10-22 (0 days before this page was built)
- Latest release: 5.14.2 on 2026-10-22 (0 days before this page was built)