Railway

Deploy OpenAnalytics [Updated Aug '26]

OpenAnalytics [Aug '26] (Privacy-First Analytics & GA Alternative) SelfHost

Deploy OpenAnalytics [Updated Aug '26]

valkey-queue

redis:8.2

Just deployed

/data

valkey-realtime

redis:8.2

Just deployed

/data

Just deployed

/var/lib/clickhouse

Just deployed

Just deployed

Just deployed

Just deployed

/var/lib/postgresql/data

OpenAnalytics open source privacy-first web analytics dashboard showing visitors, pageviews, bounce rate and revenue

Deploy and Host self hosted OpenAnalytics (Open-Source Web Analytics) on Railway

OpenAnalytics is open-source, privacy-first web analytics: one lightweight tracker script, no cookies, no cross-site profiles, aggregate-only reads. It covers page views, custom events, sessions, web vitals, funnels, live visitors, visitor journeys, embeddable widgets, share links and revenue analytics from your own Stripe account, and replaces Google Analytics without handing anyone your visitors.

About Hosting OpenAnalytics open-source software on Railway (self hosted OpenAnalytics template)

Self hosting means every pageview, session and revenue fact lives in your own Postgres and ClickHouse, under AGPL-3.0, with no vendor holding your history and no sampling applied to it. The stack is eleven services and this template deploys all of them: two databases, two Valkey instances, the collector, gateway, API, realtime stream, worker, dashboard and a migration runner. Railway handles private networking, HTTPS and volumes.

Why Deploy OpenAnalytics, the Google Analytics alternative on Railway (Railway Free Trial)

Google Analytics is free because your visitors are the product, and Plausible Cloud or Fathom bill per pageview as traffic grows. OpenAnalytics on Railway costs the same whether you serve ten thousand or ten million events: you pay for containers, not traffic. Railway gives every new user a free trial with GitHub, enough to bring the stack up and measure a real site the same afternoon.

Railway vs Other Hosting Providers and VPS for OpenAnalytics self hosting

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanEleven services deployed and wired in one clickA droplet, then Compose, Nginx and certbot by hand
AWSFlat container pricing, no egress surprisesRDS, EC2 and IAM policies to assemble first
HetznerManaged volumes, private networking, redeploysCheap VPS, four DNS records, manual upgrades

Common Use Cases for hosted OpenAnalytics

Here are common use cases for the open-source privacy-first analytics platform:

  • Replacing Google Analytics on a marketing site with cookieless tracking that needs no consent banner in most places.
  • Watching who is on the site right now, page by page, from a presence cache rather than a batch job.
  • Attributing revenue to campaigns with your own Stripe account, joined against sessions in your own database.
  • Measuring funnels, custom events and web vitals per site, then sharing a read-only public link with a client.
  • Running many domains on one deployment, each with its own retention window and tracking key.

OpenAnalytics realtime dashboard showing live visitors and the page each one is on

Dependencies for OpenAnalytics Docker hosted on Railway

OpenAnalytics is eight services rather than one container, and needs two databases and two key-value stores. The template provisions and connects them all.

Deployment Dependencies for Managed OpenAnalytics Service (OSS Web Analytics)

Postgres holds the control plane: accounts, sites, keys, funnels and share links. ClickHouse holds events, sessions and rollups. One Valkey instance is the durable queue holding the only copy of an event between the collector's acknowledgement and the worker's insert; a second, separate one holds presence and rate-limit counters that are losable by design.

Implementation Details for OpenAnalytics (Using OpenAnalytics official docker images)

Every service runs the official ghcr.io/openlabs-so/openanalytics image at a pinned release. Thin wrappers add what a Compose install gets from Caddy: the oa.js tracker on the collector origin, header scrubbing so a visitor cannot pick their own rate-limit bucket, four least-privilege ClickHouse roles, and three Ed25519 signing pairs derived per deployment. Sign in with email and password on first boot, then add OAuth or SMTP.

How does OpenAnalytics compare against other web analytics platforms

OpenAnalytics vs Google Analytics (Google Analytics Alternative)

  • Data ownership: Events land in your ClickHouse, not an advertising company's warehouse, so there is nothing to negotiate with a data protection officer.
  • No sampling: GA4 samples large date ranges; here every rollup is computed from your own raw events, in full.

OpenAnalytics vs Plausible (Plausible Alternative)

  • Deeper model: Funnels, visitor journeys, revenue attribution and web vitals ship in the open-source build, not a paid tier.
  • Flat cost: Plausible Cloud prices per pageview; this costs the same the day your traffic doubles.

OpenAnalytics vs Matomo (Matomo Alternative)

  • Storage engine: ClickHouse answers a year of data in the time a MySQL-backed install spends on a month.
  • Privacy default: Matomo can be configured cookieless; OpenAnalytics has no cookie at all.

OpenAnalytics vs PostHog (PostHog Alternative)

  • Scope: PostHog is a suite with session replay and flags; OpenAnalytics stays focused and is lighter to run.
  • Identity: PostHog identifies persons across sessions by design; an OpenAnalytics visitor hash rotates nightly and cannot outlive the day it was minted.

How to use OpenAnalytics (the OSS web analytics platform)?

Open the dashboard, create the first account, add a site, and paste the one-line oa.js snippet it gives you into the pages you want measured.

How to self host OpenAnalytics on other VPS Services (OpenAnalytics self hosting guide)

Clone the Repository

git clone https://github.com/OpenLabs-so/openanalytics && cd openanalytics, then check out the newest release tag rather than main: the compose file, env templates and migrations ship with the images.

Install Dependencies

A Linux host with Docker and about 4 GB of RAM. Nothing is built on the host: a release publishes eight images, so installing is a pull.

Configure Environment Variables

Point four DNS records at the host, then run ./generate-secrets.sh --domain example.com --email you@example.com in infra/selfhost. Certificates are issued on first boot and fail without them.

Start the OpenAnalytics Application

docker compose pull && docker compose up -d, then open the dashboard and create the first account. Later, ./upgrade.sh moves between releases and takes the snapshot ./rollback.sh needs, because migrations do not go down.

Official Pricing of OpenAnalytics (OpenAnalytics pricing)

OpenAnalytics is AGPL-3.0 and free to self host, with no seat, site or event limits and no feature held back for a paid plan. The authors run a hosted instance at getopen.so, the same code on somebody else's servers. Self hosting costs only the infrastructure you run it on.

OpenAnalytics cloud vs self hosted comparison (Pricing, features, costs, and more)

The hosted instance trades a monthly bill for never thinking about ClickHouse; self hosting trades that bill for a stack you can query directly and retain as long as you like.

Monthly cost of self hosting OpenAnalytics on Railway

Expect roughly $25 to $45 a month for the eleven services at low traffic, most of it ClickHouse and Postgres. Ingest is cheap: the collector and worker are small Node processes, and cost grows with stored events.

System Requirements for Hosting OpenAnalytics on a VPS

Two vCPUs and 4 GB of RAM is the working minimum, 8 GB comfortable once ClickHouse holds months of events. Budget from 20 GB of storage, plus Docker and an x86-64 host: the images are amd64.

Frequently Asked Questions (FAQs)

What is OpenAnalytics self hosted?

It is the full platform on infrastructure you control: ingest, storage, dashboard and API, with every visitor event staying in your own Postgres and ClickHouse.

How much does OpenAnalytics self hosting cost on Railway?

Around $25 to $45 a month for the eleven-service stack at low traffic. Railway bills what the containers use, so the number moves with retention, not a per-pageview price list.

Is OpenAnalytics free to use?

Yes. It is AGPL-3.0 licensed and free to self host, with no limits on sites, seats or events. Only the getopen.so hosted instance is paid.

What tracking does OpenAnalytics support without cookies?

Page views, custom and attribute-driven events, sessions, web vitals, funnels, live presence and revenue. Visitors are a salted hash that rotates nightly, so a trail lasts a visit and never a person.

Where can I download OpenAnalytics?

From github.com/OpenLabs-so/openanalytics, or deploy this Railway template and get the whole stack running without downloading a thing.

What are some alternatives to OpenAnalytics?

Google Analytics, Plausible, Fathom, Umami, Matomo, GoatCounter and PostHog. OpenAnalytics is closest to Plausible in philosophy and PostHog in depth, while staying cookieless.


Template Content

More templates in this category

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

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

amnesia
3