Self-host Plausible Analytics with Levelrail

Verified

Lightweight, privacy-friendly, cookie-free web analytics with no consent banner required.

  • AuthorplausibleVerified by Levelrail
  • LicenceAGPL-3.0-or-later
  • Memory1 GiB
  • Archarm64
  • Services3

How to self-host Plausible Analytics

  1. Pull the images

    3 images are pulled on your server.

    Show images
    • clickhouse/clickhouse-server:24.12-alpine
    • postgres:16-alpine
    • ghcr.io/plausible/community-edition:v3.0.1
  2. Create the app

    3 services start in a single Compose app, with 2 named volume mounts for your data, on port 8000.

  3. Fill in the secrets

    3 secrets are generated and stored encrypted, 5 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

Plausible Analytics requirements

Memory
About 1 GiB
Architectures
amd64 image published, arm64 tested
Ports
8000
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
AGPL-3.0-or-later, network copyleft (agpl) license
  • Verified. Verified on arm64 with image tag 24.12-alpine. Our CI ran this exact image version and it answered on its health path. Evidence
  • Host ports. It publishes port 8000 on the host, so open them in the VPS firewall only if you want that.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Plausible Analytics. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Plausible Analytics docs page.

Deploy Plausible Analytics your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Plausible Analytics from the CLI

levelrail-cli templates deploy plausible --name my-plausible

Deploy Plausible Analytics with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/plausible/deploy

Plausible Analytics configuration

Plausible Analytics services

ServiceImagePortsVolumes
clickhouse clickhouse/clickhouse-server:24.12-alpine none plausible_clickhouse_data -> /var/lib/clickhouse
db postgres:16-alpine none plausible_db_data -> /var/lib/postgresql/data
plausible ghcr.io/plausible/community-edition:v3.0.1 8000 none

Plausible Analytics environment variables

VariableServiceValue
CLICKHOUSE_SKIP_USER_SETUP clickhouse Preset by the template
POSTGRES_DB db Preset by the template
POSTGRES_PASSWORD db Generated at deploy
POSTGRES_USER db Preset by the template
BASE_URL plausible Preset by the template
CLICKHOUSE_DATABASE_URL plausible Preset by the template
DATABASE_URL plausible Generated at deploy
SECRET_KEY_BASE plausible Generated at deploy

Ports and volumes

Ports
8000
Volumes
2 named mounts: plausible_clickhouse_data -> /var/lib/clickhouse, plausible_db_data -> /var/lib/postgresql/data

Plausible Analytics FAQ

How much memory does Plausible Analytics need?

The catalog lists about 1 GiB of memory for Plausible Analytics across its 3 services.

Does Plausible Analytics run on arm64?

For Plausible Analytics, arm64 is tested; amd64 is image published.

What licence is Plausible Analytics under?

Plausible Analytics is licensed under AGPL-3.0-or-later, which is network copyleft, so source sharing also applies when it is offered as a hosted service.

Does Plausible Analytics need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does Plausible Analytics bundle?

The template includes Postgres and ClickHouse, running as its own service.

Which ports does Plausible Analytics use?

Plausible Analytics listens on port 8000 inside the stack.

Where does Plausible Analytics keep its data?

In named volumes: plausible_clickhouse_data mounted at /var/lib/clickhouse and plausible_db_data mounted at /var/lib/postgresql/data.

Can I deploy Plausible Analytics on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id plausible for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image clickhouse/clickhouse-server:24.12-alpine, postgres:16-alpine, ghcr.io/plausible/community-edition:v3.0.1 is what you deploy there.

levelrail-cli templates deploy plausible --name my-plausible