Access Matomo
- Open your web browser and navigate to:
http://<SERVER-IP> - Follow the Matomo web setup wizard to complete installation.
Important Files & Directories
- Web Root:
/var/www/matomo(owned bywww-data:www-data) - Apache Configuration:
/etc/apache2/sites-available/matomo.conf - Logs:
/var/log/apache2/matomo_error.log&/var/log/apache2/matomo_access.log - Database Credentials:
/root/.cloudzy-creds
Database Setup
During setup, enter the following credentials from the generated file (/root/.cloudzy-creds):
- Database Server:
127.0.0.1 - Login:
matomo - Password: Randomly generated
- Database Name:
matomo
Apache Management
Manage the Apache service using systemd commands:
systemctl status apache2
systemctl restart apache2
systemctl stop apache2
systemctl start apache2
Enabling SSL with a Domain
1. Point your domain to the server IP.
2. Edit Apache config and replace ServerName <IP> with your domain (ServerName <your-domain>):
vim /etc/apache2/sites-available/matomo.conf
3. Install Certbot:
apt install -y certbot python3-certbot-apache
4. Run the following command to generate a valid Let’s Encrypt certificate:
certbot --apache --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Restart Apache to apply the changes:
systemctl restart apache2
6. Edit the Matomo configuration file (/var/www/matomo/config/config.ini.php) and update the trusted_hosts setting under [General] to include your domain instead of the IP:
[General]
trusted_hosts[] = "yourdomain.com"
7. Open your browser and visit: https://yourdomain.com