Deploy plausible
Deploy Plausible Analytics (CE) with a single click
Just deployed
Just deployed
/var/lib/postgresql/data
plausible-ce
Just deployed
Deploy and Host
Deploy Plausible Community Edition on Railway in minutes. Plausible is a lightweight, open-source web analytics platform that doesn't use cookies and is fully compliant with GDPR, CCPA, and PECR. This template sets up Plausible CE with ClickHouse for high-performance analytics storage and PostgreSQL for metadata.
About Hosting
Plausible CE is the self-hosted version of Plausible Analytics, a privacy-first alternative to Google Analytics. Unlike traditional analytics tools, Plausible:
- No cookies required — No cookie consent banners needed
- GDPR/CCPA compliant out of the box
- Lightweight script — < 1KB, loads instantly
- ClickHouse-powered — Handles millions of page views
- 27.4K+ GitHub stars — Battle-tested by thousands
This Railway template deploys three components:
| Component | Purpose | Image |
|---|---|---|
| Plausible CE | Web analytics application | ghcr.io/plausible/community-edition:v3.2.1 |
| ClickHouse | Column-oriented analytics database | clickhouse/clickhouse-server:24.12-alpine |
| PostgreSQL | Metadata and user data storage | Railway plugin |
Why Deploy
- Eliminate Google Analytics — Own your analytics data completely
- Privacy by default — No tracking cookies, no personal data collection
- Lightweight performance — Tracking script is ~45KB gzipped
- Infinite scalability — ClickHouse handles billions of events
- Real-time dashboards — See visitor data as it comes in
- Zero-config SEO — Built-in sitemaps, canonical URLs, Open Graph
Common Use Cases
- SaaS Products — Track feature usage and user behavior without third-party scripts
- Content Websites — Monitor traffic, top pages, and referral sources
- E-commerce — Analyze conversion funnels and traffic sources
- Personal Blogs — Simple, privacy-respecting visitor analytics
- Enterprise Intranets — Host behind your firewall for internal analytics
Dependencies for Plausible
Deployment Dependencies
- Railway Account — Sign up at railway.app
- PostgreSQL Plugin — Added automatically via Railway's plugin system
- Custom Domain (recommended) — For production deployments
All services are containerized and deploy with a single click.
Quick Start
1. Deploy to Railway
Click the button above. Railway will:
- Create the Plausible CE service
- Create the ClickHouse service
- Add a PostgreSQL database plugin
- Wire internal networking between services
2. Configure Environment Variables
Set these required variables in Railway dashboard:
| Variable | Description | How to Get |
|---|---|---|
BASE_URL | Public URL of your Plausible instance | https://your-app.up.railway.app |
SECRET_KEY_BASE | 64-byte random string for encryption | openssl rand -base64 48 |
CLICKHOUSE_DATABASE_URL | ClickHouse connection string | See networking section below |
> Network Tip: ClickHouse runs as a Railway service. Use the internal Railway service URL format:
> http://clickhouse:8123/plausible
3. Access Your Instance
Once deployed, visit your BASE_URL and register the first user account.
Environment Variables
Required
| Variable | Description |
|---|---|
BASE_URL | Public URL (no trailing slash), e.g. https://plausible.yourdomain.com |
SECRET_KEY_BASE | At least 64-byte random base64 string for cookie signing |
DATABASE_URL | PostgreSQL connection string (auto-populated by Railway plugin) |
CLICKHOUSE_DATABASE_URL | ClickHouse connection string (http://clickhouse:8123/plausible) |
Registration
| Variable | Description |
|---|---|
DISABLE_REGISTRATION | Set to true to prevent new user signups after initial setup |
ENABLE_EMAIL_VERIFICATION | Set to true to require email verification |
TOTP_VAULT_KEY | Key for encrypting TOTP two-factor secrets |
Email (SMTP)
| Variable | Description |
|---|---|
MAILER_ADAPTER | Email adapter: Bamboo.SMTPAdapter (SMTP), Bamboo.PostmarkAdapter, etc. |
MAILER_EMAIL | From email address for outgoing emails |
MAILER_NAME | From name for outgoing emails |
SMTP_HOST_ADDR | SMTP server address |
SMTP_HOST_PORT | SMTP server port |
SMTP_USER_NAME | SMTP username |
SMTP_USER_PWD | SMTP password |
SMTP_HOST_SSL_ENABLED | Set to true to enable SSL/TLS |
Google Auth
| Variable | Description |
|---|---|
GOOGLE_CLIENT_ID | Google OAuth client ID |
GOOGLE_CLIENT_SECRET | Google OAuth client secret |
IP Geolocation
| Variable | Description |
|---|---|
IP_GEOLOCATION_DB | Geolocation database: city (MaxMind City) |
MAXMIND_LICENSE_KEY | MaxMind license key for GeoIP database downloads |
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Railway Project │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Plausible CE │─────▶│ ClickHouse │ │
│ │ (Elixir/Phoenix)│ │ (Analytics DB) │ │
│ │ :8000 │ │ :8123/:9000 │ │
│ └────────┬──────────┘ └──────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────┐ │
│ │ PostgreSQL │ │
│ │ (Railway Plugin)│ │
│ └──────────────────┘ │
└─────────────────────────────────────────────────────────────┘
- Plausible CE — Main application server (Elixir/Phoenix)
- ClickHouse — Columnar analytics database for storing events
- PostgreSQL — Relational database for users, sites, and metadata
All internal communication happens over Railway's private network.
Troubleshooting
ClickHouse fails to start
ClickHouse requires SSE 4.2 or NEON CPU instruction support. Most modern CPUs support this. If using an older/ARM instance:
- Check Railway's region for CPU compatibility
- Consider using an external ClickHouse Cloud service instead
Connection refused to services
Services may need time to start. ClickHouse and PostgreSQL start in parallel:
- ClickHouse: ~30 seconds startup time
- PostgreSQL: ~10 seconds startup time
- Plausible CE: waits for both before starting
Registration is open
Anyone who knows your URL can register. After creating your account:
- Set
DISABLE_REGISTRATION=truein Railway dashboard - Restart the Plausible service
Health check fails
The health endpoint is at /api/health. Plausible CE takes 30-60 seconds to start on first deploy as it runs database migrations. This is normal.
License
Plausible CE is licensed under AGPL-3.0.
Resources
Template Content
CLICKHOUSE_SKIP_USER_SETUP
PGDATA
PGPORT
POSTGRES_DB
POSTGRES_USER
SSL_CERT_DAYS
RAILWAY_DEPLOYMENT_DRAINING_SECONDS
plausible-ce
INAPP-Mobile/railway-plausibleBASE_URL
DATABASE_URL
SECRET_KEY_BASE
CLICKHOUSE_DATABASE_URL
