{"id":16790172,"url":"https://github.com/michelegera/docker-plausible","last_synced_at":"2025-04-10T23:27:23.659Z","repository":{"id":128936910,"uuid":"307402153","full_name":"michelegera/docker-plausible","owner":"michelegera","description":"📈 Run Plausible.io with Traefik as a reverse-proxy","archived":false,"fork":false,"pushed_at":"2023-05-08T08:51:35.000Z","size":12,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T20:13:18.489Z","etag":null,"topics":["docker","docker-compose","docker-template","plausible-analytics","traefik","traefik-v2"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michelegera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-26T14:36:42.000Z","updated_at":"2024-12-09T21:40:44.000Z","dependencies_parsed_at":"2023-08-27T07:49:08.044Z","dependency_job_id":null,"html_url":"https://github.com/michelegera/docker-plausible","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelegera%2Fdocker-plausible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelegera%2Fdocker-plausible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelegera%2Fdocker-plausible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelegera%2Fdocker-plausible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michelegera","download_url":"https://codeload.github.com/michelegera/docker-plausible/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248314091,"owners_count":21082981,"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","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":["docker","docker-compose","docker-template","plausible-analytics","traefik","traefik-v2"],"created_at":"2024-10-13T08:29:08.923Z","updated_at":"2025-04-10T23:27:23.651Z","avatar_url":"https://github.com/michelegera.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plausible.io on HTTPS\n\nThe [Plausible.io][plausible] [documentation on self-hosting][self-hosting]\nstates that…\n\n\u003e The Plausible server itself does not perform SSL termination (yet, feel free\n\u003e to contribute). It only runs on unencrypted HTTP. If you want to run on HTTPS\n\u003e you also need to set up a reverse proxy in front of the server. We have\n\u003e instructions and examples of how to do that below.\n\n…but the instructions and examples are nowhere to be found. 😕\n\nThis [Docker Compose][docker-compose] configuration will run a self-hosted\ninstance of Plausible.io with geolocation enabled and [Traefik][traefik] as a\nreverse-proxy, allowing you to serve the app on HTTPS.\n\n## Pre-requisites\n\nYou will need is a server with [Docker][docker] and Docker Compose\ninstalled.\n\nI recommend a cheap [Digital Ocean][digital-ocean] (referral code) instance,\nthey have great step-by-step documentation on how to\n[set up your server][do-server], [install Docker][do-docker] and\n[Docker Compose][do-compose].\n\nTo enable geolocation, you will need a [MaxMind][maxmind] **free** account. Sign\nup and log in, then go to `Services ▸ My License Key` and generate a new license\nkey. You will need the Account/User ID and key later.\n\n## Configuration\n\n- Set up your server as described above and SSH into it\n- Clone this repository\n  ```shell\n  git clone https://github.com/michelegera/docker-plausible.git\n  ```\n- Edit the `geoip/geoip.conf` file and replace placeholders with the\n  credentials from MaxMind\n- Change the `traefik/acme.json` file permissions\n  ```shell\n  chmod 600 traefik/acme.json\n  ```\n- Edit the `traefik/traefik.toml` file and change the placeholder email address\n  with your own\n- Edit the `docker-compose.yml` file and change the placeholder domain name with\n  your own\n- Edit the `plausible-conf.env` file and replace placeholders with your desired\n  values\n  - Remember to set the `https` protocol for your `BASE_URL`\n  - To generate a good `SECRET_KEY_BASE` use this command\n    ```\n    openssl rand -base64 64\n    ```\n\n## Run\n\nTo start all services, just run the startup script: `./start.sh`.\n\nYou can verify that the the reverse-proxy is up and running by visiting\n`\u003chttp://your.domain.com:8080\u003e`.\n\n## After the first successful run\n\nDisable Traefik dashboard, or it will be publicly availabe in production.\n\nTo do that:\n\n- Edit `traefik/traefik.toml` and remove the `[api]` section\n- Edit `traefik/docker-compose.traefik.yml` and remove the line `\"8080:8080\"`\n\n## Credits\n\nThis configuration is based on the [awesome][morycorp-repo-01]\n[work][morycorp-repo-02] by [MoryCorp][morycorp].\n\n[plausible]: https://plausible.io\n[self-hosting]: https://docs.plausible.io/self-hosting/\n[docker-compose]: https://docs.docker.com/compose/\n[traefik]: https://traefik.io\n[docker]: https://docker.com\n[digital-ocean]: https://m.do.co/c/2f19c210b485\n[do-server]: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-20-04\n[do-docker]: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04\n[do-compose]: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04\n[maxmind]: https://www.maxmind.com\n[morycorp-repo-01]: https://github.com/MoryCorp/plausible.io-behind-Traefik2\n[morycorp-repo-02]: https://github.com/MoryCorp/traefik2-minimalist-configuration\n[morycorp]: https://github.com/MoryCorp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelegera%2Fdocker-plausible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichelegera%2Fdocker-plausible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelegera%2Fdocker-plausible/lists"}