Log inSign up

Privacy-friendly site statistics with Plausible CE

Clone a release tag of the plausible/community-edition repository, write BASE_URL and a random SECRET_KEY_BASE into .env, publish port 8000 on localhost through a compose.override.yml, and run docker compose up -d. A Caddy site block gives it HTTPS, and you register the first account in the browser.

Topic: Self-hosted apps · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13 · Updated 2026-12-03

What does Plausible CE need?

Plausible Community Edition stores events in ClickHouse and accounts in PostgreSQL. ClickHouse is the memory-hungry part: give the server at least 2 GB, and 4 GB or more for sites with heavy traffic or long history.

  • CPU: ClickHouse requires SSE 4.2 support. Check with grep -q sse4_2 /proc/cpuinfo && echo supported.
  • OS and Docker: Ubuntu 24.04, 22.04 or Debian 12, 13 with Docker Engine and the Compose plugin (how to install).
  • DNS: a hostname like stats.example.net. Serving analytics from your own subdomain also keeps the script first-party.

How do you download the right release?

The repository uses tags for each release. Find the newest tag and clone it:

TAG=$(git ls-remote --tags --refs https://github.com/plausible/community-edition \
  | awk -F/ '{print $3}' | sort -V | tail -n 1)
echo "$TAG"
cd /opt
sudo git clone -b "$TAG" --single-branch https://github.com/plausible/community-edition plausible-ce
sudo chown -R deploy:deploy /opt/plausible-ce
cd /opt/plausible-ce
ls

You will see compose.yml, ClickHouse configuration files and a README with the release notes for that tag.

How do you configure the instance?

Create .env with the public URL and a long secret:

touch .env
echo "BASE_URL=https://stats.example.net" >> .env
echo "SECRET_KEY_BASE=$(openssl rand -base64 48)" >> .env
cat .env

Plausible can obtain its own certificate when you set HTTP_PORT and HTTPS_PORT, but running behind a reverse proxy is easier to combine with other sites on the same server. For that, create compose.override.yml:

services:
  plausible:
    ports:
      - 127.0.0.1:8000:8000

Registration is open only for the first user by default and then switches to invitations, which is what most owners want.

How do you start it and check health?

docker compose up -d
docker compose ps
docker compose logs -f plausible
curl -s http://127.0.0.1:8000/api/health

The health endpoint returns a short JSON document that reports the PostgreSQL and ClickHouse connections. Expect the first start to take a minute or two while migrations run.

How do you publish it behind Caddy?

With Caddy from the Caddy tutorial installed, the site block forwards everything to the local port:

stats.example.net {
    reverse_proxy 127.0.0.1:8000
}
sudo systemctl reload caddy
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

Caddy passes the client address in X-Forwarded-For, which Plausible uses for its visitor hashing and country lookup. An Nginx setup works the same way; keep the forwarded headers, as in the reverse proxy guide.

How do you track a website?

Open https://stats.example.net, register the admin account, then add your site by domain name, for example example.net. The dashboard shows the exact script tag to paste into the head of every page; it loads from your own stats subdomain. After deploying it, open the site in a browser and watch the visitor counter on the dashboard change within seconds.

Plausible does not set cookies and stores no personal data in the event table, and it counts unique visitors with a daily rotating salt. Goals, custom events and outbound link tracking are enabled from the site settings.

How do you send weekly reports and invites?

Email reports, password resets and team invitations go out by SMTP. Port 25 may not be usable from the server, so open a ticket with support before planning on it and use an authenticated relay on port 587 instead, as explained in the SMTP relay guide. Append to .env:

MAILER_EMAIL=stats@example.net
MAILER_NAME=Site stats
SMTP_HOST_ADDR=smtp.relay.example.net
SMTP_HOST_PORT=587
SMTP_USER_NAME=stats@example.net
SMTP_USER_PWD=relay-password
SMTP_HOST_SSL_ENABLED=false

With SSL disabled on port 587 the connection is upgraded through STARTTLS. Run docker compose up -d to apply the new values.

How do you back up and upgrade Plausible?

Statistics live in ClickHouse and settings in PostgreSQL, both in named Docker volumes. The simplest consistent backup stops the stack briefly and archives the volumes:

cd /opt/plausible-ce
docker compose stop
docker volume ls | grep plausible
sudo tar czf ~/plausible-volumes-$(date +%F).tar.gz /var/lib/docker/volumes/plausible-ce_*
docker compose start

Upgrades move you to a newer tag. Read the release notes first, because major versions can include data migration steps:

git fetch --tags origin
git checkout NEW_TAG
docker compose pull
docker compose up -d

Your .env and compose.override.yml are untracked files, so the checkout leaves them in place.

How do you fix common problems?

  • ClickHouse restarts in a loop: the CPU flag check failed or memory is too low. Check docker compose logs plausible_events_db.
  • Every visitor shows the same country: the proxy is not passing X-Forwarded-For.
  • Script blocked by the site: a Content Security Policy needs stats.example.net in script-src and connect-src.
  • Disk filling up: ClickHouse system logs can grow; the repository ships config files that limit them, so keep them mounted.

For other self-run services, see self-hosting and the lighter Umami guide.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A2-4a few sites with moderate traffic2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months
A4-8busy sites or long history in ClickHouse4 vCPU, 8 GB RAM, 180 GB NVMe$28.80/mo$86.40 for 3 months

Questions about Plausible Analytics (Community Edition)

Is Plausible CE free?

Yes. The Community Edition is released under the AGPL-3.0 license and can be self-hosted at no cost. It receives releases less often than the hosted service.

Does Plausible need a cookie banner?

It does not set cookies or store personal data, which is why many site owners run it without a consent banner. Check the rules that apply to your audience.

How much memory does Plausible use?

ClickHouse dominates. 2 GB runs a few small sites; choose 4 GB or more for busy sites or long retention.

Can one instance track several sites?

Yes. Add each domain in the dashboard and paste its snippet on that site.

Can I import old data?

Yes. Plausible CE can import CSV exports and data from some other analytics tools through the site settings.