Docs / Self-Hosted Applications / How to Self-Host Plausible Analytics

How to Self-Host Plausible Analytics

By Admin · Mar 1, 2026 · Updated Apr 23, 2026 · 28 views · 1 min read

What Is Plausible?

Plausible is a lightweight, open-source web analytics tool that is privacy-focused and GDPR-compliant. It is a popular alternative to Google Analytics, offering simple dashboards without cookies or personal data collection.

Requirements

  • A Breeze with at least 2 GB RAM
  • Docker and Docker Compose installed
  • A domain name with DNS configured

Step 1: Clone the Repository

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

Step 2: Configure Environment

cp .env.example .env
nano .env

Set these values:

BASE_URL=https://analytics.yourdomain.com
SECRET_KEY_BASE=$(openssl rand -base64 48)
TOTP_VAULT_KEY=$(openssl rand -base64 32)
DISABLE_REGISTRATION=invite_only

Step 3: Start the Services

docker compose up -d

Step 4: Set Up Nginx Reverse Proxy

server {
    server_name analytics.yourdomain.com;
    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Step 5: Add SSL

sudo certbot --nginx -d analytics.yourdomain.com

Adding the Tracking Script

Add this to your website's <head>:

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

Why Self-Host?

  • Full data ownership — no third-party access
  • No cookie banners required
  • Lightweight script (under 1KB)
  • No visitor tracking or personal data

Was this article helpful?