On this page
Local Matomo instance
This documentation needs work. See "Help improve this page" in the sidebar.
If you need to run Matomo locally for development and testing, you can create a local instance with any of these methods.
DDEV
You can use unofficial ddev plugin or perform the manual steps:
To add custom configuration or additional services to your project, create docker-compose files in the its .ddev directory. DDEV will process any files with the docker-compose.[servicename].yaml naming convention and include them in executing docker-compose functionality.
To add a Matomo instance to a DDEV project, you can create the following file : .ddev/docker-compose.matomo.yaml and defining the service by copy pasting the example below:
version: "3"
services:
matomo:
image: matomo
restart: always
volumes:
- matomo:/var/www/html
environment:
- MATOMO_DATABASE_HOST=db
# env_file:
# - ./db.env
ports:
- 8080:80
volumes:
matomo:Lando
Download latest version of Matomo, unzip it and create a Lando instance:
wget https://builds.matomo.org/matomo.zip
unzip matomo.zip
cd matomo
lando init --source cwd --recipe lamp --webroot . --name matomo
lando startAfter that you can install Matomo via the browser from https://matomo.lndo.site/
On the Database Setup page, use these values:
- Database Server:
database(from127.0.0.1) - Login:
lamp - Password:
lamp - Database Name:
lamp
Docker Matomo
You can use the official Matomo Docker image.
A setup with Docker Compose can be found on this repository it will require to use Traefik as a reverse-proxy.
The Matomo instance will be accessible on https://matomo.docker.localhost
Here is an example of Drupal in Docker that can contact this Matomo instance.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion