---
title: "Deploy Plausible v3 Privacy-First Analytics"
description: "Cookie-free, lightweight web analytics you own, powered by ClickHouse."
category: "Analytics"
url: https://railway.com/deploy/plausible-v3-privacy-first-analytics
---

# Deploy Plausible v3 Privacy-First Analytics

Cookie-free, lightweight web analytics you own, powered by ClickHouse.

**[Deploy Plausible v3 Privacy-First Analytics on Railway](https://railway.com/template/plausible-v3-privacy-first-analytics)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/plausible-v3-privacy-first-analytics/manifest.json

- **Creator:** bento
- **Category:** Analytics
- **Total deploys:** 1

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### clickhouse https://devicons.railway.com/i/clickhouse.svg

- **Source:** baranberkay96/plausible-railway
- **Health check:** /ping

### plausible https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/plausible.svg

- **Image:** ghcr.io/plausible/community-edition:v3.2.1
- **Start command:** `/bin/sh -c 'i=0; until wget -q -O /dev/null "http://${CLICKHOUSE_HOST}:8123/ping"; do i=$((i+1)); [ "$i" -ge 100 ] && echo "ClickHouse not reachable" && exit 1; echo "waiting for ClickHouse ($i)"; sleep 3; done; /entrypoint.sh db createdb && /entrypoint.sh db migrate && exec /entrypoint.sh run'`
- **Health check:** /api/health
- **Public domain:** Yes

## Documentation

# Deploy and Host Plausible with Railway

Plausible Community Edition is open-source, cookie-free web analytics: a lightweight script, a one-page dashboard and no personal data collection. This community template runs Plausible CE v3 on Railway with Postgres for accounts and ClickHouse for event data, tuned to stay small and inexpensive.

## About Hosting Plausible

Plausible CE needs three things: the Plausible application (an Elixir web app that serves the dashboard, the tracking script and the event API), a PostgreSQL database for users, sites and settings, and ClickHouse for the high-volume event and session data. This template starts them with pinned versions, generated secrets and a ClickHouse configuration for small machines (console logging, unused system tables removed, small caches). Plausible waits for ClickHouse, creates and migrates both databases on start, and reports health through `/api/health`. Registration is invite-only after the first account, and email can be sent through HTTP-API providers that work on every Railway plan.

## Common Use Cases

- Privacy-friendly analytics for marketing sites, blogs and documentation without cookie banners for analytics.
- Product and landing-page metrics with goals, custom events and UTM campaign tracking.
- Agencies hosting dashboards for several client sites on one instance.
- Keeping analytics data in your own infrastructure for GDPR and data-residency requirements.

## Dependencies for Plausible Hosting

- Plausible Community Edition (`ghcr.io/plausible/community-edition`)
- PostgreSQL
- ClickHouse (`clickhouse/clickhouse-server`)
- Optional: an email provider (Postmark, Mailgun, SendGrid, Mandrill, or SMTP on Railway Pro)

### Deployment Dependencies

- Plausible CE repository and compose file: https://github.com/plausible/community-edition
- Plausible CE configuration reference: https://github.com/plausible/community-edition/wiki/configuration
- Plausible documentation: https://plausible.io/docs
- ClickHouse with less than 16 GB RAM: https://clickhouse.com/docs/en/operations/tips
- Railway outbound email: https://docs.railway.com/networking/outbound-networking

### Implementation Details

| Service | Image | Role | Public |
|---|---|---|---|
| `plausible` | `ghcr.io/plausible/community-edition:v3.2.1` | Dashboard, tracking script, event API | HTTPS domain |
| `clickhouse` | `clickhouse/clickhouse-server:24.12.6.70-alpine` + low-resource config | Events and sessions (volume) | — |
| `Postgres` | Railway Postgres 18 | Users, sites, settings (volume) | — |

**First login.** When `plausible` is healthy, open its domain right away. The first account you register becomes the owner; afterwards registration is invite-only (`DISABLE_REGISTRATION=invite_only`). Add your site and paste the tracking snippet into your pages. If you attach a custom domain, update `BASE_URL`.

**Email.** For invitations, password resets and weekly reports set `MAILER_ADAPTER` and the matching API key (for example `Bamboo.PostmarkAdapter` with `POSTMARK_API_KEY`) plus `MAILER_EMAIL`. SMTP relays work only on Railway's Pro plan.

**Scaling.** Plausible and ClickHouse scale vertically: give ClickHouse more memory and CPU as traffic grows and raise `max_threads` in `services/clickhouse/users.d/low-resources-profile.xml` for faster dashboards on large sites.

**Pinning and upgrades.** Change the Plausible image tag after reading the CE release notes; migrations run on start. Keep ClickHouse on the version used by the CE `compose.yml` for that release.

### Why Deploy Plausible on Railway?

Railway runs Plausible, Postgres and ClickHouse together on a private network with persistent volumes and HTTPS out of the box. A small site costs a few dollars a month in usage, and you keep full ownership of your analytics data.


## Similar templates

- [Typesense PHP](https://railway.com/deploy/typesense-php) — official PHP client against Railway
- [Typesense vs Meilisearch](https://railway.com/deploy/typesense-vs-meilisearch) — self-hosted Typesense vs Meilisearch
- [OSS Power BI Alternative](https://railway.com/deploy/oss-power-bi-alternative) — open-source Power BI alternative on Railway

Open this page in a browser: https://railway.com/deploy/plausible-v3-privacy-first-analytics
