{"id":13409197,"url":"https://github.com/rclement/dokku-matomo","last_synced_at":"2025-08-28T16:32:40.538Z","repository":{"id":43815962,"uuid":"136171250","full_name":"rclement/dokku-matomo","owner":"rclement","description":"Deploy Matomo on Dokku","archived":false,"fork":false,"pushed_at":"2022-02-17T19:55:19.000Z","size":6,"stargazers_count":24,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T12:51:09.281Z","etag":null,"topics":["analytics","docker","dokku","gdpr","matomo","piwik"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rclement.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-05T12:05:11.000Z","updated_at":"2023-07-06T17:01:42.000Z","dependencies_parsed_at":"2022-09-02T13:21:44.935Z","dependency_job_id":null,"html_url":"https://github.com/rclement/dokku-matomo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rclement/dokku-matomo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rclement%2Fdokku-matomo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rclement%2Fdokku-matomo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rclement%2Fdokku-matomo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rclement%2Fdokku-matomo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rclement","download_url":"https://codeload.github.com/rclement/dokku-matomo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rclement%2Fdokku-matomo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272523133,"owners_count":24949318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","docker","dokku","gdpr","matomo","piwik"],"created_at":"2024-07-30T20:00:58.764Z","updated_at":"2025-08-28T16:32:40.500Z","avatar_url":"https://github.com/rclement.png","language":null,"funding_links":[],"categories":["Web Analytics"],"sub_categories":["Object Storage"],"readme":"# Run Matomo on Dokku\n\nDeploy your own instance of [Matomo](https://matomo.org) on\n[Dokku](https://github.com/dokku/dokku).\n\nThis setup is makes use of the great ready-to-use\n[`matomo-docker`](https://github.com/crazy-max/docker-matomo) image by\n[crazy-max](https://github.com/crazy-max), which does all of the heavy-lifting\nto properly deploy Matomo without too much headache.\n\n## What you get\n\nWe will deploy [Matomo\n3.13.5](https://github.com/matomo-org/matomo/releases/tag/3.13.5) onto your own\nDokku server.\n\n## Limitations\n\nCurrently the following features are not supported:\n\n- Archive via cron\n- Redis cache\n\nContributions are welcome!\n\n# Requirements\n\n- [Dokku](https://github.com/dokku/dokku)\n- [dokku-mariadb](https://github.com/dokku/dokku-mariadb)\n- [dokku-letsencrypt](https://github.com/dokku/dokku-letsencrypt)\n\n# Upgrading\n\nYou to pull the latest image from Docker Hub and re-deploy it over Dokku.\nUpdating over the web interface is not supported. The upgrade will result in a\nshort downtime of Matomo.\n\n```\ndocker pull crazymax/matomo:3.14.0 # This version does not exist yet, its just an example\ndocker tag crazymax/matomo:3.14.0 dokku/matomo:v3.14.0\ndokku tags:deploy matomo v3.14.0\n```\n\n# Setup\n\n## Pull image and tag it\n\nWe pull the `matomo` image from Docker Hub and tag it properly for Dokku.\n\n```\ndocker pull crazymax/matomo:3.13.5\ndocker tag crazymax/matomo:3.13.5 dokku/matomo:v3.13.5\n```\n\n## App and database\n\nFirst create a new Dokku app. We will call it `matomo`.\n\n```\ndokku apps:create matomo\n```\n\nNext create the MariaDB database required by Matomo and link it to the app.\n\n```\ndokku mariadb:create mariadb-matomo\ndokku mariadb:link mariadb-matomo matomo\n```\n\n## Configuration\n\n## Main configuration\n\n```\ndokku config:set --no-restart matomo TZ=Europe/Berlin\ndokku config:set --no-restart matomo MEMORY_LIMIT=256M\ndokku config:set --no-restart matomo UPLOAD_MAX_SIZE=16M\ndokku config:set --no-restart matomo OPCACHE_MEM_SIZE=128\ndokku config:set --no-restart matomo REAL_IP_FROM=0.0.0.0/32\ndokku config:set --no-restart matomo REAL_IP_HEADER=X-Forwarded-For\ndokku config:set --no-restart matomo LOG_LEVEL=WARN\n```\n\n## Persistent storage\n\nYou need to mount a volume on your host (the machine running Dokku) to persist\nall settings that you set in the Matomo interface.\n\n```\nmkdir /var/lib/dokku/data/storage/matomo\n# UID:GUID are set to 101. These are the values the nginx image uses,\n# that is used by crazymax/matomo\nchown 101:101 /var/lib/dokku/data/storage/matomo\ndokku storage:mount matomo /var/lib/dokku/data/storage/matomo:/data\n```\n\n## Domain setup\n\nTo get the routing working, we need to apply a few settings. First we set the\ndomain.\n\n```\ndokku domains:set matomo matomo.example.com\n```\n\nWe also need to update the ports set by Dokku.\n\n```\ndokku proxy:ports-add matomo http:80:8000\ndokku proxy:ports-remove matomo http:80:5000\n```\n\nIf Dokku proxy:report sentry shows more than one port mapping, remove all port\nmappings except the added above.\n\n## Email settings (optional)\n\nYou need to set the following settings if you want to receive emails from\nMatomo.\n\n```\ndokku config:set --no-restart SSMTP_HOST=smtp.example.com\ndokku config:set --no-restart SSMTP_PORT=587\ndokku config:set --no-restart SSMTP_HOSTNAME=matomo.example.com\ndokku config:set --no-restart SSMTP_USER=user@example.com\ndokku config:set --no-restart SSMTP_PASSWORD=yoursmtppassword\ndokku config:set --no-restart SSMTP_TLS=YES\n```\n\n## GeoIP2\n\nThe GeoIP2 plugin is already installed but needs to be configured. [Follow the\ninstructions in the crazymax/docker-matomo\nrepository](https://github.com/crazy-max/docker-matomo#geoip2) to enable it.\n\n## Advanced configuration\n\nIf needed, the Matomo configuration file is located at\n`/var/lib/dokku/data/storage/matomo/config/config.ini.php` and can be manually\nedited.\n\n# Deploy\n\n## Deploy app for the first time\n\nDeploy Matomo from the previously tagged docker image.\n\n```\ndokku tags:deploy matomo v3.13.5\n```\n\n## Setup Let's Encrypt\n\nSetup an SSL certificate via Let's Encrypt.\n\n```\ndokku config:set --no-restart matomo DOKKU_LETSENCRYPT_EMAIL=letsencrypt@example.com\ndokku letsencrypt matomo\ndokku letsencrypt:auto-renew matomo\n```\n\n# Grep MariaDB information for the setup\n\nWe will need to set up Matomo in the web interface and provide the database\ndetails. You should be able to access the page via\n[`https://matomo.example.com`](https://matomo.example.com).\n\nRun the command below to retrieve the DSN.\n\n```\ndokku mariadb:info mariadb-matomo\n```\n\nAn example DSN might look like this:\n`mysql://mariadb:ffd4fc238ba8adb3@dokku-mariadb-mariadb-matomo:3306/mariadb_matomo`.\nCopy and paste the details as follows:\n\n```\nHostname: dokku-mariadb-mariadb-matomo\nUsername: mariadb\nPassword: ffd4fc238ba8adb3\nDatabase Name: mariadb_matomo\n```\n\nAfter going through the setup, you should be able to use Matomo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frclement%2Fdokku-matomo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frclement%2Fdokku-matomo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frclement%2Fdokku-matomo/lists"}