Matomo on Docker vs Kubernetes vs VMs

Matomo on Docker, Kubernetes or VMs changes who patches, backs up and recovers the install. Matomo's sizing guidance sets the traffic thresholds, so the team's operating skills usually decide the model.

On this page

Which Matomo deployment model fits your team

A virtual machine or a single Docker host suits a team without cluster operations skills, and Kubernetes suits a team that already runs a cluster with platform staff. The choice turns on three questions: who operates the install day to day, how many hosts the business needs and how much availability it expects, and how much traffic the site carries. Matomo's sizing guidance sets the traffic thresholds that matter. Its requirements FAQ sizes a single server with at least 4 CPUs, 8 GB of RAM and 250 GB of SSD for up to 1 million pageviews a month, and recommends separate application and database servers with 8 CPUs and 16 GB of RAM each for up to 10 million pageviews a month. Above that band, plan the architecture with your implementer before you buy hardware or cluster capacity.

The operating burden differs more than the diagrams suggest. On a VM, your team owns the operating system, the web server (Apache, Nginx, IIS or LiteSpeed), PHP, the MySQL or MariaDB database, the scheduled Matomo jobs and the backups, all on one host that is a single failure domain. A single Docker host moves the same services into containers, so the Compose file and image tags become configuration you version, but the Docker engine, the host OS and the data volumes still need the same hands. Kubernetes splits Matomo into workloads that the platform team schedules, restarts and scales, with ingress, persistent storage and scheduled jobs handled by the cluster. That lowers effort only when those cluster services already exist and someone is on call for them. Confirm with your implementer which of these pieces you would build from scratch.

Turn the choice into three written checks before you pick a model. First, name the people who will patch PHP and the database, run the Matomo upgrade, restore a backup and respond when tracking stops. Second, pull your monthly pageview count from your analytics platform or web server logs and place it in one of the two sizing bands above. Third, write down how long the business can tolerate analytics being unavailable after a host failure, since a single VM or Docker host has no second machine to take over. Check the version before you build. Matomo 6.0.0 is in beta and needs PHP 8.1 or newer and MySQL 8.0 or newer or MariaDB 10.6 or newer, while the latest stable release is 5.14.1, so pin the version your team can keep current. Read Matomo's requirements FAQ before you finalize the stack.

How Docker and Kubernetes compare for running Matomo

This table compares running Matomo as Docker containers on one or more hosts against a Kubernetes cluster, across deployment unit, sizing, availability, upgrades, backups, monitoring and skills. Use the sizing row as the documented baseline, and confirm every container-specific detail with Matomo's current documentation and your platform team before you commit. The plain virtual machine baseline is covered in the architecture cards, and database placement matters more as traffic grows.

AreaDocker on one or more hostsKubernetes cluster
Unit of deploymentMatomo app container on each host, managed with Compose or a similar toolMatomo pods scheduled across nodes, packaged as manifests or a chart you maintain
SizingPer Matomo's requirements FAQ: 4 CPUs, 8 GB RAM, 250 GB SSD for up to 1 million pageviews a monthSame app sizing per pod, plus node capacity for the cluster and any database outside it
High availabilityMultiple app hosts behind a load balancer; confirm multi-node support with Matomo's documentationReplicas and rescheduling by the cluster; the database remains a single point to design around
UpgradesConfirm PHP and database minimums first; 6.0.0 (beta) needs PHP 8.1+ and MySQL 8.0+Same checks, then rolling pod replacement with pinned image tags tested in staging
BackupsBack up the database and config volumes on each host, with a restore testBack up the database and persistent volumes; your team owns data backup outside the cluster
Database placementMatomo's guidance separates app and database servers at higher traffic, 8 CPUs and 16 GB eachKeep the database on its own storage and backup plan, outside normal pod scheduling
MonitoringHost metrics, container logs and web server logs on each nodeNode, pod and ingress metrics plus container logs through your cluster monitoring stack
Skills neededLinux, Docker, web server and MySQL or MariaDB administrationThose skills plus Kubernetes operations, manifests, storage classes and ingress
Best fitTeams with a few Matomo sites and an existing container hostTeams already running a cluster with platform staff who operate it daily

How the Matomo components map to a VM, a container or a cluster

Matomo runs the same components in every model: a web server (Apache, Nginx, IIS or LiteSpeed), PHP, a MySQL or MariaDB database and scheduled jobs. The topology decides where those pieces sit, who patches them and which part becomes the hardest to keep running.

Single VM with web server, PHP and database

