MirrorNest
← Tous les guides

Matomo

A self-hosted, privacy-respecting web analytics platform — a fully-featured alternative to Google Analytics where you own 100% of the visitor data instead of sending it to a third party.

Système : Any Docker hostweb-analyticsprivacyself-hostedSite officiel ↗Documentation officielle ↗
Ce guide est élaboré à partir de la documentation officielle de Matomo, dont le lien figure ci-dessus — vérifiez toujours les noms exacts des paquets/versions avant d'exécuter ces commandes sur un serveur de production, car les versions de la distribution et du projet évoluent avec le temps.
  1. 1Run Matomo with a database via Compose

    Matomo needs MariaDB/MySQL for its own data storage.

    cat <<'EOF' > docker-compose.yml services: db: image: mariadb:11 environment: MYSQL_DATABASE: matomo MYSQL_USER: matomo MYSQL_PASSWORD: changeme MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - ./matomo/db:/var/lib/mysql matomo: image: matomo:latest depends_on: - db ports: - "8086:80" volumes: - ./matomo/app:/var/www/html restart: unless-stopped EOF
    docker compose up -d
  2. 2Complete the setup wizard

    Matomo's installer checks system requirements, connects to the database, and creates your first admin account and website entry.

    http://your-server-ip:8086
  3. 3Add the tracking code to your site

    Matomo generates a small JavaScript snippet per website you add -- paste it into your site's pages the same way you would Google Analytics' tag.