
Deploy Matomo analytics on Your Own Server
Matomo tracks online visits to one or more websites and displays reports on these visits for analysis
Want to deploy Matomo analytics on your server faster? Try Senate with one-command setup, automatic HTTPS and monitoring.
What is Matomo analytics?
Matomo is the leading open-source analytics platform that gives you more than powerful analytics.
Self-Host Matomo analytics
Follow these steps to deploy on your own server.
Install Docker
Skip this step if Docker is already installed on your server.
curl -fsSL https://get.docker.com | sh
Configure
Customize the settings below. Defaults work for most cases.
General
Deploy
Copy the configuration and run it on your server.
services:
matomo:
image: matomo:4.2.1
environment:
MATOMO_DATABASE_ADAPTER: mysql
MATOMO_DATABASE_DBNAME: matomo
MATOMO_DATABASE_HOST: matomo-db
MATOMO_DATABASE_PASSWORD: b8dd68e8ce3b5849793673b20cd9b20d
MATOMO_DATABASE_TABLES_PREFIX: matomo_
MATOMO_DATABASE_USERNAME: matomo
volumes:
- matomo-data:/var/www/html
depends_on:
- matomo-db
matomo-db:
environment:
MYSQL_DATABASE: matomo
MYSQL_PASSWORD: b8dd68e8ce3b5849793673b20cd9b20d
MYSQL_RANDOM_ROOT_PASSWORD: "true"
MYSQL_USER: matomo
volumes:
- matomo-db-data:/var/lib/mysql
volumes:
matomo-data: {}
matomo-db-data: {}
Then run:
docker compose up -d
Access
Once started, access your app at http://localhost:80
Why Self-Host Matomo analytics?
Full Data Ownership
Your data stays on your servers. No third-party access.
No Monthly Fees
Pay only for your server. No per-seat or usage charges.
Complete Control
Customize, backup, and scale on your own terms.
Privacy & Compliance
Meet GDPR, HIPAA, or internal security requirements.
Technical Details
Docker Image
matomo:${matomo_version}Want to go faster?
Try Senate! Senate handles Docker, HTTPS, updates, and monitoring for you. Deploy any of our 300+ apps with a single command.
Install on any Linux server:
sh -c "$(curl -sSL https://get.senate.sh)"