Everything shares one host. Apache, Nginx, IIS or LiteSpeed, PHP and MySQL or MariaDB compete for the same CPU, memory and disk. The Matomo requirements FAQ sizes a single server at 4 CPUs, 8 GB of RAM and 250 GB of SSD for up to 1 million pageviews a month. The hardest part is the database, because a restore or a database upgrade also takes the web tier down. Plan maintenance windows, and check that backups and scheduled jobs do not collide with peak reporting hours.

Matomo requirements FAQ

Separate app and database servers

The network path between the two servers becomes part of the system. Matomo's requirements FAQ recommends separate app and database servers with 8 CPUs and 16 GB of RAM each for up to 10 million pageviews a month. Each host needs its own patching, monitoring and backups, and the app host needs a dependable connection to the database. The hardest part is recovery: reports stay unavailable until a failover or restore has been tested. Ask who owns each host and who is paged when the database is unreachable.

Docker containers on one or more hosts

Persistent state must live outside the containers. Web, PHP and scheduled jobs can run as containers, but configuration, uploaded files and database storage need volumes that survive image replacement. On one host, Docker mainly packages the stack. Across several hosts, you also need a placement method and a way to restart containers after a host failure. Matomo 6.0.0 is in beta and needs PHP 8.1 or newer with MySQL 8.0 or MariaDB 10.6 or newer, so pin image tags to the version you run. The hardest part is upgrades, so test each new image against a copy of your data first.

Kubernetes cluster with database inside or outside

Database placement decides the operating model. Web and PHP pods can scale out behind a service, and scheduled jobs can map to CronJob resources, but only if configuration and uploaded files are shared correctly across replicas. A database inside the cluster needs a stateful operator, persistent volumes and tested backups. A database outside the cluster needs a separate host or managed service, plus network policy between the two. The hardest part is keeping the stateful database recoverable. Confirm the full list of scheduled jobs in Matomo's documentation before you map each one to a CronJob.

Where each layer sits in a Matomo request path

The diagram starts with a visitor's browser sending a tracking request to a load balancer or ingress, which passes it to the web server on the app server. The web server hands the request to the Matomo PHP application, which reads and writes analytics data in MySQL or MariaDB. The database sits inside its own trust boundary, so only the application server should reach it. Backup jobs dump the database from outside that boundary, and monitoring watches the application and the database. Check where each layer runs, who can reach the database port, and whether backup and monitoring cover every layer.

Tracking request path with the database trust boundary marked.

How Matomo sizing carries across VMs, containers and clusters

Matomo's requirements FAQ sets the baseline you carry into any runtime. A single server needs at least 4 CPUs, 8 GB of RAM and 250 GB of SSD for up to 1 million pageviews a month. Past that point, the FAQ recommends separate app and database servers, each with 8 CPUs and 16 GB of RAM, for up to 10 million pageviews a month. These figures describe the capacity Matomo needs, so they apply whether the host is a VM, a Docker host or a Kubernetes node. Start by counting your monthly pageviews, because that number decides which topology applies. Then confirm the traffic forecast with the team that owns the site tags before you size anything.

Containers and pods should carry the same CPU and memory allocations as the VM they replace. On Docker, set --cpus and --memory on the Matomo container. On Kubernetes, set resources.requests and resources.limits in the pod spec, so the scheduler reserves the capacity the tier needs before it places the pod. Set requests at the FAQ figure for your chosen tier, and do not set limits below it, because archiving runs can spike and peak load should be tested in staging before limits are final. Ask the platform team to confirm how the cluster handles CPU throttling and pod eviction under node pressure, and whether a node pool has the 8 CPUs and 16 GB of RAM needed per app or database role with headroom left for other workloads.

The FAQ's 250 GB of SSD describes capacity, and the database also depends on disk speed. Matomo stores visit data and report archives in MySQL or MariaDB, so disk latency and throughput will shape how quickly reports load and how long archiving takes. Storage speed for the database must be confirmed separately with the team that runs it, whether that is a DBA group, a managed database service or the platform team. Ask for the disk type, the provisioned IOPS or throughput, the backup window and whether the volume uses the same storage class in each runtime you are comparing. That answer is needed for every option, so get it in writing before choosing between a VM, Docker and Kubernetes.

Who handles Matomo deployment upgrades, backups and monitoring

This table compares who performs each operating task for Matomo on Docker and on Kubernetes: upgrades, backups, restores, monitoring, rollback and the skills each needs. Read it as a split of responsibility, since your team keeps the database, backups and restores on both. Matomo 6.0.0 requires PHP 8.1 or newer and MySQL 8.0 or newer or MariaDB 10.6 or newer, and it has been in beta since September 9, 2026, so confirm its current status on Matomo's changelog before you plan.

