matomo-standalone

Example:

# Install Matomo with Nginx and letsencrypt certificate.
- matomo-standalone:
    hostnames:
    - dev.frkl.io
    server_admin: hello@frkl.io
    use_https: true

Description

Install Matomo web analytics service.

This also installs Nginx as a reverse proxy, and, optionally, configures https with a letsencrypt certificate.

Make sure to specify the 'server_admin' email address when using this with https. There is no validation check for this yet.

Once finished, and you visit the hostname you provided (or localhost if you didn't), you'll be presented with a setup page. If you didn't change the defaults (which you should, at least for 'matomo_db_password'), here are the defaults:

Database Server: 127.0.0.1
Login: matomo
Password: matomo_password
Database Name: matomo

Leave the other settings.

Resources

Variables

Name Type Default Description

base_path

string /var/www

The matomo webapp parent directory.

hostnames

list ['localhost']

The hostname(s) of the server.

Will be used in the vhost configuration, as well as to request https certificates from letsencrypt.

letsencrypt_staging

boolean False

"Whether to use the letsencrypt staging server.

This is useful for developing -- the letsencrypt production server only allows a few requests per day. This option is disabled in the cli, as it is not used very often. Just use an overlay dict to enable this.

matomo_db_dump_file

string --

An (optional) database dump file.

matomo_db_import

boolean False

Whether to import a sql dump.

matomo_db_name

string matomo

The name of the database to use.

matomo_db_password

string matomo_password

The password for the database.

matomo_db_user

string matomo

The db user.

path

string /etc/nginx/sites-enabled/matomo.conf

The path to the vhost file.

server_admin

string --

The email address to use in the vhost file and with letsencrypt.

use_https

boolean --

Request a lets-encrypt certificate and serve devpi via https (needs 'server_admin' set).

webserver_group

string www-data

The group to run the webserver as (if applicable).

webserver_user

string www-data

The user to run the webserver as.

Examples

Example 1

Install Matomo with Nginx and letsencrypt certificate.

Code
- matomo-standalone:
    hostnames:
    - dev.frkl.io
    server_admin: hello@frkl.io
    use_https: true
Description

This will use the defaults for database-related settings. You should, in practice, at least set a proper database password.

Command-line

frecklecute matomo-standalone --help

Usage: frecklecute matomo-standalone [OPTIONS]

  Install [Matomo](https://matomo.org/) web analytics service.

  This also installs Nginx as a reverse proxy, and, optionally, configures
  https with a letsencrypt certificate.

  Make sure to specify the 'server_admin' email address when using this with
  https. There is no validation check for this yet.

  Once finished, and you visit the hostname you provided (or localhost if
  you didn't), you'll be presented with a setup page. If you didn't change
  the defaults (which you should, at least for 'matomo_db_password'), here
  are the defaults:

      Database Server: 127.0.0.1     Login: matomo     Password:
      matomo_password     Database Name: matomo

  Leave the other settings.

Options:
  --base-path BASE_PATH           The matomo webapp parent directory.
                                  [default: /var/www]
  --hostname HOST                 The hostname(s) of the server.  [default:
                                  localhost]
  --letsencrypt-staging / --no-letsencrypt-staging
                                  Whether to use the letsencrypt staging
                                  server.
  --matomo-db-dump-file PATH      An (optional) database dump file.
  --matomo-db-import / --no-matomo-db-import
                                  Whether to import a sql dump.
  --matomo-db-name DB_NAME        The name of the database to use.  [default:
                                  matomo]
  --matomo-db-password MATOMO_DB_PASSWORD
                                  The password for the database.  [default:
                                  matomo_password]
  --matomo-db-user DB_USER        The db user.  [default: matomo]
  --path PATH                     The path to the vhost file.  [default:
                                  /etc/nginx/sites-enabled/matomo.conf]
  --server-admin SERVER_ADMIN     The email address to use in the vhost file
                                  and with letsencrypt.
  --use-https / --no-use-https    Request a lets-encrypt certificate and serve
                                  devpi via https (needs 'server_admin' set).
  --webserver-group GROUP         The group to run the webserver as (if
                                  applicable).  [default: www-data]
  --webserver-user USERNAME       The user to run the webserver as.  [default:
                                  www-data]
  --help                          Show this message and exit.