← All articles

Self-Hosting Plausible Analytics: A Privacy-Friendly Google Analytics Alternative

2026-02-08 · Analytics plausible analytics privacy google-analytics

Google Analytics is the default choice for website analytics, but it comes with significant baggage: complex setup, GDPR compliance headaches, cookie consent banners, and the knowledge that Google is harvesting your visitors' data for ad targeting.

Plausible Analytics is a lightweight, open source alternative that gives you the metrics that actually matter — without any of that baggage.

In this guide, we'll cover what Plausible offers, how it compares to Google Analytics, and how to self-host it on your own server.

Why Consider Plausible Over Google Analytics?

The case for switching

Feature Google Analytics Plausible
Script size ~45 KB < 1 KB
Cookie usage Yes (requires consent banner) No cookies
GDPR compliance Requires consent Compliant by default
Data ownership Google's servers Your server
Dashboard complexity Hundreds of reports Single-page dashboard
Setup time Hours of configuration Minutes
Cost (self-hosted) Free (you pay with data) $5-10/month VPS

When Google Analytics is still the better choice

Be honest with yourself about what you need:

For most websites — blogs, documentation sites, SaaS landing pages, portfolios — Plausible gives you everything you need in a fraction of the complexity.

What You Get with Plausible

Plausible tracks the metrics that matter for most sites:

All of this is presented on a single, clean dashboard. No training required, no 47-click report builder.

Self-Hosting Plausible: What You Need

Server requirements

Plausible is efficient, but it does use ClickHouse for analytics storage, which needs some resources:

A $12-24/month VPS from providers like Hetzner, DigitalOcean, or Vultr will handle most sites comfortably.

Prerequisites

Step-by-Step Setup

1. Clone the hosting repository

Plausible provides an official self-hosting repo with everything configured:

git clone https://github.com/plausible/community-edition plausible-ce
cd plausible-ce

2. Configure environment variables

Copy the example config and edit it:

cp .env.example .env

Generate a secret key (this is used to sign sessions):

openssl rand -base64 48

Edit .env with your settings:

BASE_URL=https://analytics.yourdomain.com
SECRET_KEY_BASE=<your-generated-secret>

3. Start the services

docker compose up -d

This starts three containers:

4. Set up a reverse proxy

You'll want HTTPS in front of Plausible. With Caddy, it's a two-line config:

analytics.yourdomain.com {
    reverse_proxy localhost:8000
}

Caddy automatically provisions and renews Let's Encrypt certificates.

5. Create your account

Visit https://analytics.yourdomain.com and create your admin account. Add your site's domain, and you'll get a script tag to add to your site:

<script defer data-domain="yourdomain.com"
  src="https://analytics.yourdomain.com/js/script.js">
</script>

That's it. One script tag, no cookies, no consent banner needed.

Maintenance and Backups

Self-hosting means you're responsible for keeping things running. Here's a minimal maintenance routine:

Automatic updates

Pin to a specific version tag in docker-compose.yml and update periodically:

docker compose pull
docker compose up -d

Backups

Back up the PostgreSQL database regularly:

docker compose exec db pg_dump -U postgres plausible > backup.sql

ClickHouse data can be backed up by copying its data volume, though for most sites, losing historical analytics data is not catastrophic.

Monitoring

Set up a simple uptime check on your analytics domain. If it goes down, your tracking script will silently fail (it won't break your website), but you'll lose data during the outage.

Cost Comparison

Scenario Google Analytics Plausible Cloud Plausible Self-Hosted
Up to 10K monthly pageviews Free $9/month ~$6/month (VPS)
Up to 100K monthly pageviews Free $19/month ~$6/month (VPS)
Up to 1M monthly pageviews Free $69/month ~$12/month (VPS)
Up to 10M monthly pageviews Free (or GA360: $$$$) $169/month ~$24/month (VPS)

The self-hosted option has a clear cost advantage at scale. Even at lower traffic, many people consider the privacy and simplicity benefits worth the VPS cost.

Migration from Google Analytics

Plausible can import your historical Google Analytics data:

  1. Export your GA data using Google Takeout or the GA API
  2. Use Plausible's built-in GA import tool (available in Settings)
  3. The import brings over visitor counts, traffic sources, and top pages

The import isn't perfect — GA and Plausible measure visitors differently (GA uses cookies, Plausible uses a hash of IP + User-Agent) — but it gives you continuity in your dashboard.

Verdict

Self-host Plausible if:

Stick with Google Analytics if:

For the vast majority of websites, Plausible gives you the 20% of analytics features that provide 80% of the value — and it does so while respecting your visitors' privacy and keeping your data under your control.