TaskMatomo on DockerMatomo on Kubernetes
Upgrade version checksTeam confirms the image has PHP 8.1+ and MySQL 8.0+ or MariaDB 10.6+ before choosing the tag.Platform team checks PHP and database versions in the target image and database before changing the deployment.
Upgrade rolloutTeam schedules a maintenance window, pulls the new image and restarts the container.Platform team changes the image tag, watches the rollout and plans how old and new pods overlap during a database upgrade.
BackupsTeam sets up scheduled dumps of the MySQL or MariaDB database and copies the uploaded files volume.Platform team uses a backup operator or cluster snapshots, plus a database-level dump the team verifies.
RestoresTeam restores the dump and files into a test container and checks reports before any cutover.Platform team restores into a separate namespace and checks database and volumes together, not one snapshot alone.
MonitoringTeam watches host metrics, container health and scheduled archiving jobs, and adds alerts itself.Platform team uses cluster metrics and probes, and must confirm which pods run scheduled archiving jobs.
RollbackTeam redeploys the previous image tag, but a database already upgraded needs a restore from backup.Platform team reverts the deployment revision, but database changes still need the restore plan from backup.
Skills each task needsLinux, Docker, MySQL or MariaDB administration, and PHP and web server basics.Kubernetes operations, storage, secrets and ingress, plus MySQL or MariaDB administration.

What a Matomo deployment upgrade asks of each model

The first decision is which release line to plan against. Matomo's changelog lists 5.14.1, released on October 4, 2026, as the latest stable version, while 6.0.0 has been in beta since September 9, 2026. Keep production planning on the stable line and treat 6.0.0 as a test target only, built into a staging copy of your Docker image, Kubernetes manifests or VM build. Whichever model you run, record the exact image tag or package version you deploy, so that a later pull of a floating tag cannot move production onto a beta or a different minor release without a change record.

Matomo's requirements FAQ sets the runtime floor for each line. Matomo 6.0.0 needs PHP 8.1 or newer and either MySQL 8.0 or newer or MariaDB 10.6 or newer. Matomo 4.16 and 5 run on PHP 8 with MySQL 5.5 or later or MariaDB, behind a web server such as Apache, Nginx, IIS or LiteSpeed. Check these against what you actually ship: in Docker and Kubernetes, that means the PHP version in the image and the database version in your managed or in-cluster database; on VMs, it means the packages available in the host's repositories, which may lag behind the versions you need. Confirm the current figures on the Matomo requirements FAQ before you approve a database upgrade, since the database often follows a separate patch schedule from the application.

Container image tags and cluster rollouts do not remove the need for a tested migration path. A new image changes the code, but the Matomo database schema still has to move from the old version to the new one, and that step can fail or run long on a large archive. Before any rollout, restore a recent backup into staging, run the upgrade there on the same PHP and database versions as production, and time it. Then write the rollback plan down: keep the previous image tag or package version, the database backup taken immediately before the upgrade, and the configuration file, and confirm the team can restore all three together. Rolling back pods alone leaves the new schema in place, so the old image may fail against it. The same applies to VM package upgrades.

Which team fits a Docker, Kubernetes or VM install

A small IT team without a cluster gets the least operating surface from one virtual machine or one Docker host running Matomo, the web server and the database. Matomo's requirements FAQ sizes a single server at a minimum of 4 CPUs, 8 GB of RAM and 250 GB of SSD for up to 1 million pageviews a month. This model fits teams whose traffic stays inside that range and whose members already run Linux services.

  • Skills needed: Linux administration, a PHP and web server stack such as Apache or Nginx, and MySQL or MariaDB administration. Docker skills help only if the team already runs containers.
  • On-call load: One host to patch, back up and restore, with a short list of failure points. Someone still answers for analytics downtime, which is usually tolerable for a marketing site.
  • Where it fits: Traffic within single-server sizing, no need to scale out, and a team that will carry out upgrades by hand on a fixed schedule.
  • Where it does not fit: Traffic growing toward the 10 million pageviews a month level, where Matomo's FAQ pairs separate app and database servers of 8 CPUs and 16 GB of RAM each. Matomo 6.0.0 is in beta and needs PHP 8.1 or newer and MySQL 8.0 or MariaDB 10.6 or newer, so confirm that your OS packages meet those minimums before you choose a major version.

Confirm your monthly pageview count, the restore time your stakeholders expect and whether your distribution's packages match the Matomo version you plan to run.

How to move a Matomo install between deployment models without losing data

