Forge Home


Puppet Matomo Web Analytics platform installation module


5,351 latest version

3.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.8 (latest)
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Feb 18th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'akisakye-matomo', '0.1.8'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add akisakye-matomo
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install akisakye-matomo --version 0.1.8

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



akisakye/matomo — version 0.1.8 Feb 18th 2019

Matomo - The Web Analytics Platform

Module description

The Matomo Module downloads and installs Matomo (formally Piwiki) it goes ahead and installs Nginx and MariaDB to complete the requirements to run a Matomo server. The module will take care of other OS requirements such as permissions and PHP.


Beginning with Matomo

By using the classes below, you can install matomo, configure MariaDB/MySQL and Nginx with defaults as listed below :

class { 'matomo': }

class { 'matomo::web::web':
 site_name       => 'matomo.local'

class { 'matomo::mysql::db': }

The classes above will install Matomo with the defaults below

matomo default params

  $package_version                      = 'latest'
  $docroot                              = '/var/www/html'
  $package_manage                       = true

mysql default params

  $root_password                        = 'Crackme_iF_you_can_pleasE'
  $remove_default_accounts              = true
  $matomo_db_user                       = 'matomo'
  $matomo_db_password                   = 'Crackme_iF_you_can_pleasE'
  $matomo_db_name                       = 'matomo'
  $host                                 = 'localhost'
  $grant                                = ['ALL']
  $sql_backup_file                      = undef
  $enforce_sql                          = true

nginx default params

  $site_name                            = 'matomo.local'
  $listen_port                          = 80
  $www_root                             = "${docroot}/matomo"
  $use_default_location                 = false
  $access_log                           = "/var/log/nginx/${site_name}-access.log"
  $error_log                            = "/var/log/nginx/${site_name}-error.log"
  $mode                                 = '0755'
  $ssl                                  = false
  $ssl_key                              = undef
  $ssl_cert                             = undef
  $ssl_redirect             = false
  $ensure                               = present
  $location                             = '~* \.php$'
  $server                               = $site_name
  $fastcgi                              = ''
  $include                              = undef
  $fastcgi_param                        = undef
  $index_secure             = false
  $location_allow           = ['']

Advanced Usage

All parameters for the Matomo module can be defined within the 3 different classes. See the common usages below for examples.

Install and enable Matomo

The example below specifies the version of Matomo to install (default is 'latest') and the default location of www root for the web server.

class { 'matomo':
 package_manage     => true,
 package_version    => '3.8.1',
 docroot        => '/var/www/html/',

Install and enable MariaDB

class { 'matomo::mysql::db':

  root_password     => 'Crackme_iF_you_can_pleasE',
  matomo_db_user        => 'matomo',
  matomo_db_password    => 'Crackme_iF_you_can_pleasE',
  matomo_db_name        => 'matomo',


Install and enable Nginx

class { 'matomo::web::web':

  site_name                            => 'matomo.local',
  listen_port                          => 80,
  www_root                             => "/var/www/html/matomo",
  mode                                 => '0755',
  ssl                                  => false,
  ssl_key                              => undef,
  ssl_cert                             => undef,


Running Nginx with SSL (which you should)

class { 'matomo::web::web':

  site_name                            => 'matomo.local',
  listen_port                          => 80,
  www_root                             => "/var/www/html/matomo",
  mode                                 => '0755',
  ssl                                  => true,
  ssl_key                              => /path/to/the/cert/key,
  ssl_cert                             => /path/to/the/cert,
  ssl_redirect                 => true,

Accessing the Web interface

Once installation is done, Matomo web interface can be accessed using the url to complete setup e.g. matomo.local


This module has been tested on CentOS and Ubuntu but should in theory work on All derivatives of Redhat and Debian.


This module is open source, feel free to contribute changes

Project is hosted here For more information.


Always welcome.