To self-host Plausible Analytics you run Plausible Community Edition (CE) with Docker Compose on your own server, point it at a domain, add one tracking script to your site, and back up both of its databases. CE is open source under AGPL-3.0, so there is no licence to buy, only a server to run.
Short answer
Clone the official Plausible CE repository at its current tag (v3.2.1 in October 2026), put BASE_URL and a generated SECRET_KEY_BASE in a .env file, expose ports 80 and 443, run docker compose up -d, and create your first user. The stack has three containers: the Plausible app, PostgreSQL and ClickHouse. Add the script to your site, then back up both databases on a schedule.
I am Manoj, and I lead open-source deployment work at MithTech, a team of Frappe specialists in Bengaluru. We self-host analytics with the same habits we use to deploy Frappe and ERPNext for clients, and this guide is the workflow we run.
The Docker install takes about fifteen minutes. The part people underestimate is backups and upgrades, which is what hurts six months later.
What is Plausible Community Edition?
CE is the self-hosted release of Plausible Analytics, published under AGPL-3.0. Running it on your own server has no licence fee.
It is not identical to Plausible's cloud. CE has the same lightweight script and the core dashboard, but Plausible keeps some features cloud-only to fund the project: marketing funnels, user journeys, ecommerce revenue goals, SSO, the sites API and the Data Studio connector. CE has basic bot filtering (user agent and referrer spam) rather than the cloud's behaviour-based detection, and comes with community support only. For teams that want clean, privacy-respecting traffic numbers without Google in the middle, CE covers the job. For the cloud's prices, check Plausible's pricing page.
The licence matters if you change the code: AGPL-3.0 requires that modified versions offered over a network are released under the same licence. A plain self-host of the unmodified image never triggers that.
What do you need before installing Plausible?
A small Linux server, Docker with the Compose plugin, and a domain you control. ClickHouse requires a CPU with SSE 4.2 on x86 or NEON on ARM, so check that first on very cheap or very old hardware.
| Server | Small VPS, 2 GB RAM or more | ClickHouse and the app need headroom |
| CPU | SSE 4.2 (x86) or NEON (ARM) | Hard requirement for ClickHouse |
| OS | Recent Ubuntu or Debian LTS | Docker support and security updates |
| Software | Docker + Docker Compose plugin | The 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 to run out, so treat 2 GB as the floor and size up for serious traffic. For choosing a box, see the cheapest VPS for self-hosting.
How do you install Plausible with Docker?
Follow the official CE repository. On a fresh server it takes about fifteen minutes.
Install Docker and clone the repository
Install Docker and the Compose plugin, then clone the pinned release (v3.2.1 in October 2026; check the repository for the current tag):
git clone -b v3.2.1 --single-branch https://github.com/plausible/community-edition plausible-ce
cd plausible-ce
Create the .env file
Write your public URL and a generated secret into .env. Run these in the shell, so the secret is generated rather than pasted:
echo "BASE_URL=https://stats.yourco.in" >> .env
echo "SECRET_KEY_BASE=$(openssl rand -base64 48)" >> .env
Set BASE_URL to the exact address you will open the dashboard from.
Expose ports for HTTPS
Add HTTP_PORT=80 and HTTPS_PORT=443 to .env, and create a compose.override.yml that maps ports 80 and 443 for the plausible service, as the CE README shows. With that in place, Plausible requests and renews Let's Encrypt certificates itself, so a simple setup needs no separate reverse proxy.
Start the stack
docker compose up -d
Docker pulls and starts the three containers: the Plausible app (Elixir), PostgreSQL for accounts and settings, and ClickHouse for the analytics events.
Create your first user and site
Open your BASE_URL, register the first admin account, and add your website. Plausible then shows the tracking snippet to install.
How do you add the tracking script?
Paste the snippet Plausible gives you into the <head> of every page you want to measure. It loads the script from your own instance, not from a third party.
The snippet looks like this, with your domain substituted. Copy the exact snippet your dashboard shows, since newer versions may generate a different one:
<script defer data-domain="yourco.in"
src="https://stats.yourco.in/js/script.js"></script>
Put it once in a shared layout or template so it applies site-wide: the shared head component in Next.js, the theme header in WordPress. The script loads from your own server, so the page makes no request to Google, and Plausible sets no cookies and collects no personal data by default. Check it works by opening your site and watching the realtime view.
How do you move off Google Analytics?
New traffic is a script swap: remove the GA snippet (gtag.js or Tag Manager), add the Plausible snippet, and new visits flow into your dashboard.
Past data is separate. Your GA history stays in Google. Plausible can import past GA4 data, but on CE that needs your own Google OAuth credentials (GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET) with the Google Analytics API enabled; see the CE configuration docs. If you don't set that up, export what you need from GA before you stop sending it data.
Run both scripts in parallel for a week or two if you want to compare. Expect Plausible's numbers to differ from GA's: it counts differently and ad blockers affect the two differently, so lower is not wrong. For the wider case for switching, see the open-source Google Analytics alternatives.
How do you back up a self-hosted Plausible?
Back up both databases, because each holds half of your data: PostgreSQL has accounts, sites and settings; ClickHouse has the events. Copying the Docker volume directory while containers run is not a reliable backup.
Dump PostgreSQL
Run pg_dump against the Postgres container on a schedule (nightly suits most teams) and write the dump outside the server.
Back up ClickHouse
Use ClickHouse's own backup mechanism for the events data. It is the larger dataset and the one you cannot recreate.
Copy backups off the server
Send both to separate storage, such as object storage or another server. A backup that lives on the same VPS disappears with it.
Test a restore
Restore into a throwaway instance now and then. An untested backup is a guess.
Self-host it yourself, or have it run for you?
It comes down to who carries the operational load. Running CE yourself gives full control and the lowest cost, but you own upgrades, certificates, monitoring and backups. Having it run for you keeps the same open-source stack on your infrastructure and hands the upkeep to someone else.
| Factor | Run it yourself | Run for you |
|---|---|---|
| Licence | AGPL-3.0, no fee | AGPL-3.0, no fee |
| Data | On your server | On your infrastructure |
| Upgrades and backups | Yours | Handled for you |
| Fits | Teams with operations capacity | Teams who want the result, not the chores |
We set up Plausible as part of analytics and BI work and run it under managed hosting, the same way we run Frappe and ERPNext for clients.
Frequently asked questions
+Is self-hosted Plausible really free?
Yes. CE is AGPL-3.0, so there is no licence fee; you pay for the server. Plausible Cloud is a separate paid product with some features CE doesn't have; check Plausible's pricing page.
+What are the minimum server requirements?
A small Linux VPS with at least 2 GB of RAM, as the CE README recommends, and a CPU that supports SSE 4.2 (x86) or NEON (ARM), which ClickHouse requires. You also need Docker with the Compose plugin and a domain.
+Which databases does Plausible use?
Two. PostgreSQL holds accounts, sites and settings; ClickHouse stores the analytics events. Compose runs both next to the Plausible app, so your backups must cover both.
+Do I lose my Google Analytics history when I switch?
No; it stays in Google Analytics. Plausible can import past GA4 data if you configure Google API credentials on your CE instance. Otherwise, export what you want to keep from GA before you stop sending it traffic.
+Do I need a cookie consent banner with Plausible?
Plausible sets no cookies and collects no personal data by default, which is why many teams use it without a banner. Whether you need consent also depends on what else your site does; confirm your position with your legal adviser.
+How often should I update Plausible?
On a deliberate schedule. CE ships about twice a year. Pin a release tag, read the upgrade notes, back up both databases, then move up one release at a time.
Comments & ratings
No comments yet. Start a new discussion.
Manoj · Published on 20 July 2026
Worked with us? Leave a Google review