The usual analytics setup asks your visitors for consent, ships their data to a third party, and gives you a dashboard with two hundred reports you'll never open. Plausible does the opposite: one small script, no cookies, one page of stats you can actually read. The Community Edition is free to self-host, and a VPS with its own IP is all it needs.
Why self-host it
- Your data stays on your server. No third party collects your visitors' page views.
- No cookies. Plausible counts unique visitors with a hash that rotates daily and never stores full IPs, which usually lets you drop the cookie banner.
- Tiny script. The tracker is under 1 KB — it won't show up in your page-speed report.
- Flat cost. No per-pageview pricing. Traffic spikes cost you nothing extra.
What it needs
Plausible runs as three containers: the app, PostgreSQL for accounts and settings, and ClickHouse for the events. ClickHouse is the memory-hungry one.
- 4 GB RAM is the comfortable size — Small-IP (4 vCPU, 4 GB, 35 GB, $16/mo). It starts on 2 GB (Micro-IP), but background merges spike memory, so give it swap if you go small.
- A dedicated IPv4 and a domain. The tracker and dashboard are served from
https://stats.example.com. NAT plans don't accept inbound 443.
Install (Ubuntu 24.04, Docker)
apt update && apt install -y docker.io docker-compose-v2 git
git clone https://github.com/plausible/community-edition plausible-ce
cd plausible-ce
# check out the newest release tag
git checkout "$(git tag --sort=-v:refname | head -1)"
Create the environment file — Plausible can fetch its own Let's Encrypt certificate:
cat > .env <<EOF
BASE_URL=https://stats.example.com
SECRET_KEY_BASE=$(openssl rand -base64 48)
HTTP_PORT=80
HTTPS_PORT=443
EOF
cat > compose.override.yml <<'EOF'
services:
plausible:
ports:
- 80:80
- 443:443
EOF
docker compose up -d
Point the A record of stats.example.com at your VPS first, so the certificate request succeeds. Then open the URL, create your account and add a site. The repository README is the source of truth for new variables — skim it when you upgrade.
Add the script to your site
<script defer data-domain="example.com" src="https://stats.example.com/js/script.js"></script>
Some ad blockers block anything called "analytics"; serving the script from your own subdomain already avoids most of that.
Keep it running
- Backups. Your stats live in two Docker volumes. Managed Backups copy the whole server daily ($2/mo, free on annual plans); for extra safety, dump PostgreSQL with
pg_dumpfrom the container. - Updates.
git pull, check out the new tag,docker compose pull && docker compose up -d. Read the release notes before major versions. - Swap on 2 GB servers — a 2 GB swap file keeps ClickHouse merges from getting killed.
Where it falls short
Plausible deliberately collects less. No user-level journeys, no cross-device tracking, no ad-platform integrations. If marketing lives inside an ad network's tooling, you'll miss those reports. For most sites that just want to know which pages work and where visitors come from, it's the right amount of data — and nobody has to click "Accept".
Related
- VPS for a website
- VPS for Coolify — Plausible is also a one-click template there
- VPS for Docker
Comments
No comments yet. Be the first.