Linux

Where Does Matomo Store Config and Data?

Matomo PHP web root, config file, and tmp folder paths for self-hosted web analytics on Linux servers.

Last updated

Matomo lives wherever the web server points, commonly /var/www/matomo. Settings sit in config/config.ini.php with database passwords, salts, and mail options. That file is the part to keep private and backed up.

Runtime files sit in tmp with cache, logs, and compiled templates. Plugins live in plugins with custom ones beside core. Back up the config file, the database, and custom plugins. The tmp folder can be skipped since Matomo recreates it. Keep custom plugins with the config backup. The database carries the reports.

Where Matomo stores this, by platform

Linux
/var/www/matomo

Default web root on manual installs. Docker images use /var/www/html instead. The config folder inside holds the ini file that defines the install.

Linux
/var/www/matomo/config/config.ini.php

Database credentials, salts, and trusted hosts. Restrict read access to the web user. Keep a copy off the server with database dumps.

Frequently asked questions

what do i back up for a Matomo move

Save config/config.ini.php with a database dump and any custom plugins. The config holds salts and database passwords. Uploads are minimal, the database carries reports. Those three restore tracking.

can i clear the Matomo tmp folder safely

Delete files under tmp/cache and tmp/templates_c with Matomo running. The tmp folder holds compiled templates and cached reports. Matomo rebuilds it on demand. Never delete config while clearing.

Notice an outdated path? Let us know.