Back to templates
Matomo icon

Deploy Matomo on Sealos

Matomo is the leading open source web analytics platform that gives you valuable insights into your website visitors

Monitoring
Start collecting operational signals with a ready-to-run Matomo template.Keep observability data in your own self-hosted environment.Attach persistent storage for logs, metrics, or dashboards.Deploy monitoring infrastructure without manual Kubernetes setup.

Why deploy on Sealos

Sealos makes deploying any app effortless, secure, and production-ready. From one-click launch to ongoing operations, we handle the heavy lifting so you can focus on what matters.

One-Click Deploy
Sealos logo
Compute
Networking
Storage
Security
Observability
Your Application is Live

One-Click Deployment

Deploy any app template in seconds. No compose setup, manual configure, and go live.

Managed Kubernetes Reliability

Built on Sealos Managed Kubernetes for high availability, auto-scaling, and self-healing by default.

Automatic HTTPS & Security

Every deployment includes a secure domain with automatic SSL. We handle certificates and text protection for you.

Persistent Storage

Attach persistent volumes with ease. Your data stays safe, durable, and always accessible.

Scale when needed

Adjust resources as your app grows, no downtime required.

You Get the Whole Stack

Sealos provisions and connects every resource your application needs. Everything is ready to use.

One-click, fully provisionedSecure by defaultProduction ready

App Service

Your application is running and ready to serve requests.

Public HTTPS URL

Secure, global endpoint to access your application.

Database

Managed database instance for your application.

Persistent Volume

Durable storage for uploads and application data.

Environment Variables

Configuration and secrets injected securely into your app.

Logs & Metrics

Centralized logs and basic metrics are enabled.

README

README.md

Deploy and Host Matomo on Sealos

Matomo is an open source web analytics platform for tracking visitor behavior, conversions, campaigns, and site performance. This template deploys Matomo with the official Apache/PHP runtime, persistent application storage, and a Sealos-managed MySQL database on Sealos Cloud.

About Hosting Matomo

Matomo runs as a single Apache/PHP application container, which avoids sidecar configuration drift during restarts and provides the public HTTP entry point directly. Sealos provisions a MySQL database through KubeBlocks and persistent storage for /var/www/html, so application files and generated configuration survive restarts.

On first access, Matomo opens its installation wizard. The template preconfigures the database host, database username, password, database name, table prefix, and trusted host through Matomo-supported environment variables, so you can proceed through the wizard and create the first superuser account from the browser.

Common Use Cases

  • Privacy-focused web analytics: Track website traffic while keeping analytics data under your control.
  • Campaign and conversion tracking: Measure marketing campaigns, goals, funnels, and ecommerce events.
  • Product usage analytics: Monitor how users navigate product documentation, portals, or SaaS dashboards.
  • Self-hosted reporting: Provide teams with analytics dashboards without relying on third-party hosted analytics.

Dependencies for Matomo Hosting

The Sealos template includes the required runtime services: Matomo Apache/PHP runtime, persistent storage, and a MySQL database.

Deployment Dependencies

Implementation Details

Architecture Components:

This template deploys the following services:

  • Matomo Application: Runs Matomo 5.10.0 with the official Apache/PHP image and serves the web UI on port 80.
  • MySQL: A Sealos-managed KubeBlocks MySQL cluster stores analytics data and application settings.
  • Persistent Storage: A 1 GiB volume stores Matomo application files and generated configuration under /var/www/html.

Configuration:

  • The public endpoint is exposed through Sealos Ingress with automatic HTTPS.
  • Database connection values use Matomo-supported MATOMO_DATABASE_* environment variables and are sourced from the Sealos-managed MySQL credential secret.
  • The first Matomo administrator is created in the browser during the installation wizard.
  • Keep the generated public URL stable after installation because Matomo records it as a trusted host.

License Information:

Matomo is licensed under GPL-3.0. This Sealos template is provided under the repository license.

Why Deploy Matomo on Sealos?

Sealos is an AI-assisted Cloud Operating System built on Kubernetes that unifies application deployment, networking, storage, and operations. By deploying Matomo on Sealos, you get:

  • One-Click Deployment: Deploy Matomo and MySQL from a ready-made template without writing Kubernetes YAML.
  • Managed Public Access: Sealos creates an HTTPS endpoint for the Matomo web UI.
  • Persistent Data: Application files and database data are stored on persistent volumes.
  • Easy Operations: Use the Canvas, AI dialog, and resource cards to adjust resources or inspect runtime state.
  • Pay-as-you-go Resources: Start with a small footprint and scale resources when analytics volume grows.

Deployment Guide

  1. Open the Matomo template and click Deploy Now.
  2. Keep the default parameters or adjust the generated app name and host in the popup dialog.
  3. Wait for deployment to complete, typically 2-3 minutes. After deployment, you will be redirected to the Canvas. For later changes, describe your requirements in the AI dialog, or click the relevant resource cards to modify settings.
  4. Open the provided Matomo URL.
  5. Complete the Matomo installation wizard:
    • Confirm the system check.
    • Use the prefilled database settings when shown.
    • Create the first superuser account.
    • Add your first website and copy the tracking code into the site you want to measure.
    • On the final congratulations page, click Continue to Matomo to reach the sign-in page.
  6. Sign in with the superuser username and password you created in the wizard.

Configuration

After deployment, configure Matomo through:

  • Installation Wizard: Create the first administrator and website when you open the app for the first time.
  • Matomo Admin Panel: Manage users, websites, privacy settings, plugins, and tracking code after installation.
  • AI Dialog: Describe resource or configuration changes in the Sealos Canvas.
  • Resource Cards: Open the StatefulSet, MySQL, Ingress, or storage cards to inspect and adjust runtime settings.

Scaling

The template uses a validated 512 MiB memory limit so the installation wizard can finish without PHP/Apache being OOMKilled. As traffic grows:

  1. Open the Canvas for your deployment.
  2. Click the Matomo StatefulSet resource card.
  3. Increase CPU or memory using the allowed Sealos resource options if dashboards or archiving become slow.
  4. Apply the change and verify the Matomo dashboard remains available.

For high-traffic installations, also configure Matomo archiving through cron according to the official Matomo documentation.

Troubleshooting

Installation wizard cannot connect to the database

  • Cause: MySQL may still be starting or credentials may not be ready yet.
  • Solution: Wait until the MySQL pod and the Matomo pod are running, then reload the wizard.

Browser shows a trusted host or HTTPS warning

  • Cause: Matomo validates the host it is accessed through.
  • Solution: Use the Sealos-provided public URL and avoid changing the app host after completing installation.

Setup stops midway or the pod restarts

  • Cause: Matomo can exceed a 256 MiB container limit while creating tables, plugins, and the first admin account.
  • Solution: Keep the template memory limit at 512 MiB or higher during setup. The current template already uses this validated limit.

Analytics reports are slow on larger sites

  • Cause: Browser-triggered archiving can become slow with more traffic.
  • Solution: Follow Matomo's cron archiving guide and increase application resources if needed.

Getting Help

Additional Resources

License

This Sealos template is provided under the repository license. Matomo itself is licensed under GPL-3.0.

Related templates

Explore more production-ready templates.

More

Ready to Stop Configuring and
Start Creating?

Get started for free. No credit card required.

Play