This sequence moves an existing Matomo install to a new deployment model at the same version, with the data checked at each stage. It produces a verified copy in staging, a written comparison of key reports against the source, and a cutover plan with a rollback window. Effort depends on install size, database volume and plugin count, so ask for the work to be scoped in writing before it starts.

  1. Record the current Matomo stack

    The platform owner records the installed Matomo version, PHP version, database engine and version, web server, and every installed plugin with its license type, such as GPL or a paid InnoCraft plugin. They also note cron and archiving settings, custom configuration and any files changed outside the Matomo directory. Check PHP and database versions against Matomo's requirements for the release in use, since they differ between major versions. The step is done when a signed inventory lists every item and each gap is assigned an owner.

  2. Back up files and the database

    The DBA or platform engineer takes a consistent database dump and copies the Matomo files, including config/config.ini.php, custom plugins, and any uploaded or custom assets. Store both copies outside the source host, and record checksums for each file. Keep the source running during this step, because the backup is a point-in-time copy used for staging and as the fallback if the cutover fails. The step is done when a test restore of the dump succeeds on a scratch database and the checksum list is filed with the inventory.

  3. Build the target at the same version

    The platform team builds the Docker image, Kubernetes manifests or virtual machine at the same Matomo version and the same PHP and database versions as the source. Keep the move separate from any upgrade, so a fault points to one cause. Persistent storage for the Matomo files and the database must be defined before the first start, whether as Docker volumes, Kubernetes persistent volume claims or VM disks. The step is done when an empty target starts, passes Matomo's system check, and lists the same plugins as the inventory.

  4. Restore into staging and compare reports

    The engineer restores the database dump and files into staging, runs the scheduled archiving job, and then compares the same reports between source and staging for a fixed date range. The check covers visits, pageviews, goals, ecommerce if used, custom dimensions, and any segments the business relies on. Any mismatch is traced before cutover, and the team agrees in writing what tolerance counts as a match. The step is done when a signed comparison sheet shows each named report matching the source, or every difference has a documented cause.

  5. Plan the cutover and rollback window

    The team freezes configuration changes on the source, takes a final database and file sync, and moves traffic by switching the DNS record, load balancer or ingress target. Tracking snippets on the websites point to the Matomo hostname, so keep that hostname stable or schedule tag updates before the switch. The rollback plan repoints traffic to the source, which stays intact until verification finishes, and the length of the window is agreed in the written scope. The step is done when the runbook is approved and the rollback steps have been rehearsed in staging.

  6. Verify tracking and retire the source

    After the switch, the team confirms that tracking requests arrive at the new host, scheduled archiving runs, and the reports keep updating as expected on live traffic. The source stays intact and read-only until the agreed verification period ends. Only then does the team decommission the old host, with its backups kept under the retention rule the client sets. Effort depends on install size, database volume and plugin count, so ask the implementation partner to scope the full sequence in writing before any work begins.

What buyers ask before choosing a Matomo deployment model

What drives the cost of running Matomo on Docker, Kubernetes or a VM?

Most of the cost is people and hours, not the software, because the On-Premise Community edition is free with unlimited users and hits. The main drivers are the server footprint, the database layout and how much operating work each model adds. A single VM with a web server, PHP and MySQL or MariaDB has the fewest moving parts. Docker adds images, volumes and a host to maintain. Kubernetes adds a cluster, ingress, storage classes and its own upgrade cycle, which only pays off if your organization already runs it. Recurring costs include hosting, backups, patching, Matomo and PHP upgrades, and monitoring. Premium plugins such as Heatmap and Session Recording are separate paid purchases sold per number of users. Ask any quote to separate one-time build work from the ongoing operating effort, and to name who carries each item.

Can a small team run Matomo on a single VM without Kubernetes?

Yes, a small team can run Matomo on a single virtual machine without Kubernetes, and for modest traffic that is often the simplest layout. Matomo's requirements FAQ describes a PHP application behind a web server such as Apache, Nginx, IIS or LiteSpeed, backed by MySQL or MariaDB. For up to 1 million pageviews a month, the FAQ sizes one server with at least 4 CPUs, 8 GB of RAM and 250 GB of SSD. Beyond that, it recommends separate app and database servers with 8 CPUs and 16 GB of RAM each for up to 10 million pageviews a month. The team should confirm it can handle OS patching, PHP and database updates, TLS certificates, backups and restore tests on that host. Check the version floor before picking a target release: Matomo 6.0.0 needs PHP 8.1 or newer and MySQL 8.0 or newer, or MariaDB 10.6 or newer. The changelog lists 5.14.1 as the latest stable release.

Why does the duration of a Matomo deployment depend on scope?

