Deploying token_auth value via Ansible

I am trying to deploy Piwik via Ansible. As part of this, I would like to set the token_auth value for the superuser via configuration (e.g. as part of the global.ini.php file), so it can be passed to the application servers.

However, I can’t find any documentation for doing this. Is it possible to set the auth_token this way? If not, is the auth_token predictable (i.e. a SHA/MD5 hash of the password or similar)?

Apologies if this is a very basic question.

Many thanks


PS. There is a small bug in the page Configuration: DevelopInDepth - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3, where the link “read the documentation in global.ini.php.” points to rather than to


While I can’t help with your issue, I have created a pull request to fix the typo: