Use multiple/different database for each domain to be tracked (Matomo On-Premise)


I am currently tracking user metrics for 2 domain names/websites using a single matomo on-premise instance. Each website being used by different clients. The issue is that all of the data is getting stored in the same database, that might be a security concern for both the clients as both their user data gets stored in the same database and tables. Even though matomo gives a way to isolate the domains at a UI level by creating users to control the access, that isn’t enough.

I was wondering if there is any way of storing the data for each domain that we are tracking to be stored in separate databases and if not separate databases, even separate schemas in the same database should be good enough.

Maybe you can ask for a new (premium?) feature at


As mentioned in this is possible in theory as explained in, but not really documented or supported well.
But you are welcome to try it out and if you are interested improved the docs on it.

Would the above steps work for on-premise option?

The above only works if you host your own Matomo instance (so the on-premise option)

Could you please help me out with some details?

In the above multi-tenant docs:

What does, subdomain_a, subdomain_b and mydomain correspond to?

What happens to the config.ini.php file in config/config.ini.php?


subdomain_a and subdomain_b are just examples for the different domains where you want to host the different Matomo instances.

The config.ini.php stays the same, but individual settings can be overridden in the instance-specific config files.