Self-Host Plausible Analytics with InfraPilot — Privacy-First Website Stats
InfraPilot Team
March 16, 2026
Why Self-Host Plausible?
Plausible Cloud costs $9–19/mo depending on traffic. The self-hosted Community Edition is free. More importantly, self-hosting means all your analytics data stays on your own server — no third-party SaaS has access to your visitor data. For GDPR-conscious teams and privacy-first products, this is a significant advantage.
Prerequisites
- VPS with at least 2 GB RAM (Plausible's ClickHouse dependency is memory-hungry)
- Docker installed
- InfraPilot installed:
curl -fsSL https://infrapilot.org/install.sh | bash - A domain for your analytics dashboard (e.g.
analytics.yourdomain.com)
Step 1 — Get the Official Compose File
Plausible maintains an official self-hosted repository:
git clone https://github.com/plausible/community-edition plausible
cd plausible
Copy and configure the environment file:
cp plausible-conf.env.example plausible-conf.env
Edit plausible-conf.env and set the required values:
BASE_URL=https://analytics.yourdomain.com
SECRET_KEY_BASE=$(openssl rand -base64 48)
TOTP_VAULT_KEY=$(openssl rand -base64 32)
Step 2 — Start the Stack
docker compose up -d
The first start takes a few minutes — ClickHouse needs to initialise its database. Check progress with:
docker compose logs -f plausible
Wait until you see Access PlausibleWeb.Endpoint at http://localhost:8000.
Step 3 — Expose via InfraPilot
- InfraPilot dashboard → Traffic → Proxy Hosts → Add Proxy Host
- Domain:
analytics.yourdomain.com - Forward host:
plausible, port:8000 - Enable Let's Encrypt SSL and force HTTPS
- Save — certificate issued automatically
Navigate to your analytics domain and create your admin account on first visit.
Step 4 — Add the Tracking Script to Your Site
In Plausible admin, add your website. You'll get a tracking snippet:
<script defer data-domain="yoursite.com"
src="https://analytics.yourdomain.com/js/script.js"></script>
Add this to your site's <head>. Because it's self-hosted, the script is served from your own domain — bypassing most ad blockers and requiring no cookie consent banner for GDPR compliance.
Monitoring Plausible with InfraPilot
Plausible runs three containers: the main Elixir application, ClickHouse (the analytics database), and PostgreSQL. InfraPilot shows all three in your container dashboard with live memory and CPU stats. ClickHouse is the heaviest — watch its RAM usage and set an alert if it exceeds 1.5 GB to avoid OOM kills.
Plausible also exposes an API you can query for custom reports — useful for embedding stats in internal dashboards.
Related posts
The Best Self-Hosted Docker Dashboards in 2026 (Honestly Compared)
Portainer, Dockge, Yacht, Lazydocker, InfraPilot — there are more Docker management UIs than ever. Here's an honest breakdown of which one fits which use case, from CLI-lovers to teams that want a full web dashboard.
Nginx Proxy Manager vs InfraPilot: Is There a Better Alternative?
Nginx Proxy Manager is the most popular Docker reverse proxy GUI — but it only manages proxies and SSL. If you're already running Docker containers, there's a case for combining your proxy management with your container dashboard.
Portainer vs InfraPilot: The Honest Docker Management Comparison (2026)
Portainer is great — but it doesn't manage Nginx, SSL, or give you traffic analytics. Here's an honest comparison of when to use Portainer, when to use InfraPilot, and what actually matters for single-server Docker setups.