Use the console to manage users, like adding users, reset password etc.
Manage Matomo users from the command line: create, invite, delete and list users, set their access and reset passwords.
Install it from the Matomo Marketplace, or put this repository in plugins/UserConsole and
activate it:
./console plugin:activate UserConsole
A command that cannot do what was asked prints the reason and ends with a failure code. That is the case when a required option is missing, when the user does not exist, and when Matomo refuses the change, for example a password that is too short.
A password given as an option can be seen by other users of the server in the process list, and it is kept in the history of the shell.
Creates a user.
Options:
login User name for the user (required)email Email for the user (required)password Password for the user (required). It has to follow Matomo's password rules.super Add super user privileges to the user (optional)update If the user exists, give it the email, the password and the super user access that were asked for (optional)If a user with the login or the email already exists, nothing is changed and the command still ends successfully, so that a setup can be run again.
With update an existing user is changed to what was asked for instead. Without super that
takes super user access away. The password is only set when it differs, as a new password logs
the user out everywhere.
Invites a user.
Options:
login User name for the user (required)email Email for the user (required)site ID of the initial site (required)expiry Expiry in days (optional)If a user with the login or the email already exists, nothing is changed and the command still ends successfully.
Deletes a user.
Options:
login User name for the user (required)force Do not ask before deletingAsks before deleting when run by a person at a terminal. A script is not asked.
Manage the access of a user: for which sites and what access.
Options:
login User name for the user (required)sites One or more site IDs, comma separated, that you would like to set the permission for, or all (required)access Which access the user should have to the site - noaccess, view, write, admin (required)Adds super user privileges to a user
Options:
login User name for the user (required)Remove super user privileges from a user
Options:
login User name for the user (required)If the user is the only one that has super user access, this will fail. At least one super user is needed.
List all users.
Options:
format text (default) or json. JSON has for every user the login, email, whether it is a super user, the invitation (active, pending or expired), when it was registered and last seen, and the access per website.Resets password for a user. The user is logged out everywhere.
Options:
login User name for the user (required)new-password New password for the user (required). It has to follow Matomo's password rules.Changes the email of a user.
Options:
login User name for the user (required)email New email for the user (required)Logs a user out everywhere. The password and the API tokens stay as they are, so delete the
tokens too with user:token-delete --all if they may have leaked.
Options:
login User name for the user (required)Shows one user: email, super user access, invitation, when it was registered and last seen, and the access and capabilities per website.
Options:
login User name for the user (required)format text (default) or json. JSON has the same fields as user:list.Sends the invitation again to a user that has not accepted it. The link sent before stops
working. user:list marks the users that have not accepted.
Options:
login User name for the user (required)expiry Expiry in days (optional, 7 by default)Gives a user capabilities on websites, or takes them away. A capability is a right on top of
the access level, for example tagmanager_write. The user needs access to the website first.
./console user:capability --login=anna --capability=tagmanager_write --sites=1,2
Options:
login User name for the user (required)capability ID(s) of capabilities, comma separated (required)sites ID(s) of sites, comma separated, or all (required)remove Take the capabilities away instead of giving themCreates an API token for a user and prints it. Matomo does not store the token itself, so it cannot be shown again.
TOKEN=$(./console user:token-create --login=importer --description="Log import")
Options:
login User name for the user (required)description What the token is for (required)expire-date Last day the token works, as YYYY-MM-DD. Without it the token does not expire.secure-only The token is only accepted in POST requestsLists the API tokens of a user: ID, description, when it was created, last used and when it expires.
Options:
login User name for the user (required)format text (default) or jsonDeletes one API token of a user, or all of them.
Options:
login User name for the user (required)id ID of the token, as shown by user:token-listall Delete all API tokens of the userThe user gets Matomo's security notification by email when a token is created or deleted.
My question?
My answer
Version
5.0.9
License
Last Updated
Nov 25th 2026
Requirements
Matomo >=5.14.1,<6.0.0-b1
Matomo 4.x, Matomo 5.x
Downloads
71606
Changelog
Authors
Websites
Activity
4 commits by 2 developers (last commit 8 days ago)
Developer
Support
View and download this plugin for a specific Matomo version: