Deploy OpenPanel vs GA4

Self-hosted product analytics instead of Google Analytics 4

Deploy OpenPanel vs GA4

Just deployed

/var/lib/postgresql/data

Just deployed

Just deployed

op-redis

redis:8.2.1

Just deployed

/data

Just deployed

/var/lib/clickhouse

Just deployed

Deploy and Host self hosted OpenPanel vs GA4 (Open-Source Google Analytics 4 Alternative) on Railway

This template runs a seven-service OpenPanel stack on Railway: Caddy proxy, Fastify API, Next.js dashboard, worker, Postgres, Redis and ClickHouse. It's for teams leaving GA4 who want cookieless product analytics on their own domain.

About Hosting OpenPanel vs GA4 open-source software on Railway (self hosted OpenPanel as a GA4 alternative template)

Your events land in ClickHouse on hardware you control, not Google's. This template runs seven services: a Caddy proxy, the Fastify API, the Next.js dashboard, a worker, Postgres 17, Redis 8.2.1 and ClickHouse 25.12, with the proxy as the only public surface.

Railway adds a TLS domain, private networking between those services, volumes for the databases and proxy health checks at /api/healthcheck, so migrations and restarts don't need babysitting.

Why Deploy OpenPanel vs GA4, the Google Analytics 4 alternative on Railway (Railway Free Trial)

GA4 is free, but you pay in control: sampled reports, no raw event access without BigQuery, and consent friction in the EU. Here you run the whole stack for roughly $20-40/mo on Railway and own the ClickHouse events. Start on the $5 trial.

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 OpenPanel vs GA4 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.

Railway vs Other Hosting Providers and VPS for OpenPanel vs GA4 self hosting

You're running the same seven containers either way, so the choice comes down to plumbing.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanOne deploy gives a public domain, private networking between services and persistent volumes.A droplet where you install Docker and Caddy yourself, then wire DNS and TLS.
AWSUsage billing and no IAM, VPC or load balancer work.ECS or EC2 plus an ALB, security groups and ClickHouse sizing decisions.
HetznerClick-to-deploy and per-service scaling without resizing the whole box.Cheapest raw CPU, but you own kernel patches, backups and disk monitoring.

Common Use Cases for hosted OpenPanel vs GA4

  • Basic tracking without a cookie banner: the script is cookieless by default, so a marketing site counts visits and signups without a consent gate. Check your jurisdiction.
  • One tool for web and product analytics: pageviews, funnels, retention and profiles sit in one project, so you stop stitching GA4 traffic to a second product tool.
  • Event data on your own infrastructure: events land in ClickHouse on your Railway project, and Postgres keeps config. Your history is a database you control.
  • Funnels and retention without exploration limits: save the signup to paid plan funnel once and keep it, instead of rebuilding a GA4 exploration.
  • Running in parallel with GA4 during migration: ship both tags for a few weeks, compare sessions and key events, then drop the GA4 tag.

Dependencies for OpenPanel vs GA4 Docker hosted on Railway

Seven services run here: op-proxy (caddy:2-alpine, port 8080, the only public one), op-api (Fastify, port 3000, health /healthcheck), op-dashboard (Next.js, port 3000, health /api/healthcheck), op-worker, op-postgres (postgres-ssl:17), op-redis (8.2.1, appendonly) and op-clickhouse (25.12).

Deployment Dependencies for Managed OpenPanel vs GA4 Service (Product Analytics)

Set SELF_HOSTED=true, plus COOKIE_SECRET, POSTGRES_PASSWORD, REDIS_PASSWORD and CLICKHOUSE_PASSWORD (all generated). Keep ALLOW_REGISTRATION=true until the first account exists. RESEND_API_KEY and EMAIL_SENDER stay optional.

Implementation Details for OpenPanel vs GA4 (Using OpenPanel official docker image)

Images are pinned at lindesvard/openpanel-*:2.3.0; the API runs migrations on start, Caddy reads CADDYFILE, and API_HOST=:: binds IPv6 on Railway. Health goes through the proxy at /api/healthcheck.

How does OpenPanel vs GA4 compare against other Google Analytics 4 alternatives

OpenPanel vs Google Analytics 4

  • Data ownership: Events land in your ClickHouse on Railway, not Google's.
  • Migration gap: No GA4 history import, no Google Ads or Search Console parity.
  • Where GA4 wins: Free at any volume, with modeled data and BigQuery export.
  • Parallel running: Keep both tags for a few weeks and compare funnels before you switch.

OpenPanel vs Plausible

  • Analysis depth: Plausible counts pageviews; OpenPanel adds funnels, cohorts and profiles.
  • Footprint: Plausible runs on far less. OpenPanel needs ClickHouse, Postgres and Redis.
  • Where Plausible wins: Simplicity, if traffic numbers are all you need.

OpenPanel vs PostHog

  • Scope: PostHog bundles flags, experiments and surveys. OpenPanel keeps to analytics plus session replay.
  • Self-host weight: PostHog's full suite is heavier than this seven-service template.
  • Where PostHog wins: A broader platform if you want flags and experiments in the same tool.
  • Migration feel: Both use events and properties, so a tracking plan transfers with less rewiring than a move to Plausible.

OpenPanel vs Mixpanel

  • Cost and ownership: Mixpanel is closed SaaS. Self-hosted OpenPanel is free with unlimited events.
  • Feature gap: Mixpanel is more polished in flows and integrations. OpenPanel covers the core.
  • Where Mixpanel wins: Built-in integrations and support, with no servers to patch.
  • Reporting: Both ship custom dashboards; OpenPanel's are simpler and stay on your servers.

How to use OpenPanel vs GA4 (the OSS product analytics platform)?

  1. Open your Railway domain, create the first account, then set ALLOW_REGISTRATION=false.
  2. Create a project, then a client for your website.
  3. Paste the script with your clientId and apiUrl pointing at this deployment:


  1. Leave trackScreenViews and trackOutgoingLinks on so route changes and outbound clicks land as events.
  2. Send a custom event: op.track('signup', {plan:'pro'}).
  3. Build a funnel that matches your old GA4 conversion, then keep GA4 running a few weeks and compare the numbers before you switch.

How to self host OpenPanel vs GA4 on other VPS Services (OpenPanel self hosting guide)

Upstream ships a Compose file and a setup script, so the same stack runs outside Railway. Use a VPS with 4 GB of RAM or more.

Clone the Repository

git clone https://github.com/lindesvard/openpanel.git

Install Dependencies

Docker Engine with the Compose plugin, plus git and openssl for secret generation.

Configure Environment Variables

Set SELF_HOSTED=true, point DASHBOARD_URL and API_URL (ending in /api) at your domain, keep API_URL_SSR internal, and generate the cookie, Postgres, Redis and ClickHouse passwords with openssl.

Start the OpenPanel vs GA4 Application

docker compose up -d

Wait for /api/healthcheck to report redis, db and clickhouse ready, then open the domain, create the first account and paste the script tag with your clientId and apiUrl set to https://your-domain/api.

Official Pricing of OpenPanel vs GA4 (OpenPanel pricing)

OpenPanel self-hosted is free and open source (AGPL-3.0) with unlimited events, so your only bill is Railway: roughly $20-40/mo at low volume because ClickHouse, Postgres, Redis and four app services all run. Google Analytics 4 stays free but closed.

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

Running OpenPanel in the cloud is priced by monthly events, while self hosting trades a fixed infrastructure bill for your own time on upgrades, backups and ClickHouse disk growth.

Monthly cost of self hosting OpenPanel vs GA4 on Railway

On Railway, expect roughly $20-40/mo at low volume, since ClickHouse, Postgres, Redis and four app services all stay running. Cost grows with event volume, mostly ClickHouse storage.

System Requirements for Hosting OpenPanel vs GA4 on a VPS

Budget at least 4 GB RAM and 2 vCPUs to keep ClickHouse, Postgres, Redis and the app services comfortable, plus 40 GB of disk for events and volume persistence. Swap helps on smaller boxes but ingestion gets slow.

Frequently Asked Questions (FAQs)

Can I import my GA4 history?

No. OpenPanel doesn't import Google Analytics data, so export the GA4 reports you still rely on before you switch. Event history starts the day the script goes live.

Will the numbers match GA4?

Not exactly. GA4 leans on cookies, sampling in some reports and modeled data, while OpenPanel counts raw events, so totals drift for both good and boring reasons.

Do I need a cookie banner?

OpenPanel is cookieless by default, so basic pageview tracking usually doesn't need one. Consent still depends on your jurisdiction and on what you put in event properties.

What replaces GA4 conversions?

Funnels and goals. Build a funnel whose steps mirror your old key event path, then compare its conversion rate against GA4 while both run.

Can I connect Google Ads?

No. OpenPanel has no Google Ads or Search Console integration, so keep GA4 around for paid attribution or export Ads data elsewhere.

Where is the data stored?

Events land in ClickHouse on your Railway volume, configuration sits in Postgres. You own the deployment, so retention and exports are yours to decide.


Template Content

More templates in this category

View Template
Typesense Multilingual
Locale-aware multilingual search with Typesense

onepush
0
View Template
Formbricks | Open-Source Typeform & Qualtrics Alternative
Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Two Workspaces
2
View Template
Typesense PHP
official PHP client against Railway

onepush
0