Self-host Matomo
updated Jul 2026deployed & timed by usprices checked · Aug 2026Install verified on Ubuntu 26.04 · Jul 2026 · how we test
The full-featured Google Analytics alternative — goals, e-commerce tracking, and 100% data ownership, with funnels and heatmaps available as paid premium plugins. Heavier than Plausible, but the closest like-for-like replacement for GA's depth.
Key facts
CategoryWeb analytics
LicenseGPL-3.0
StackPHP, MariaDB
Min RAM2048 MB
Dockeryes
Difficulty
What you need
- Any VPS with at least 2048 MB of RAM
- A domain you control — most self-hosted setups need HTTPS in front of them
- About an afternoon — budget time for troubleshooting
Install with Docker Compose
Save this as compose.yml and run docker compose up -d:
# Matomo — analytics with a MariaDB backend
services:
db:
image: mariadb:11
environment:
MARIADB_ROOT_PASSWORD: changeme
MARIADB_DATABASE: matomo
MARIADB_USER: matomo
MARIADB_PASSWORD: changeme
volumes: ["./db:/var/lib/mysql"]
matomo:
image: matomo:latest
ports: ["8080:80"]
depends_on: [db]
environment:
MATOMO_DATABASE_HOST: db
MATOMO_DATABASE_USERNAME: matomo
MATOMO_DATABASE_PASSWORD: changeme
MATOMO_DATABASE_DBNAME: matomo
volumes: ["./matomo:/var/www/html"]
# docker compose up -d → http://SERVER_IP:8080 (DB host = db)An alternative to
Head-to-head
More self-hosted tools
Web analytics
Plausible
ElixirClickHousePostgreSQL
moderateRead guide →
Web analytics
Umami
Next.jsPostgreSQL
easyRead guide →
File sync & storage
ownCloud
Go
moderateRead guide →
Reverse proxy
Traefik
Go
moderateRead guide →