Railway

Deploy Plausible Analytics CE

Privacy-friendly, cookie-free, self-hosted web analytics

Deploy Plausible Analytics CE

Just deployed

/var/lib/clickhouse

/var/lib/postgresql/data

Deploy and Host Plausible Analytics on Railway

Plausible Analytics is an open-source web analytics tool focused on privacy. It records visits, page views, and traffic sources without cookies or personal data, so a site can run it without a consent banner. Community Edition is the self-hosted build, licensed under AGPLv3. This template deploys Community Edition v3.2.1.

About Hosting Plausible Analytics

Plausible Community Edition runs as three parts: the Plausible app, a PostgreSQL database for accounts and site settings, and a ClickHouse database for analytics events. Self-hosting it by hand means wiring those together with Docker Compose, writing ClickHouse config files, setting up TLS, generating secrets, and keeping persistent volumes. This template does that work for you on Railway. It provisions managed PostgreSQL, a ClickHouse image tuned for low memory and Railway's private network, and the Plausible app behind an HTTPS domain. Secrets are generated at deploy time, the two databases stay private, and the database migrations run on first start.

Common Use Cases

  • Add analytics to a personal site, blog, or documentation without cookie banners or consent prompts.
  • Run analytics for client or company sites and keep the data on your own infrastructure.
  • Move off Google Analytics to a lighter dashboard you control.

Dependencies for Plausible Analytics Hosting

  • PostgreSQL, for user accounts and site configuration.
  • ClickHouse, for storing and querying analytics events.

Deployment Dependencies

Implementation Details

The ClickHouse service builds from a short Dockerfile that adds Plausible's v3.2.1 configuration: the query log keeps a 30-day TTL, the other system logs are removed, the memory profile is lowered for small instances, and the server listens on :: so Plausible can reach it over the private network. The Plausible service starts with db createdb && db migrate && run, so the database is created and migrated on the first deploy.

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
Matomo Analytics + MariaDB
Privacy-friendly analytics with MariaDB and persistent volumes.

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

zǝʇɹoɔ oɓıɹpoɹ
14
View Template
SubTrackr
Self-hosted Subscription Tracker

amnesia
3