Plausible Analytics

An easy to use, privacy-friendly, open-source Google Analytics alternative

Deploy Plausible Analytics

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

Implementation Details

Quick Start Guide

  1. Click "Deploy on Railway" and follow the setup steps
  2. Monitor all three services until they're fully deployed
  3. Navigate to your Plausible Analytics domain and create an account
  4. Add your websites and implement the tracking script
  5. Configure optional SMTP settings for email notifications

Optional SMTP Configuration

Configure these environment variables to enable email notifications and weekly reports:

VariableDescriptionExample
MAILER_EMAILOutgoing email address[email protected]
MAILER_NAMEDisplay name for emailsPlausible Analytics for YourSite.com
SMTP_HOST_ADDRSMTP server hostnamesend.mailserver.com
SMTP_HOST_PORTSMTP server port25, 587, 465
SMTP_USER_NAMESMTP authentication usernamesmtp_user
SMTP_USER_PWDSMTP authentication passwordYour SMTP password
SMTP_HOST_SSL_ENABLEDEnable TLS encryptiontrue 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:

  1. Access your Plausible instance via the Railway-provided domain
  2. Create your admin account through the web interface
  3. Add your website(s) to start tracking
  4. Install the lightweight tracking script on your sites
  5. 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

More templates in this category

View Template
Bugsink
Self-hosted Error Tracking. Sentry-SDK compatible

View Template
Litlyx
Modern, developer-friendly, cookiefree analytics tool. Alternative to Umami

View Template
Superset
An open-source modern data exploration and visualization platform.