Build Matomo Cloud
KINDAreplaces $26/mosaves $312/yrback to the verdict
Build a self-hosted Matomo installation with working archives and recoverable data.
Before step 1
Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.
- installDocker Engine has no hosting fee; Desktop licensing depends on your use, and a rented host is billed separately.
Why The upstream application runs in containers.
Get it Install Docker Engine and the Compose plugin on Linux using the official instructions. On Windows use Docker Desktop with WSL2, then work inside a Linux project folder. open ↗
Verify
docker compose version prints a v2 version and docker info reaches the daemon. - decideSoftware/edition terms and optional paid features are defined by the upstream project.
Why The guide must match the software you actually deploy.
Get it Open https://matomo.org/faq/on-premise/installing-matomo/, choose a stable release compatible with its database requirements, record its tag and resolved digest in versions.txt, and use those values in compose.yaml. Avoid unattended latest-tag updates. open ↗
Verify
versions.txt names both application and database versions or states that the pilot uses embedded SQLite. - have readyNo paid service required for this local step.
Why This fixture makes the first end-to-end check reproducible.
Get it Create synthetic sample data before implementation: One owned site with a pageview, a campaign-tagged visit and a goal completion. Save it under fixtures/ with the expected results in fixtures/README.md; use no real credentials or customer records.
Verify
The fixture files and expected outcomes exist and can be inspected without a vendor account. - decideNo paid service required for this local step.
Why The full commercial product is larger than this guide.
Get it The deliverable is a self-hosted Matomo installation with working archives and recoverable data. Read every exclusion below. Indie mode runs locally; any public or shared use requires the product access and deployment gates first.
Verify
You can name the primary workflow and the vendor features this version deliberately leaves out.
Data model
Create these before the first phase that stores anything. Changing a table later is the expensive kind of change.
- Use the upstream Matomo MySQL/MariaDB schema. Back up its database, config/config.ini.php, custom plugin/theme files and the pinned application version together. Keep test site ids and archive-run evidence in OPERATIONS.md. - Use stable ids and explicit relationships; add auxiliary tables named by the phases before those phases use them. - Acceptance fixture: One owned site with a pageview, a campaign-tagged visit and a goal completion.
Environment variables
These go in a .env file the app reads at startup. The pack's .env.example is this table as a file · copy it, never commit the filled-in version.
| Variable | Needed | Example | Where the value comes from |
|---|---|---|---|
APP_IMAGE | required | replace-with-tested-image-and-digest | Copy the exact application image reference selected from upstream into compose.yaml via this variable. |
SITE_URL | required | http://localhost:8080 | The loopback URL selected in compose.yaml; replace with your HTTPS origin only after completing product deployment. |
DB_PASSWORDsecret | required | replace-with-random-db-password | Generate a dedicated database password and use it in the database service and Matomo installer; protect config/config.ini.php. |
The build, in order
Deployment inventory and safe pilot
Prepare the pinned upstream deployment for a self-hosted Matomo installation with working archives and recoverable data.
Read the linked upstream installation guide and create compose.yaml, .env.example, versions.txt and OPERATIONS.md. Map APP_IMAGE and only each service's required environment variables explicitly. Keep database ports internal and map the pilot application port to 127.0.0.1.
Files
compose.yaml.env.exampleversions.txtUse the upstream Matomo MySQL/MariaDB schema. Back up its database, config/config.ini.php, custom plugin/theme files and the pinned application version together. Keep test site ids and archive-run evidence in OPERATIONS.md. Name each volume and its mount path in OPERATIONS.md; never use ephemeral container storage for the only copy. Create .env manually from .env.example and replace placeholders before starting.
Files
OPERATIONS.md.gitignoreterminaldocker compose config --quiet
Create a private fixtures/ folder containing: One owned site with a pageview, a campaign-tagged visit and a goal completion. Create a separate backup destination and an isolated restore-project name; do not reuse live volumes in restore exercises.
Files
fixtures/README.mdOPERATIONS.md
done when · tick each as it passeswatch out- A valid Compose file proves configuration syntax only, not application health.
Install existing analytics
Install existing analytics for Matomo Cloud: Deploy the official Matomo PHP application and a compatible database from the upstream install requirements; bind the app to loopback initially.
Deploy the official Matomo PHP application and a compatible database from the upstream install requirements; bind the app to loopback initially.
Files
compose.yamlOPERATIONS.mdComplete the installer, create the admin and test site and record system-check results before adding tracking.
Files
OPERATIONS.mdUse One owned site with a pageview, a campaign-tagged visit and a goal completion. Check: The installer system checks pass and the dashboard opens with the new admin. Then check: A container restart preserves the site configuration and account. Record commands, observed results and the date in OPERATIONS.md.
Files
OPERATIONS.md
done when · tick each as it passeswatch out- The task is operating Matomo, not cloning its tracking pipeline.
Collection and archiving
Collection and archiving for Matomo Cloud: Install the generated tracker on the owned site and configure privacy/retention settings intentionally.
Install the generated tracker on the owned site and configure privacy/retention settings intentionally.
Files
compose.yamlOPERATIONS.mdRun the upstream console archive task, schedule it with the documented URL and inspect its exit status and log age.
Files
OPERATIONS.mdUse One owned site with a pageview, a campaign-tagged visit and a goal completion. Check: The campaign visit and configured goal appear after a successful archive run. Then check: Breaking database access makes archiving fail visibly instead of updating a false success timestamp. Record commands, observed results and the date in OPERATIONS.md.
Files
OPERATIONS.md
done when · tick each as it passeswatch out- A collecting tracker can coexist with stale reports when the archive job is broken.
Complete backup and restore
Complete backup and restore for Matomo Cloud: Back up the database plus config and custom files as one dated set; encrypt it off-host and keep a manifest.
Back up the database plus config and custom files as one dated set; encrypt it off-host and keep a manifest.
Files
compose.yamlOPERATIONS.mdRestore to an isolated installation with outbound tracking disabled and verify the site, goal and reports before planning an update.
Files
OPERATIONS.mdUse One owned site with a pageview, a campaign-tagged visit and a goal completion. Check: The restored instance contains the fixture goal and site settings. Then check: Restoring only the database is documented as incomplete because configuration and custom files also matter. Record commands, observed results and the date in OPERATIONS.md.
Files
OPERATIONS.md
done when · tick each as it passeswatch out- Premium plugins and vendor-operated infrastructure are separate from the self-hosted core.
Portable delivery and clean-start proof
Finish the Matomo Cloud replacement with a documented first-run path and a recoverable export.
Document prerequisites, every configuration variable, data locations and the three domain workflows: Install existing analytics; Collection and archiving; Complete backup and restore. Include the exclusions, actual costs and source check date 2026-09-05. Commands shown earlier that reference project files are files the builder must implement before running them.
Files
README.md.env.exampleCreate a consistent database dump plus config/config.ini.php, the pinned Matomo version and custom files. Restore into a separate empty directory or isolated deployment, with all outbound actions and schedules disabled. Recreate this proof: One owned site with a pageview, a campaign-tagged visit and a goal completion. Compare ids/counts and open the result before recording the restore date. Never test a restore over the only live copy.
Files
OPERATIONS.mdbackup/README.mdUse a new folder and only README instructions to reach the fixture outcome. Verify upstream login, persistence, proof output and restore. Record exactly what passed; do not mark unrun checks complete.
Files
README.mdverification.mdterminaldocker compose ps
done when · tick each as it passeswatch out- Export without an import or restore rehearsal is not verified portability.
Operate and share with access controlsproduct builder
Product-builder only: make a self-hosted Matomo installation with working archives and recoverable data operable for its stated audience before allowing remote access.
Use upstream authentication, replace default credentials, restrict the editor/admin surface and inventory public ingestion/webhook paths. Review upstream edition and license boundaries before offering this as a service.
Files
ARCHITECTURE.mdOPERATIONS.mdPut Caddy HTTPS in front of the upstream app, keep database and management ports private and configure public URLs from the chosen domain. For n8n, rehearse upstream PostgreSQL migration/import and recovery before claiming production readiness; disable any unused AI sandbox services.
Files
CaddyfileOPERATIONS.mdAdd a scheduled encrypted off-host backup using this procedure: Create a consistent database dump plus config/config.ini.php, the pinned Matomo version and custom files. Monitor health, disk space, failed jobs and backup age. Stop the service to test an alert; rehearse recovery with outbound effects disabled and record recovery time. Rotate any exposed credentials and require reconciliation before resuming queues.
Files
OPERATIONS.mdrelease-checklist.md
done when · tick each as it passeswatch out- Product mode is additional engineering, not a switch that makes a local prototype production-ready.
That is the whole plan for Matomo Cloud. What it deliberately does not cover is below · check the gaps before you call it a replacement.
- This is a self-hosted Matomo installation with working archives and recoverable data; full Matomo Cloud feature parity, vendor hosting and support are not included.
- mature analytics depth, privacy controls, hosted operations, and premium plugins
- identity stitching
- session replay
- warehouse connectors
- high-volume global ingestion and support
- Extend complete backup and restore only after the fixture and recovery checks pass.
- Before adding another integration, document its credentials, limits, cost and failure behavior with primary-source links.
Need the files? The project pack on the verdict page hands your agent the whole brief · more analytics.