Railway

Deploy Betterlytics — Cookieless, GDPR-Compliant Web Analytics

Self-host Betterlytics — fast cookieless analytics, no banner

Deploy Betterlytics — Cookieless, GDPR-Compliant Web Analytics

Just deployed

/var/lib/clickhouse

Just deployed

/var/lib/postgresql

Deploy and Host Betterlytics on Railway

Betterlytics is a modern, cookieless, privacy-first web analytics platform — a fast, GDPR-compliant alternative to Google Analytics and Plausible, built with Rust, ClickHouse, and Next.js. It measures traffic, not individuals: no cookies, no personal data, no consent banner required, and a clean single-page dashboard for real-time stats. This template deploys your own Betterlytics instance so you own every pageview — analytics data that stays entirely on your infrastructure, with a lightweight tracking script and a fast columnar backend built for scale.


What This Template Deploys

ServicePurpose
BetterlyticsThe analytics app, tracking API, and dashboard (Rust + Next.js)
ClickHouseColumnar event store for pageviews and analytics queries

Both connect over Railway's private network. Betterlytics ingests events through a lightweight script and serves the dashboard, with ClickHouse as the high-performance columnar database that keeps queries fast even at high pageview volume. Railway provides automatic HTTPS and a public domain.


About Hosting

Betterlytics is a modern analytics stack, and its speed comes from ClickHouse — knowing what that means for your deployment is the key, and this template sets it up.

Cookieless and GDPR-compliant by design — no banner needed. Betterlytics measures traffic without cookies and without storing personal data or IP addresses, so it's compliant with GDPR, CCPA, and PECR out of the box, and doesn't trigger the cookie-consent banner requirement. Add a small tracking script to your site and you get pageviews, sources, and events — without the privacy and compliance overhead of Google Analytics.

Built on Rust and ClickHouse for speed. Unlike PHP- or Node-based analytics tools, Betterlytics uses a Rust backend for fast, efficient event ingestion and ClickHouse for storage — a columnar database purpose-built for analytics queries. This is what keeps the dashboard responsive and queries fast even as your pageview volume grows into the millions, where row-based databases would slow down.

ClickHouse needs headroom — size the plan accordingly. ClickHouse is powerful but not featherweight: it wants meaningful memory to run well, so provision a Railway plan with adequate RAM rather than the smallest tier. This is the main operational consideration — Betterlytics is fast, but that speed comes from a real analytics database, so give it room, and scale the memory for high-traffic sites.

Your analytics data stays yours. Every event lives in your ClickHouse instance on your Railway infrastructure — never sent to a third party, never sold, never used to build advertising profiles. Complete data sovereignty over your visitors' activity, which matters for EU companies, healthcare, fintech, and anyone privacy-conscious. Betterlytics presents traffic, sources, pages, and events on one modern single-page dashboard — no nested reports or training required — and tracks unlimited sites from one instance at flat cost.

Because Betterlytics is a newer, fast-moving project, pin the image version you deploy and check the repository for the current environment variables and setup steps before deploying, so your configuration matches the latest release.

Typical cost: ~$10–20/month on Railway for the app and ClickHouse, scaling with traffic and the memory ClickHouse needs. Betterlytics is open source and free to self-host.


How It Compares

Betterlytics (self-hosted)Google AnalyticsPlausibleMatomo
CookiesNoneYesNoneOptional
BackendRust + ClickHouseGoogleElixir + ClickHousePHP + MySQL
GDPR consent bannerNot neededNeededNot neededDepends
Data ownershipFull — your infraGoogleFullFull
DashboardModern single-pageComplexSimpleFeature-heavy
Self-hostableYesNoYesYes

Google Analytics is free but uses cookies, needs a consent banner, and sends your visitors' data to Google. Plausible is an excellent cookieless option on a similar ClickHouse backend. Matomo is feature-complete but PHP-based, heavier, and cookie-using by default. Betterlytics' edge is a modern, fast, cookieless stack — a Rust and ClickHouse core with a clean dashboard — self-hosted at flat cost, with every pageview on infrastructure you own and no compliance overhead.


