Analytics

Host Matomo on VeloxaHost

Matomo is a full web analytics platform, the closest self-hosted match to Google Analytics, with goals, ecommerce reports, segments, heatmaps through plugins, and full ownership of the raw data. Agencies, public bodies and companies with privacy obligations run Matomo On-Premise on their own server.

The one-click install sets up Apache, PHP and MariaDB on Ubuntu 24.04 (PHP 8.3 and MariaDB 10.11 from Ubuntu's archive), downloads the latest Matomo release into /var/www/html/matomo, and creates a matomo database and user with a generated password, shown on the server's page in the console. Apache serves it on port 80 under the /matomo/ path.

Documentation, the FAQ and the plugin marketplace are on matomo.org.

Prefer to set it up yourself? The Matomo self-host guide covers the manual route on Ubuntu 24.04: install, first login, HTTPS, backups and updates.

What it needs

Matomo publishes server sizing by traffic. Up to 100,000 pageviews a month, it suggests one server for the app and the database with 2 CPUs, 2 GB of RAM and 50 GB of SSD. Up to a million, 4 CPUs, 8 GB and 250 GB. The current release, Matomo 5.14.1, needs PHP 8 and MySQL 5.5 or newer or MariaDB; Matomo's page lists PHP 8.1 and MySQL 8.0 or MariaDB 10.6 for the coming Matomo 6. Ubuntu 24.04 meets both.

The recommended 2 vCPU, 4 GB of RAM and 50 GB of disk fit the Veloxa 2 size: 2 vCPU, 4 GB RAM and 80 GB of disk for $15 a month, billed at $0.03 an hour and capped at the monthly price. For the million-pageview tier, Veloxa 4 (4 vCPU, 8 GB RAM, 160 GB disk, $30 a month) matches Matomo's figures.

First steps after deploy

  1. Every server gets a block of ports on the region's shared IPv4 address. Under How to connect on the server's page, forward a port of the block to 80.
  2. Open http://<shared-ip>:<port>/matomo/ and follow the installer. The database server is localhost, the database and user are matomo, and the password is the generated one from the console. The PHP extensions in Matomo's own install line, php-mbstring and php-cli among them, come with the one-click install, so the system check passes.
  3. Turn off browser-triggered archiving and process reports from cron, as Matomo advises above a few hundred visits a day. Add this to /etc/cron.d/matomo:
    5 * * * * www-data /usr/bin/php /var/www/html/matomo/console core:archive --url=http://localhost/matomo/
    

The tracking code must load over HTTPS on HTTPS websites. For a domain with a certificate on port 443, use a dedicated IPv4 address (a paid add-on with limited availability) and certbot --apache. IPv6 is not available in US East yet.

Backups and updates

Matomo's update guide asks for a full database backup and a copy of config/config.ini.php before updating. On VeloxaHost, take a snapshot, and turn on automatic snapshots (hourly up to weekly, kept for 1 to 30 days) or scheduled backups (every 6 hours up to weekly, keeping 1 to 10). Keep mariadb-dump exports too.

Update with the one-click updater in Administration, or from the browser terminal, which Matomo recommends for busy sites:

sudo -u www-data php /var/www/html/matomo/console core:update

Then check Diagnostics, System check.

FAQ

How much RAM does Matomo need?

Matomo's sizing guide gives 2 GB for up to 100,000 pageviews a month and 8 GB up to a million, with the database on the same server. Archiving long date ranges is the memory-hungry part; raise memory from the console without a restart if reports time out.

Can I import my Google Analytics data?

Yes, with the free Google Analytics Importer plugin, which supports GA4. It needs cron archiving and shell_exec or exec allowed for PHP, and large imports take several days because of Google's API limits.

Can I use my own domain?

Yes. Point a DNS record at a dedicated IPv4 address and add a certificate, or use your domain with a forwarded port on the shared address. Update the trusted hostnames in config.ini.php if you change the address later.

What license is Matomo under?

Matomo On-Premise is free software under the GPL v3 or later. Matomo also sells a hosted cloud service and paid premium plugins.

Can Matomo send scheduled email reports?

Yes, through your email provider's SMTP settings in System, General settings. VeloxaHost blocks outbound TCP port 25 by default, so use port 587 or 465.

Which VeloxaHost size fits Matomo?

The recommended 2 vCPU and 4 GB of RAM is a Veloxa 2: 2 vCPU, 4 GB RAM and 80 GB of disk for $15 a month, billed at $0.03 an hour and capped at that price.