
Deploy OpenPanel Revenue
Tie payments to visitors in self-hosted analytics
Just deployed
op-clickhouse
Just deployed
/var/lib/clickhouse
op-postgres
Just deployed
/var/lib/postgresql/data
op-dashboard
Just deployed
op-worker
Just deployed
op-redis
Just deployed
/data
op-proxy
Just deployed
Deploy and Host self hosted OpenPanel Revenue (Open-Source Product Analytics) on Railway
This template runs OpenPanel with its API, dashboard, worker, Postgres, Redis and ClickHouse behind one Caddy proxy. The angle is revenue: capture the device id before checkout, then tie each Stripe payment back to the visitor who actually paid.
About Hosting OpenPanel Revenue open-source software on Railway (self hosted OpenPanel revenue tracking template)
This template runs OpenPanel on your own Railway project: seven services, with Caddy as the only public entry point, Fastify API, Next.js dashboard, worker, Postgres, Redis and ClickHouse. Events and revenue rows stay in your ClickHouse volume under AGPL-3.0.
Railway handles the domain, TLS, private networking and service wiring, so you can focus on capturing op.getDeviceId() before checkout and recording payments from webhooks.
Why Deploy OpenPanel Revenue, the Mixpanel alternative on Railway (Railway Free Trial)
Mixpanel bills by events and keeps your revenue data on its servers. Here you self host OpenPanel, keep every payment event in your own ClickHouse, and pay Railway roughly $20-40/mo at low volume. The $5 trial covers the first deploy.
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 Revenue 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 Revenue self hosting
The real difference is who runs ClickHouse, Postgres, Redis and the queue worker.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Seven services wired, one public domain, secrets generated | Droplets and managed databases you connect yourself |
| AWS | Same stack, per-service scaling, no VPC or IAM work | ECS, RDS, ElastiCache and EC2 set up separately |
| Hetzner | Managed deploy with volumes for ClickHouse and Postgres | A cheap VPS where you install Docker and TLS |
Common Use Cases for hosted OpenPanel Revenue
- Which referrer brings paying users: capture the device id at checkout and record revenue from the webhook, then read revenue by source. You see who paid, not who clicked.
- Revenue per campaign or UTM: group payments by utm_campaign to see which channel earned its keep. Cheap signups and expensive customers stop looking identical.
- First purchase after a trial: the device id saved at signup ties the first payment to the visitor whose trial produced it, even weeks later.
- Revenue for logged-in users: record against profileId after login so three payments from one customer read as one profile, not three devices.
- Revenue next to funnels: read the funnel and the revenue view together to spot the step that loses trials which would have paid.
Dependencies for OpenPanel Revenue Docker hosted on Railway
Seven services run in one Railway project. op-proxy is the only public one: Caddy on 8080, Caddyfile from CADDYFILE, /api/* to op-api, the rest to op-dashboard. op-api is Fastify on 3000, health at /api/healthcheck, migrations on start, joined by op-dashboard, op-worker and three stateful services: op-postgres 17, op-redis 8.2.1 with a password and appendonly on /data, and op-clickhouse 25.12 on 8123 with a volume at /var/lib/clickhouse, listening on ::.
Deployment Dependencies for Managed OpenPanel Revenue Service (Product Analytics)
App images are lindesvard/openpanel-* at 2.3.0, digest-pinned. Generated: POSTGRES_PASSWORD, REDIS_PASSWORD, CLICKHOUSE_PASSWORD.
Implementation Details for OpenPanel Revenue (Using OpenPanel official docker image)
API_HOST is :: for IPv6. Point the SDK apiUrl at https://your-domain/api, then capture op.getDeviceId() before checkout and carry it through Stripe metadata.
How does OpenPanel Revenue compare against other revenue attribution analytics tools
OpenPanel vs Mixpanel (Mixpanel Alternative)
- Where OpenPanel wins: Self-hosted, no event caps, and revenue ties to the cookieless device id.
- Where Mixpanel wins: Mature reports, deeper integrations and zero ops work, which matters if nobody on the team wants to run seven services.
- Tradeoff: You own upgrades, backups and ClickHouse disk growth.
OpenPanel vs PostHog (PostHog Alternative)
- Where OpenPanel wins: A smaller stack, so seven services is the whole deploy.
- Where it wins: Device id before checkout, Stripe metadata, webhook records the payment.
- Where PostHog wins: Feature flags, experiments and a wider suite with hosted cloud.
- Gotcha: Its hobby self-host is limited, so compare a paid plan.
OpenPanel vs Plausible (Plausible Alternative)
- Where OpenPanel wins: Plausible has revenue goals but no profiles or per-visitor attribution.
- Where it wins: One device id links an anonymous visitor and a logged-in profileId to a payment.
- Where Plausible wins: Lighter to host, simpler to explain to a non-technical team.
OpenPanel vs the Stripe dashboard (Stripe Revenue Reports)
- Where OpenPanel wins: Stripe shows payments, not which referrer or campaign produced them.
- Where it wins: Revenue sits next to funnels and retention, so you see the path.
- Where Stripe wins: It's the source of truth for refunds, disputes and payouts.
- Use both: Stripe for money operations, OpenPanel for attribution.
How to use OpenPanel Revenue (the OSS product analytics platform)?
- Open your Railway domain, make the first account, then a project and client. Point the SDK apiUrl at https://your-domain/api.
- Add the web SDK snippet to your site.
- When a visitor starts checkout, grab the device id and send it to your backend:
const deviceId = await op.getDeviceId();
await fetch("/checkout", { method: "POST", body: JSON.stringify({ deviceId }) });
- Put it in the Stripe Checkout session metadata.
- In the webhook handler, record the revenue with the server SDK using that device id, or the profileId for logged-in users.
- Open the dashboard and read revenue by referrer, country and campaign.
Confirm exact SDK method names and revenue parameters in the docs for your SDK version.
How to self host OpenPanel Revenue on other VPS Services (OpenPanel self hosting guide)
Upstream publishes a Compose file and setup script at openpanel.dev/docs/self-hosting, so a VPS run mirrors this template.
Clone the Repository
Clone the repo and change into its self-hosting folder, where the setup script and compose template live.
git clone https://github.com/Openpanel-dev/openpanel
cd openpanel/self-hosting
Install Dependencies
Docker with the Compose plugin, plus git. ClickHouse wants a few GB of RAM.
Configure Environment Variables
Run ./setup, which builds .env from .env.template; check SELF_HOSTED=true, COOKIE_SECRET, DATABASE_URL, REDIS_URL, CLICKHOUSE_URL, DASHBOARD_URL, API_URL and API_URL_SSR, plus Postgres, Redis and ClickHouse passwords. Point API_URL at https://your-domain/api.
Start the OpenPanel Revenue Application
Run docker compose up -d, open your domain, and create the first account before registration closes. Confirm migrations ran in the API logs before you send traffic.
On Railway the proxy, TLS, volumes, health checks and restarts are already wired.
Official Pricing of OpenPanel Revenue (OpenPanel pricing)
OpenPanel cloud is priced by monthly events, and everything else is unlimited: 5K events runs $2.50/mo, 100K is $20/mo, 1M is $90/mo, and 10M is $350/mo. Yearly billing gets two months free, and there's a 30-day free trial.
OpenPanel Revenue cloud vs self hosted comparison (Pricing, features, costs, and more)
Cloud and self hosted run the same product, so the choice comes down to who owns the ClickHouse cluster and the bill. Cloud bills by monthly events, everything else unlimited, with a 30-day trial and two months free on yearly plans.
Monthly cost of self hosting OpenPanel Revenue on Railway
Expect roughly $20-40/mo at low volume. Seven services run all the time: proxy, API, dashboard, worker, Postgres, Redis and ClickHouse. That floor holds while traffic is small, then grows with event volume and ClickHouse memory.
System Requirements for Hosting OpenPanel Revenue on a VPS
Give it a modern Linux host with Docker and Compose, 4 GB RAM minimum and 2 vCPU, and disk that grows because ClickHouse stores every event.
Frequently Asked Questions (FAQs)
Why is my revenue not linked to a visitor?
The webhook arrived without a device id. If checkout metadata never got op.getDeviceId(), or the browser dropped the event, the payment records with no identity attached.
Should I track revenue from the frontend or the backend webhook?
Backend. Browsers block and duplicate events, and the success page gets reloaded. The webhook fires once from your server and keeps the client secret server-side.
Does OpenPanel revenue tracking need cookies?
No. OpenPanel is cookieless and uses a device id, which is exactly why you carry it through checkout metadata yourself.
Which payment providers work with OpenPanel revenue tracking?
Anything with webhooks and metadata. The docs use Stripe Checkout, but Paddle, Lemon Squeezy or your own billing endpoint follow the same pattern.
What currency is used for revenue events?
Check the server SDK docs for your version, and convert to one currency before recording if you want totals that add up.
Can I backfill old payments into OpenPanel?
Only if you stored the device id or profileId. Payments without one land as unlinked revenue, so the backfill is partial at best.
Template Content
op-clickhouse
clickhouse/clickhouse-server:25.12op-postgres
ghcr.io/railwayapp-templates/postgres-ssl:17op-dashboard
lindesvard/openpanel-dashboard:2.3.0op-worker
lindesvard/openpanel-worker:2.3.0op-redis
redis:8.2.1op-proxy
caddy:2-alpine