Duration follows the scope of work. The largest variables are the traffic tier, the number of sites, the server layout (single host or separate app and database servers), whether high availability is required, how many premium plugins or custom integrations are involved, and how much data must be migrated from an existing analytics tool. Google Analytics imports carry their own limits: the importer brings in aggregated report data only, so the Visitor Log, Ecommerce Log, Custom Reports and Segmentation do not work for imported reports. Consent configuration for EU sites adds review time. Evidence requirements also change the work, such as access control records, audit logging and backup restore results for your compliance team. Ask for a timeline tied to a written scope with named deliverables, and ask which milestones depend on your approvals and access.

What does a Matomo project need from our own engineering and security team?

Your team keeps ownership of decisions and access, and an implementation partner can carry much of the build. Expect to need:

  • A named platform owner who approves changes and accepts the handover.
  • Someone who can provision hosts or the cluster, DNS, TLS certificates and network rules inside your infrastructure.
  • Database and backup owners who can run restore tests and align retention with your policy.
  • Identity and access contacts for SSO, admin roles and the audit logs your reviewers will request.
  • Web developers to place the tracking code on your sites and to review any custom plugins.

Ask the partner to state which of these it runs, which it trains your staff to run, and which stay with your team after handover. DeployOpen plans, implements, hardens, backs up, upgrades and documents self-hosted platforms inside your own infrastructure. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.

Is Kubernetes required for high availability in Matomo?

Kubernetes is optional for high availability. Availability comes from design choices, and several layouts can meet a given target if they are built and tested for it. The design usually includes redundant web and PHP capacity behind a load balancer, a database setup with replication or managed failover, shared handling for the files Matomo writes, a defined approach to how archiving runs across nodes, and tested restore procedures. Docker on two hosts, a pair of VMs with a managed database, or a Kubernetes cluster can each fit a target, depending on your recovery time and recovery point goals and on how your team operates the parts. Confirm the supported topology, the failover behavior and the database replication steps with Matomo's documentation and with your own failover tests before you commit to a design.

When does Matomo Cloud fit better than self-hosting at low traffic?

Matomo Cloud tends to fit better at low traffic when you do not want to run any servers. Matomo's pricing page lists Cloud plans starting at 29 (excluding tax) per month for tiers from 50,000 to 10 million hits a month, with Cloud data stored in Frankfurt, Germany. The On-Premise Community edition is free with unlimited users and hits and forum support, but you pay for hosting, admin hours and upgrades yourself. Self-hosting tends to pay off when hosting is already funded, when data must stay in your own cloud accounts or data centers, when you need to control upgrade timing, or when traffic grows well past the Cloud tiers. Compare the monthly Cloud fee with your full hosting and admin cost, and remember that premium plugins are separate purchases in either case. Ask Matomo which tier your monthly hit count falls into.

Which checks should engineers run before choosing Docker, Kubernetes or a VM?

Engineers should test the same checks on every candidate layout before the team chooses one:

  • Confirm the PHP version, extensions and web server combination against the target Matomo release.
  • Confirm the database engine and version, including the minimums for the release you plan to run.
  • Measure archiving and report generation at your expected pageview volume on the chosen server sizes.
  • Decide where uploaded files, configuration and backups live, and who can restore them.
  • Rehearse an upgrade on a copy of production, including rollback.
  • Set up monitoring for disk growth, database health and failed scheduled jobs.

A container image or cluster does not change these checks, so the layout decision should follow the results. Record the outcomes in the design document, since auditors and security reviewers will ask how the platform was built and how it is maintained.

How DeployOpen scopes and runs a Matomo deployment

DeployOpen plans, implements, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Matomo, that means choosing the Docker, Kubernetes or VM layout with your team, sizing it against your expected monthly pageviews, and agreeing the scope in writing before work starts.

How we scope

  • The written scope names the layout, expected monthly pageviews, target Matomo version and hosting location.
  • Sizing starts from Matomo's published tiers, so a single server and split app and database servers are sized separately.
  • Features that remove the CNIL consent exemption, such as User ID or session recordings, are written into the scope.

How we build

  • Each layout is built inside your cloud account, data center or air-gapped network under your change control.
  • Database and application servers are configured with backups, TLS and access controls agreed with your security team.
  • Security testing of the deployed application, its APIs and the underlying infrastructure can run before go-live.

How we hand over

  • Handover includes written runbooks for installing, upgrading, restoring and rolling back each Matomo layout.
  • Upgrade notes cover PHP and database minimums, and confirm whether Matomo 6.0.0 is stable before you choose it.
  • Documentation records which plugins are installed and under which license, for later reviews.

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Ask for the quote to list upgrade windows, backup restore tests and the retainer scope separately from the build.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.