Docker Compose (docker-compose.yml) for Matomo based on official Docker Image (https://hub.docker.com/_/matomo/) with Nginx (and Certbot included) and Redis ready
- Git (e.g. https://desktop.github.com/)
- Docker (https://docs.docker.com/install/)
- Docker Compose (https://docs.docker.com/compose/)
-
Clone this repo and go to repo folder
git clone https://github.com/thalidzhokov/matomo-docker-compose.git && cd matomo-docker-compose
-
Copy
.env.dist
to.env
cp .env.dist .env
-
Configure your project and set new strong password to database in
.env
nano .env
-
Run project
docker-compose up -d
-
Open it in browser (e.g. http://domaim.com) and install Matomo with your database configuration from
.env
Based on https://matomo.org/faq/how-to/faq_20511/
After installation add changes to matomo/config/config.ini.php
nano matomo/config/config.ini.php
[Cache]
backend = chained
[ChainedCache]
backends[] = array
backends[] = redis
[RedisCache]
host = "redis"
port = 6379
timeout = 0.0
password = ""
database = 14
; In case you are using queued tracking: Make sure to configure a different database! Otherwise queued requests will be flushed