Matomo
Open-source web analytics that runs on your own server and can import web server logs instead of using a tracking script.
Reviewed by adrian
on
Matomo is open-source web analytics written in PHP with a MySQL or MariaDB database. It usually counts visits with a JavaScript tracker, but it also ships a Python importer (misc/log-analytics/import_logs.py) that reads web server logs, Caddy's JSON log among them. I run it on my VPS in Docker Compose and feed it only from the server log, without a script on the pages and without cookies: Visitor Statistics from the Server Log with Matomo.
What matters in practice
- Archiving: reports are built by
console core:archive, run hourly from cron. Fresh data shows up only after the next run. - Privacy settings apply to the whole instance: IP masking, referrer anonymisation and the deletion of old raw data hold for every site in it.
- Users since Matomo 5: new users come in by invitation. The invite link can be copied in the user list instead of waiting for the email.
- Tokens: created per user under Personal, Security. "Only allow secure requests" accepts the token in POST requests only. Tokens expire after 180 days unless you choose another date.
- API:
index.php?module=API&method=…, withperiod=range&date=<from>,<to>for any span of days. Version 5 also reports visits from AI assistants (Referrers.getAIAssistants).
Based on
-
Matomo visitor statistics for adrian-altner.com: setup
(
raw/2026/2026-11-18/matomo-visitor-statistics-for-adrian-altner-com-setup.md) [setup]
Used in
- Visitor Statistics from the Server Log with Matomo A self-hosted Matomo fed hourly from Caddy's access log: no tracking script, no cookies, masked IP addresses.