Ansible playbook and Docker Compose setup for Matomo web statistics
- Docker Compose
- The images have been developed for the amd64 architecture
- Ansible (>= 2.9)
- Vagrant (2.x - only for local VM)
- Enterprise Linux 9 (e.g. AlmaLinux or RHEL)
- The images have been developed for the amd64 architecture
If you use Windows, ensure that core.autocrlf is set to false in your git client before you clone the matomo-ansible repository: git config --global core.autocrlf false Otherwise the Docker images may not work due to line ending changes.
If you want to test any local updates, you need to re-build the images:
cd docker
./build-local-images.sh
First add an entry to your /etc/hosts file (or equivalent) so that queries for the development setup
interface resolve to your loopback interface. For example:
127.0.0.1 www.matomo.test
Unless you want to build the images locally (see above), you need to pull them from the registry:
cd docker
docker compose pull
Then start the Docker Compose setup:
docker compose up
Then wait until Matomo has started. This may take a couple of minutes. Navigate to https://www.matomo.test in your browser. The development setup runs with self-signed certificates, so you'll need to accept the security warning in your browser.
Run the setup wizard to configure Matomo
First create the VMs using Vagrant:
vagrant upOn a Windows host, first SSH into the Ansible controller virtual machine (skip this step on GNU/Linux or macOS):
vagrant ssh matomo-controller
cd ~/matomo-ansibleDeploy Matomo to the development virtual machine:
ansible-playbook playbook.ymlAdd the following host to /etc/hosts (GNU/Linux or macOS) or %SystemRoot%\System32\drivers\etc\hosts (Windows):
192.168.60.10 dev.matomo.test
This project is licensed under the MIT license. The full license can be found in LICENSE.