10 Sentinels Active
SENTINEL 01: [AEGIS] AUDITING POCKETBASE INFRASTRUCTURE...
Back to Self-Hosted Stacks
Matomo

Deploy Matomo

Empowering People Ethically ๐Ÿš€ โ€” Matomo is hiring! Join us โ†’ https://matomo.org/jobs Matomo is the leading open-source alternative to Google Analytics, giving you complete control and built-in privacy. Easily collect, visualise, and analyse data from websites & apps. Star us on GitHub โญ๏ธ โ€“ Pull Requests welcome!

Quick Start

1

Create a directory

mkdir matomo-self-hosted && cd matomo-self-hosted
2

Create config file

Copy the content from the Config tab below into a file named docker-compose.yml

3

Deploy

docker compose up -d
Fast Track

Deploy Matomo in Minutes

Use our optimized Docker templates to deploy Matomo on any cloud provider. Get $200 in free credit to start on DigitalOcean.

Start with free creditDeploy on DigitalOcean
$200

Metadata

License
GPL-3.0
Language
PHP
Last Updated
10/14/2026
Category
Analytics

Configuration

yaml

# โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
# ๐Ÿš€ BUILT & MAINTAINED BY THE ALTSTACK
# ๐ŸŒ https://thealtstack.com
# ๐Ÿ’ก Open-source deployment templates for modern self-hosting.
# โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

# Docker Compose for Matomo
version: '3.8'

services:
  matomo_db:
    image: mariadb:10.11
    container_name: matomo-db
    command: --max-allowed-packet=64MB
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-matomo_root_password}
      - MYSQL_DATABASE=matomo
      - MYSQL_USER=matomo
      - MYSQL_PASSWORD=${MYSQL_PASSWORD:-matomo_password}
    volumes:
      - matomo_db_data:/var/lib/mysql
    networks:
      - matomo_net
    healthcheck:
      test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p${MYSQL_ROOT_PASSWORD}"]
      interval: 10s
      timeout: 5s
      retries: 5

  matomo:
    image: matomo:latest
    container_name: matomo
    restart: always
    volumes:
      - matomo_data:/var/www/html
    environment:
      - MATOMO_DATABASE_HOST=matomo_db
      - MATOMO_DATABASE_USERNAME=matomo
      - MATOMO_DATABASE_PASSWORD=${MYSQL_PASSWORD:-matomo_password}
      - MATOMO_DATABASE_DBNAME=matomo
    ports:
      - "8080:80"
    depends_on:
      matomo_db:
        condition: service_healthy
    networks:
      - matomo_net
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:80/"]
      interval: 30s
      timeout: 10s
      retries: 3

networks:
  matomo_net:
    driver: bridge

volumes:
  matomo_data:
  matomo_db_data:

Community Notes

Help others by adding context, corrections, or warnings about this tool. Sign in to contribute.

No community notes yet. Be the first to add context.