# Self-host Plausible Analytics

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

- Page: https://levelrail.com/templates/plausible/
- JSON: https://levelrail.com/templates/plausible.json
- Category: Analytics
- Licence: AGPL-3.0-or-later (Network copyleft (AGPL) license)
- Source: https://github.com/plausible/analytics
- Upstream docs: https://plausible.io/docs/self-hosting

## Requirements
- Memory: about 1 GiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 24.12-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| 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 |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| clickhouse | CLICKHOUSE_SKIP_USER_SETUP | preset |
| db | POSTGRES_DB | preset |
| db | POSTGRES_PASSWORD | generated |
| db | POSTGRES_USER | preset |
| plausible | BASE_URL | preset |
| plausible | CLICKHOUSE_DATABASE_URL | preset |
| plausible | DATABASE_URL | generated |
| plausible | SECRET_KEY_BASE | generated |

## Deploy

### CLI

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

### API

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

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

## Questions

### 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.

Self-host Plausible Analytics, Plausible Analytics docker compose file, deploy Plausible Analytics on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
