To self-host Plausible Analytics in 2026 you deploy Plausible Community Edition with Docker Compose on your own server, point the web app at a domain, drop a single tracking script on your site, and keep regular backups of both databases. The whole stack is open source under AGPLv3, so there is no licence to buy — just infrastructure to run.
Short answer
Clone the official Plausible Community Edition repo (currently v3.2.1), set BASE_URL and a generated SECRET_KEY_BASE in a .env file, run docker compose up -d, and create your first user. The stack runs three containers: the Elixir web app, PostgreSQL, and ClickHouse. Add the Plausible script to your site, then back up both databases on a schedule.
I am Manoj, an ERPNext implementation consultant at Mith Tech in Bengaluru. Self-hosting privacy-friendly analytics is the same muscle we use every week to self-host Frappe/ERPNext and other open-source tools for Indian SMBs, so this guide is the workflow I actually run, not a copy of the marketing page.
My honest take: the Docker install is genuinely a fifteen-minute job — the part people underestimate is backups and TLS, which is exactly the part that bites you six months later.
What is Plausible Community Edition and is it still free?
Plausible Community Edition is the free, self-hosted release of Plausible Analytics, published as open source under the GNU Affero General Public License v3 (AGPLv3). Running it on your own server costs nothing in licence fees — the same code powers Plausible's own managed cloud. You pay only for the machine it runs on.
A few things are worth knowing before you commit. CE ships the same lightweight tracking script and the core analytics dashboard. A handful of conveniences on the hosted cloud — certain team-management and integration features — are cloud add-ons rather than part of CE. For most Indian SMBs that just want clean, privacy-respecting traffic numbers without Google in the middle, CE covers the job. Pricing for the hosted cloud varies by plan — check Plausible's official page if you want to compare that route.
The licence model matters if you plan to modify the code. AGPLv3 requires that network-accessible modifications be released under the same licence. For a plain self-host of the unmodified image, that obligation never comes up.
Skimmable summary: Plausible CE is genuinely free and open source under AGPLv3; you pay for the server, not the software.
What do you need before installing Plausible?
Three prerequisites decide whether the install goes smoothly: a small Linux server, Docker with the Compose plugin, and a domain name you control. ClickHouse, the analytics database, requires a CPU that supports the SSE 4.2 instruction set on x86 or NEON on ARM, so check that first on very cheap or very old hardware.
Here is the practical baseline I provision for a low-traffic site:
| Requirement | What to aim for | Why it matters |
|---|---|---|
| Server | Small VPS, ~2 GB RAM as a floor | ClickHouse and the app need headroom |
| CPU | SSE 4.2 (x86) or NEON (ARM) | Hard requirement for ClickHouse |
| OS | Recent Ubuntu/Debian LTS | Docker support and security updates |
| Software | Docker + Docker Compose plugin | The whole stack ships as Compose |
| Domain | A subdomain, e.g. stats.yourco.in | Needed for BASE_URL and TLS |
| Ports | 80 and 443 open | Automatic Let's Encrypt certificates |
RAM is usually the first thing you run out of, so treat 2 GB as the minimum and size up if you push serious traffic. If you are picking a box for this, our guide on the cheapest VPS for self-hosting covers the specs to insist on.
Skimmable summary: a ~2 GB VPS with an SSE 4.2 / NEON CPU, Docker Compose, and a domain is all you need to start.
How do you install Plausible with Docker (step by step)?
Installation follows the official Community Edition repository and takes roughly fifteen minutes on a fresh server. Clone the pinned version, set two required environment values, expose the web ports, and bring the stack up with Docker Compose. Below is the sequence I run.
Install Docker and clone the repo
Install Docker and the Compose plugin, then clone the pinned release. As of this writing the current tag is v3.2.1:
git clone -b v3.2.1 --single-branch https://github.com/plausible/community-edition plausible-ce
cd plausible-ce
Create the .env file
Create a .env file with your public URL and a strong secret. Generate the secret with OpenSSL:
BASE_URL=https://stats.yourco.in
SECRET_KEY_BASE=$(openssl rand -base64 48)
Set BASE_URL to the exact domain you will load the dashboard from.
Expose ports for TLS
Add a Compose override that maps ports 80 and 443. With those set, Plausible requests and renews Let's Encrypt certificates automatically, so you get HTTPS without a separate reverse proxy for a simple setup.
Bring the stack up
Start everything in the background:
docker compose up -d
Docker pulls and starts the three containers: the Plausible web app (an Elixir application), PostgreSQL for accounts and settings, and ClickHouse for the raw analytics events.
Create your first user and site
Visit your BASE_URL in a browser, register the first admin account, and add your first website inside the dashboard. Plausible then shows you the tracking snippet to install.
Pin the version, don't chase latest
Always clone a specific tag rather than the default branch, and read the upgrade notes before jumping major versions. ClickHouse and PostgreSQL schema changes between releases are exactly where unattended upgrades go wrong.
Skimmable summary: clone the pinned tag, set BASE_URL and SECRET_KEY_BASE, expose 80/443, run docker compose up -d, create your admin user.
How do you add the Plausible tracking script?
Adding tracking is a one-line change: paste Plausible's script tag into the <head> of every page you want to measure. After you register a site in the dashboard, Plausible generates a snippet that points data-domain at your site and loads the script from your own self-hosted instance, not from a third party.
The snippet looks like this, with your own domain substituted:
<script defer data-domain="yourco.in"
src="https://stats.yourco.in/js/script.js"></script>
Place it once in a shared layout or template so it applies site-wide. On a Next.js or WordPress site, that means the shared head component or theme header. Because the script is small and loads from your server, there is no Google request in the page and no cookie banner needed for basic analytics — Plausible does not use cookies or collect personal data by default. Verify it works by opening your site, then watching the realtime view in the dashboard.
Skimmable summary: drop one <script> tag pointing data-domain and src at your instance into the site head, then confirm hits in realtime.
How do you migrate off Google Analytics?
Migrating off Google Analytics is a script swap, not a data migration. Remove the GA (gtag.js or GTM) snippet from your site, add the Plausible snippet in its place, and new traffic starts flowing into your self-hosted dashboard. Your historic GA data stays inside Google — Plausible starts counting from the day you install it.
Run both scripts in parallel for a week or two if you want to sanity-check the numbers against each other before you fully cut over. Expect Plausible's counts to differ slightly from GA: Plausible counts differently and is not skewed by the same bot and ad-blocker gaps, so lower is not wrong. If you need a longer archive of the old GA numbers, export what you want from Google Analytics before you stop sending it data. For the wider case on why teams make this move, see our piece on the open-source Google Analytics alternative.
Skimmable summary: swap the GA tag for the Plausible tag, keep GA's history in Google, and optionally dual-run briefly to compare.
How do you back up a self-hosted Plausible?
Backing up Plausible means backing up both databases, because the two hold different halves of your data. PostgreSQL stores accounts, sites, and settings; ClickHouse stores the analytics events themselves. Copying the Docker volume directory while containers run is not a reliable backup — use each database's own dump tooling.
Dump PostgreSQL
Run pg_dump against the Postgres container on a schedule (nightly is fine for most SMBs) and write the dump to a file outside the server.
Back up ClickHouse
Use ClickHouse's backup mechanism to export the events data. This is the larger dataset and the one you cannot recreate, so do not skip it.
Ship backups off the box
Copy both dumps to separate storage — object storage or another server. A backup that lives only on the same VPS disappears with the VPS.
Test a restore
Periodically restore into a throwaway instance. An untested backup is a guess, not a safety net.
Automate before you forget
Wire the dumps into a cron job and off-site copy on day one, while the setup is fresh in your head. Backups you have to remember to run manually are the ones that are missing when you need them.
Skimmable summary: dump PostgreSQL and ClickHouse on a schedule, ship both copies off the server, and test a restore now and then.
Self-host it yourself or use a managed option?
The choice comes down to who carries the operational load. Self-hosting CE yourself gives full control and the lowest running cost, at the price of owning upgrades, TLS renewal, monitoring, and backups. A managed self-hosted deployment runs the same open-source stack but hands the ops to someone else, which suits teams without a spare server admin.
| Factor | Self-host yourself | Managed self-hosted |
|---|---|---|
| Licence | Free (AGPLv3) | Free (AGPLv3) |
| Data ownership | Full, on your server | Full, on your infrastructure |
| Upgrades & backups | You own them | Handled for you |
| Best for | Teams with ops capacity | Teams wanting the result, not the chores |
If you would rather consume Plausible as a ready-to-use product on your own infrastructure, see how we package it at Plausible by Mith Tech, and how our wider PaaS approach turns a bare server into a managed deploy platform. The same open-source discipline underpins how we run Frappe and ERPNext for clients.
Skimmable summary: run it yourself for lowest cost and full control, or take a managed self-hosted route to skip the upkeep — same AGPL stack either way.
Frequently asked questions
Is self-hosted Plausible really free?
Yes. Plausible Community Edition is open source under AGPLv3, so there is no licence fee to self-host it. Your only cost is the server it runs on. The hosted Plausible Cloud is a separate paid product — pricing varies by plan, so check Plausible's official page if you want to compare that route.
What are the minimum server requirements?
A small Linux VPS with roughly 2 GB of RAM as a sensible floor, and a CPU that supports the SSE 4.2 instruction set on x86 or NEON on ARM, which ClickHouse requires. You also need Docker with the Compose plugin and a domain name for the dashboard and TLS.
Which databases does Plausible use?
Two. PostgreSQL holds user accounts, sites, and configuration, while ClickHouse stores the raw analytics events. The Docker Compose setup runs both alongside the Plausible web application as three containers, so any backup plan has to cover both databases.
Do I lose my Google Analytics history when I switch?
No — your historic GA data stays inside Google Analytics. Plausible starts counting from the day you install it and does not import old GA data automatically. Export anything you want to keep from GA before you stop sending it traffic, and optionally run both trackers briefly to compare.
Do I need a cookie consent banner with Plausible?
For standard use, no. Plausible does not use cookies and does not collect personal data by default, which is a large part of why teams move to it. Always confirm your own compliance position, but the default configuration avoids the cookie-banner requirement that Google Analytics typically triggers.
How often should I update Plausible?
Update on a deliberate schedule, not automatically. Pin a specific release tag, read the upgrade notes for database schema changes, back up both databases first, then move up one release at a time. Skipping versions or chasing the latest branch blindly is the most common way self-hosted upgrades break.
About the author
I am Manoj, an ERPNext implementation consultant at Mith Tech, an independent open-source implementation studio in Bengaluru. I spend my weeks self-hosting Frappe/ERPNext and privacy-friendly open-source tools for Indian SMBs, and I write these guides from the setups I actually run and maintain, not from vendor brochures.