
Plausible Analytics
An easy to use, privacy-friendly, open-source Google Analytics alternative
ClickHouse
railwayapp-templates/plausible
Just deployed
/var/lib/clickhouse
Postgres
railwayapp-templates/postgres-ssl:latest
Just deployed
/var/lib/postgresql/data
Plausible Analytics CE
plausible/community-edition:v2
Just deployed
Deploy and Host Plausible Analytics on Railway
A simple, open-source, lightweight (<1 KB) and privacy-friendly alternative to Google Analytics. Plausible is trusted by 10,000+ paying subscribers to deliver website and business insights without compromising user privacy.
About Hosting Plausible Analytics
Hosting Plausible Analytics involves deploying three interconnected services: the main Plausible application for user interaction and dashboard access, ClickHouse database for efficient analytics data storage and querying, and PostgreSQL for user accounts and metadata. This template uses the Plausible Analytics Community Edition and handles all service configuration automatically. The setup includes custom ClickHouse tuning for Railway's infrastructure and optional SMTP configuration for email notifications and weekly reports.
Common Use Cases
- Privacy-Compliant Web Analytics: Track website visitors and behavior without cookies or personal data collection
- Google Analytics Alternative: Replace Google Analytics with a lightweight, GDPR-compliant solution
- Business Intelligence Dashboard: Monitor website performance, traffic sources, and user engagement metrics
- Multi-Site Analytics Management: Track analytics across multiple websites from a single dashboard
- Real-Time Traffic Monitoring: Get instant notifications about traffic spikes and unusual activity patterns
Dependencies for Plausible Analytics Hosting
- ClickHouse Database for analytics data storage and efficient querying
- PostgreSQL Database for user accounts, settings, and metadata
- Docker image deployment capability for the main Plausible application
Deployment Dependencies
- Plausible Analytics Documentation
- Plausible Self-Hosting Configuration Guide
- ClickHouse Docker Documentation
- Plausible Community Edition
Implementation Details
Quick Start Guide
- Click "Deploy on Railway" and follow the setup steps
- Monitor all three services until they're fully deployed
- Navigate to your Plausible Analytics domain and create an account
- Add your websites and implement the tracking script
- Configure optional SMTP settings for email notifications
Optional SMTP Configuration
Configure these environment variables to enable email notifications and weekly reports:
Variable | Description | Example |
---|---|---|
MAILER_EMAIL | Outgoing email address | [email protected] |
MAILER_NAME | Display name for emails | Plausible Analytics for YourSite.com |
SMTP_HOST_ADDR | SMTP server hostname | send.mailserver.com |
SMTP_HOST_PORT | SMTP server port | 25 , 587 , 465 |
SMTP_USER_NAME | SMTP authentication username | smtp_user |
SMTP_USER_PWD | SMTP authentication password | Your SMTP password |
SMTP_HOST_SSL_ENABLED | Enable TLS encryption | true or false |
Service Architecture
Plausible Analytics Service
- Main web application for user interaction and dashboard access
- Deployed using official Plausible Docker image from DockerHub
- Handles user authentication, site management, and analytics visualization
ClickHouse Database
- Optimized for analytics data storage and fast querying at scale
- Custom Dockerfile with Railway-specific configuration tuning
- Stores all website analytics data efficiently
PostgreSQL Database
- Standard Railway one-click database service
- Stores user accounts, site settings, and application metadata
- Handles authentication and configuration data
Website Integration
After deployment:
- Access your Plausible instance via the Railway-provided domain
- Create your admin account through the web interface
- Add your website(s) to start tracking
- Install the lightweight tracking script on your sites
- View real-time analytics and configure goals/funnels as needed
Why Deploy Plausible Analytics on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Plausible Analytics on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
ClickHouse
railwayapp-templates/plausiblePlausible Analytics CE
ghcr.io/plausible/community-edition:v2