# Matomo

Web analytics platform that stores visit data in your own database and shows reports in a web app.

- Replaces: [Google Analytics](https://openlogs.fyi/alternatives/google-analytics)
- Summary: Paid web analytics services, such as Google Analytics.
- Stack: PHP (language), MariaDB (database)
- Deployment: docker_compose
- License: GPL-3.0 (osi) [source](https://github.com/matomo-org/matomo/blob/476e22b8748fda6559d5e8612f0ad1169738dc99/LICENSE)
- Business model: unknown. The README at the pinned commit does not state a business model, so it stays unknown. ([source](https://github.com/matomo-org/matomo/blob/476e22b8748fda6559d5e8612f0ad1169738dc99/README.md), read 2026-10-22)
- 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.
- Requirements: not stated
- Repository: [matomo-org/matomo](https://github.com/matomo-org/matomo)

## Install

1. Docker with the Compose plugin ([source](https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.examples/apache/compose.yml))

   ```text
   A host with Docker and the Docker Compose plugin. This entry runs from a compose file.
   ```

2. Save the compose file as compose.yml ([source](https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.examples/apache/compose.yml))

   ```yaml
   ---
   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:
   ```

3. Set the values the compose file needs ([source](https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.examples/apache/compose.yml))

   ```text
   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.
   ```

4. Start it ([source](https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.examples/apache/compose.yml))

   ```bash
   docker compose up -d
   ```

5. Open the app ([source](https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.examples/apache/compose.yml))

   ```text
   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. ([source](https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.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. ([source](https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.examples/apache/compose.yml), checked 2026-10-22)

### Signals

Computed from a GitHub snapshot taken 2026-10-22.

- Open issues and pull requests: 2561
- Stars: 21973, forks: 2920
- Last push: 2026-10-22 (0 days ago)
- Latest release: 5.14.2 on 2026-10-22 (0 days ago)

## Sources

- [Repository: https://github.com/matomo-org/matomo](https://github.com/matomo-org/matomo)
- [License: https://github.com/matomo-org/matomo/blob/476e22b8748fda6559d5e8612f0ad1169738dc99/LICENSE](https://github.com/matomo-org/matomo/blob/476e22b8748fda6559d5e8612f0ad1169738dc99/LICENSE)
- [Business model: https://github.com/matomo-org/matomo/blob/476e22b8748fda6559d5e8612f0ad1169738dc99/README.md](https://github.com/matomo-org/matomo/blob/476e22b8748fda6559d5e8612f0ad1169738dc99/README.md)
- [Compose file: https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.examples/apache/compose.yml](https://github.com/matomo-org/docker/blob/d27aefa7dfb9dff64500db6b648b3b75470d3fc7/.examples/apache/compose.yml)

---
Canonical: https://openlogs.fyi/tools/matomo  
Last updated: 2026-10-22
