Skip to content
Allows you to specify Matomo config in environment variables instead of the config file.
Branch: master
Clone or download
tsteur Merge pull request #3 from toredash/docs
Improve documentation for usage with PHP-FPM
Latest commit b2f72b8 Mar 26, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
config first commit Nov 7, 2018 Update Jan 25, 2019
EnvironmentVariables.php first commit Nov 7, 2018 Improve documentation for usage with PHP-FPM Mar 26, 2019
plugin.json Update plugin.json Jan 25, 2019

Matomo EnvironmentVariables Plugin


Override any Matomo config with environment variables. To overwrite any setting simply specify an environment variable in the following format:


For example to overwrite the database username and password which is usually defined in the config/config.ini.php like this:

username = "root"
password = "secure"

using environment variables like this:


Known issues:

  • Configuration arrays are currently not supported, for example you cannot define which Plugins[] should be loaded.
  • At some point your Matomo may save/write the config file, for example when changing certain settings through the UI such as the trusted hosts. In this case, the currently read environment variables will be saved in the config file.
  • If this plugin is used with PHP-FPM, for example in combination with NGINX, PHP-FPM will not have access to the environment variables by default. The pool used by PHP-FPM must either explicit define which ENVs should be exposed, or set clear_env = no in /etc/php7/php-fpm.f/<pool>.conf.
You can’t perform that action at this time.