Foreword
For many teams, web analytics means a script from a big vendor, a consent banner that half of all visitors click away, and numbers nobody can say for sure where they are stored. Plausible Analytics takes a different path: no cookies, no stored IP addresses, a script of a few kilobytes – and with the Community Edition the whole thing runs on your own server.
This course shows how to run Plausible CE yourself – and where it fails
in practice: on a BASE_URL that does not match the address,
on a reverse proxy that turns all visitors into a single one, on an ad
blocker that never lets the script load, on a goal that never counts
because of one capital letter, on a ClickHouse that goes down while the
browser keeps getting 202, and on a restore after which
every API key is worthless.
Over eleven days you build a complete installation: first the Compose stack, then a look into both databases, the script in a demo website, HTTPS with your own proxy, goals and properties, API and SQL on the raw data, privacy and Shields, backup and restore, operations and upgrade. The book’s measuring device is the pattern trigger a visit – see it in the dashboard – prove it in the database: every feature ends with a command that shows what was really stored.
The book is for admins, web developers and DevOps engineers who want to run web analytics themselves. You should know containers, volumes and Compose, find your way around the Linux shell and be able to read a little HTML. SQL knowledge helps but is not required – every query is explained.
Community Edition or Cloud?
Plausible comes as a paid service (Plausible Cloud) and as a Community Edition under AGPL-3.0 for self-hosting. To be honest: the Community Edition cannot do everything. It lacks funnels, revenue goals (e-commerce), SSO and the Sites API. It has goals (pageview, custom event, scroll depth, forms, downloads, outbound links), custom properties, Shields, import and export, teams, visibility, the Stats API and email reports. In exchange you get something the cloud does not offer: direct SQL access to the raw data in ClickHouse – also for analyses that come close to a funnel (Day 6).
Privacy – factual, no legal advice
Day 7 shows what Plausible stores and what it does not: no IP addresses, no cookies, no storage in the browser, a visitor ID derived from a salt that changes daily. Whether you still need consent for your use case depends on your website, your country and your legal interpretation. This course is not legal advice – it provides the technical facts that you or your data protection officer can use to assess that.
How the book works
- One day, one topic. Each day has a goal, a time estimate, a short briefing and 5–8 drills. You type every command yourself and compare with “Expected”.
- Visit → dashboard → database. Every proof is a
command with “Expected”:
curlagainst the API or SQL viaclickhouse-clientandpsql. Screenshots show the dashboard. Failure patterns follow the pattern break it → symptom → investigate → cause → fix → verify. - No helper scripts. Every step is shown as a single
command, files as heredocs. The small Playwright program
besuch.jsthat generates real visits is part of the lesson and appears in full in the text (Day 3). - Speed drills, Checkpoint, Challenge, Interview Note, Enterprise Note close every day. The checkpoint uses single commands to check that your lab is in the expected state – the following days build on it.
- One website through all days: what gets measured is
a small replica of
itdrills.comwith four pages, a PDF and an outbound link. It only runs in the lab; the real website stays untouched.
At the end:
- Competition (Day 10): eight planted failures from across the book, under time pressure.
- Appendix A is the cheat sheet with a table of failure patterns, Appendix B the final exam: 14 tasks in two hours, from taking stock through SQL and Shields to the backup.
The days at a glance
| Day | Topic | Duration |
|---|---|---|
| 0 | Training ground: Docker, hosts entries, demo website | approx. 60 min |
| 1 | Start Plausible CE: .env, first user, site,
snippet |
approx. 60 min |
| 2 | Under the hood: PostgreSQL, ClickHouse, events by hand | approx. 60 min |
| 3 | The script: visits, sources, downloads, forms | approx. 75 min |
| 4 | HTTPS and reverse proxy: Caddy, real IPs, ad blockers | approx. 75 min |
| 5 | Goals, events, properties, scroll depth | approx. 75 min |
| 6 | API and raw data: Stats API, export, SQL | approx. 60 min |
| 7 | Privacy and Shields, shared dashboards | approx. 60 min |
| 8 | Backup and restore to a fresh stack | approx. 75 min |
| 9 | Operations and upgrade: resources, logs, outage, mail | approx. 60 min |
| 10 | Competition: the numbers are wrong | approx. 120 min |
Time: Days 0 to 9 add up to eleven hours (660 minutes), the competition and the final exam add two hours each – about 15 hours in total. With one training day per evening and five evenings per week, you are through in a little over two weeks.
The order is no accident: from Day 3 the snippet sits in every page, from Day 4 everything runs over HTTPS and your own domain, from Day 5 there are the goals that Day 6 calculates with, and the competition on Day 10 needs the backup from Day 8.
The training ground
The whole book runs on one VM, user
ubuntu, working folder ~/plausible/tagNN/:
| Role | Task | IP in the book | In the lab |
|---|---|---|---|
| argo | Docker, Plausible CE, Caddy, demo site | 172.16.0.182 | 4 vCPU, 7.7 GiB RAM |
- Plausible CE runs as a Compose stack in
~/plausible/ce(a clone of the repoplausible/community-edition, branchv3.2.1), the demo website as an nginx container. - Host names come from
/etc/hosts:plausible.labanditdrills.compoint to127.0.0.1on the VM and to the VM’s IP on your machine. - Up to Day 3 everything runs over HTTP; from Day 4
Caddy sits in front with its own lab CA
(
tls internal). Day 4 describes a real domain with Let’s Encrypt in the text. - Visits are generated by a Playwright container with headless Chromium. According to its own docs, Plausible needs at least 2 GB of RAM; 4 GiB is enough, and with the browser next to it things get relaxed from 6 GiB (Day 0).
To be honest, this is what the days require:
- Internet access for the VM for images (ghcr.io, docker.io, mcr.microsoft.com) and the Docker package repository.
- A browser on your machine for the steps in the UI (user, goals, Shields). The screenshots in the book show the same.
Proxmox, VMware, a cloud or Multipass – it does not matter. On a Mac
with Apple Silicon, Multipass VMs are arm64. All images in the book
exist for amd64 and arm64, and the Docker installation detects the
architecture itself ($(dpkg --print-architecture)). The
outputs in the book come from amd64.
Scope
Compose in general – networks, profiles, health checks, secrets – is shown in “Docker Compose hands-on”; here only what Plausible needs. Monitoring systems with Prometheus and Grafana is covered in “Observability hands-on”; this course measures visitors, not servers.
Versions
| Component | Version | from day |
|---|---|---|
| Ubuntu (VM) | 24.04 LTS | 0 |
| Docker Engine | 29.10.0 | 0 |
| Docker Compose (plugin) | v5.8.0 | 0 |
| nginx (demo website) | 1.30.7-alpine | 0 |
| Playwright (image) | v1.65.0-noble | 0 |
| Plausible CE | v3.2.1 | 1 |
| PostgreSQL | 16-alpine | 1 |
| ClickHouse | 24.12-alpine | 1 |
| Caddy | 2.11.9-alpine | 4 |
| Mailpit | v1.33.0 | 9 |
What you can do afterwards
- Set up Plausible CE as a Compose stack, configure it and close registration.
- Follow an event through script, API, PostgreSQL and ClickHouse and recognize when and why Plausible drops it.
- Serve the script from your own domain, pass real visitor IPs through the proxy and deal with ad blockers.
- Set up goals, custom events, properties and scroll depth – and find a goal that never counts.
- Query numbers via the Stats API and write your own analyses in SQL.
- Prove what is stored, set Shields and share dashboards.
- Back up, restore to a fresh stack and not forget the keys along the way.
- Run the stack, upgrade it and know where the way back ends.
What was tested
All commands and outputs come from real runs on the described
training ground in November 2026, shortened where it makes sense. Every
day was run block by block in the book’s order on argo and
then played through at least a second time; outputs that changed in the
process were updated. The competition and all solutions in Appendix B
were also replayed twice. Keys, IDs and timestamps will differ for you –
the shape of the outputs stays the same.
Note: This course is an independent practice course. Plausible Analytics is a project of Plausible Insights OÜ (Estonia); the Community Edition is licensed under AGPL-3.0. ClickHouse is a project of ClickHouse, Inc., PostgreSQL of the PostgreSQL Global Development Group, Caddy an open source project of the Caddy community. The book is not affiliated with any of these projects and is neither reviewed nor endorsed by them.
Values such as [email protected] and
lab-plausible-123 are pure lab values; API keys and secrets
from the .env never appear in full in the book.