Deploy in Under 5 Minutes

  1. Click Deploy on Railway — Betterlytics and ClickHouse build and wire together (~4 minutes)
  2. Provision adequate RAM for ClickHouse, and confirm the services are connected
  3. Open your Railway URL and create your account and first site
  4. Copy the tracking script and add it to your website's HTML
  5. Watch pageviews, sources, and events appear on the dashboard in real time

Pin the image version and check the repo for current environment variables before deploying.


Common Use Cases

  • Privacy-first web analytics — measure traffic without cookies, banners, or personal data
  • Google Analytics replacement — a fast, modern GA alternative that keeps data on your infra
  • Multi-site analytics — track unlimited websites from one self-hosted instance at flat cost
  • Data-sovereign metrics — keep every visitor event on infrastructure you own

Configuration

VariableRequiredDescription
ClickHouse connectionAuto-injectedThe columnar event store, wired via Railway references
App URL / domainRequiredYour Railway public domain for the dashboard and tracking
Admin accountOn first visitCreated through the dashboard setup
Storage / RAMConfigurableProvision adequate memory for ClickHouse

ClickHouse needs memory, so size the plan. Betterlytics is fast because of ClickHouse, which wants meaningful RAM — provision an adequate plan rather than the smallest tier, and scale memory for high-traffic sites.

It's a fast-moving project — pin and verify. Betterlytics is newer, so pin the image version and check the repository for current environment variables and setup steps so your configuration matches the latest release.


Dependencies for Betterlytics Hosting

  • Railway account — ~$10–20/month for the app and ClickHouse, scaling with traffic
  • ClickHouse for event storage (included and wired)
  • Adequate RAM provisioned for ClickHouse to run well
  • A website to add the lightweight tracking script to

Deployment Dependencies

Implementation Details

The template deploys Betterlytics — a cookieless analytics platform with a Rust backend and Next.js frontend — alongside a ClickHouse database over Railway's private network. ClickHouse is a columnar, analytics-oriented store, which is what gives Betterlytics fast queries at high pageview volume where a row-based database would degrade; it is also the main resource consideration, since ClickHouse benefits from meaningful memory, so the Railway plan should be sized with adequate RAM rather than the smallest tier.

Betterlytics tracks visits without cookies and without storing personal data or IP addresses, making it compliant with GDPR, CCPA, and PECR and exempt from cookie-consent-banner requirements; sites integrate by adding a lightweight tracking script. All event data resides in the self-hosted ClickHouse instance, giving complete data sovereignty, and the dashboard presents traffic, sources, pages, and events in a single-page modern interface, with unlimited sites per instance.

Because Betterlytics is a newer and actively developed project, the specific environment variables, image tags, and any additional services may change between releases; the deployed image should be version-pinned and the repository consulted for the current configuration before deploying and when upgrading. ClickHouse holds the analytics data and is the primary backup target.


Frequently Asked Questions

Do I need a cookie consent banner? No — Betterlytics is cookieless and stores no personal data or IP addresses, so it's GDPR/CCPA/PECR compliant and exempt from consent-banner requirements. You measure traffic without the privacy overhead of Google Analytics.

Why does it use ClickHouse? ClickHouse is a columnar database built for analytics, which keeps queries fast even at millions of pageviews. It's what makes Betterlytics fast, and also why the deployment wants adequate RAM rather than the smallest plan.

How is it different from Plausible? Both are cookieless and ClickHouse-backed. Betterlytics is a newer, Rust-based project with a modern dashboard; Plausible is more established on an Elixir backend. Both keep your data self-hosted.

How do I add tracking to my site? Create a site in the dashboard, copy the lightweight tracking script, and add it to your website's HTML. Pageviews and events then appear on the dashboard in real time.


Why Deploy Betterlytics 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 Betterlytics on Railway you get modern cookieless analytics with the setup handled — a Rust and ClickHouse stack wired together, automatic HTTPS, and a clean dashboard. Measure your traffic privately, compliant by design and free of consent banners, with every pageview on infrastructure you own.


Template Content

More templates in this category

View Template
NEW
Betterlytics
Betterlytics is a cookieless analytics platform GDPR-compliant.

Anarchist Manifesto
22
View Template
Matomo Analytics + MariaDB
Privacy-friendly analytics with MariaDB and persistent volumes.

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

nonzerosum
19