
Deploy OpenPanel Server Events
Track backend events with the OpenPanel API and SDK
op-proxy
Just deployed
op-worker
Just deployed
op-clickhouse
Just deployed
/var/lib/clickhouse
op-redis
Just deployed
/data
op-postgres
Just deployed
/var/lib/postgresql/data
Just deployed
op-dashboard
Just deployed
Deploy and Host self hosted OpenPanel Server Events (Server-Side Event Tracking Analytics) on Railway
Server-side tracking catches what browsers miss, like a payment cleared in a webhook or a signup from a backend job.
About Hosting OpenPanel Server Events open-source software on Railway (self hosted OpenPanel server-side tracking template)
Running your own OpenPanel means the events from your backend, like signups, payments and job completions, land in a database you control rather than a vendor's.
Why Deploy OpenPanel Server Events, the Segment alternative on Railway (Railway Free Trial)
Segment is the usual pick for routing backend events, but it bills by tracked volume and sends data on to other tools.
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 Server Events 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 Server Events self hosting
Railway runs the seven OpenPanel services from one template, while a VPS means you assemble them yourself.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | One-click deploy of all seven services, with generated passwords and a public domain. | A Droplet you size and secure yourself, with Docker Compose, volumes, TLS and backups on you. |
| AWS | Services connected and volumes attached per service, with no VPC or load balancer to set up. | Full control over VPCs, EC2 or ECS and EBS, which pays off at scale but takes real setup. |
| Hetzner | Usage-based billing that tracks what ClickHouse and Postgres actually consume. | Cheap servers with generous bandwidth, but install, updates and monitoring stay with you. |
Common Use Cases for hosted OpenPanel Server Events
- Tracking payments from a webhook handler: A Stripe webhook fires on the server, so the purchase lands in OpenPanel even if the buyer closed the tab. Call
op.track('payment_succeeded', { amount: 4900, plan: 'pro' })from the handler. - Signup events from the API: Record
account_createdinside the route that creates the user. The call goes straight to your API, so ad blockers cannot strip it. - Cron and job events: Scheduled jobs have no browser. Track
nightly_export_finishedwith astatusproperty to chart job health next to user activity. - Identifying users server-side: When a user upgrades or changes email in your backend, call
op.identifywith theprofileIdto keep the profile current. - Mixing browser and server events in one funnel: Keep the web SDK for page views and send
checkout_completedfrom the server with the sameprofileId. The funnel then runs from first visit to paid conversion across both sources.
Dependencies for OpenPanel Server Events Docker hosted on Railway
This template runs as several services, and the backend-events angle depends on the API being reachable at the public domain.
Deployment Dependencies for Managed OpenPanel Server Events Service (Product Analytics)
op-proxy runs caddy:2-alpine and forwards the client IP header, which matters because backend requests otherwise show the server's own address. op-api is Fastify on port 3000 with health at /healthcheck, and it runs migrations on start. op-dashboard is Next.js on port 3000, and op-worker handles queue jobs.
Implementation Details for OpenPanel Server Events (Using OpenPanel official docker image)
Key variables include SELF_HOSTED=true, COOKIE_SECRET, DATABASE_URL, REDIS_URL, CLICKHOUSE_URL, DASHBOARD_URL, API_URL (your public domain plus /api), and API_URL_SSR for the dashboard.
How does OpenPanel Server Events compare against other ways to send backend analytics events
OpenPanel Server Events vs Segment (Customer Data Platform Alternative)
- Scope: Segment collects events once and routes them to many destinations. OpenPanel Server Events sends one backend's events straight into OpenPanel's own store.
- Hosting: You self-host on Railway with unlimited events and no per-destination fees.
- Where Segment wins: If your data team runs warehouses, reverse ETL, and a dozen integrations, Segment's ecosystem is hard to beat.
OpenPanel Server Events vs Mixpanel (Closed Source Product Analytics Alternative)
- License: OpenPanel is AGPL-3.0, so you can read the code and run it yourself. Mixpanel is closed SaaS with a free tier and paid plans.
- Data ownership: Your events sit in your own ClickHouse instance on Railway.
- Where Mixpanel wins: It is polished and mature, with years of established reports. Less setup time is a real advantage.
OpenPanel Server Events vs PostHog (Open Source Product Analytics Alternative)
- Footprint: PostHog covers feature flags and replay too. OpenPanel focuses on events, funnels, cohorts, and profiles, so fewer moving parts.
- Self-hosting weight: PostHog is heavier to self-host, and its hobby deploy is limited. OpenPanel's seven services are simpler to keep running.
- Where PostHog wins: If you want feature flags and experiments next to analytics, PostHog covers more ground.
OpenPanel Server Events vs Google Analytics Measurement Protocol (Server Hits to GA4)
- Data access: The Measurement Protocol sends server hits to Google Analytics 4 over HTTP. Raw data stays in Google's closed product, with BigQuery export as the main way out.
- Control: OpenPanel gives you the events and the database, so you can query ClickHouse directly.
- Where Google wins: GA4 is free to start and plugs into ad platforms, which OpenPanel does not try to match.
How to use OpenPanel Server Events (the OSS product analytics platform)?
-
Create a project and a client. In the dashboard at your public domain, create a project and a write client. Copy the client ID and secret, and keep the secret on the server.
-
Install the SDK. Run
npm install @openpanel/sdkin your Node backend, then initialize it with clientId, clientSecret, and apiUrl set to your API. -
Track events and profiles. Call
trackoridentify, or POST to/trackwith both headers if you skip the SDK:
import { OpenPanel } from '@openpanel/sdk';
const op = new OpenPanel({
clientId: process.env.OP_CLIENT_ID,
clientSecret: process.env.OP_CLIENT_SECRET,
apiUrl: 'https://your-domain/api',
});
op.track('invoice_paid', { amount: 4900 });
op.identify({ profileId: 'user_123', email: 'joe@doe.com' });
// curl -X POST https://your-domain/api/track \
// -H "openpanel-client-id: $OP_CLIENT_ID" \
// -H "openpanel-client-secret: $OP_CLIENT_SECRET" \
// -H "Content-Type: application/json" \
// -d '{"type":"track","payload":{"name":"invoice_paid","properties":{"amount":4900}}}'
How to self host OpenPanel Server Events on other VPS Services (OpenPanel self hosting guide)
Run the same stack on any VPS with Docker, and server-side events land in the same place as browser events.
Clone the Repository
Get the source on your server and move into the project folder.
git clone https://github.com/Openpanel-dev/openpanel.git
cd openpanel
Install Dependencies
Use the upstream setup script or Docker Compose. Compose brings up Postgres, Redis, ClickHouse, the API, the dashboard and the proxy.
docker compose up -d
Configure Environment Variables
Set the public domain and secrets before you start.
SELF_HOSTED=true
DASHBOARD_URL=https://your-domain
API_URL=https://your-domain/api
ALLOW_REGISTRATION=true
Start the OpenPanel Server Events Application
Open https://your-domain, create the first account and a project, then copy the client ID and client secret.
Official Pricing of OpenPanel Server Events (OpenPanel pricing)
OpenPanel is AGPL-3.0 open source, so self hosting has no licence fee and unlimited events. You pay only for infrastructure.
The hosted cloud charges by monthly events, with everything else unlimited.
Count your monthly events first, including webhook and cron events, then choose between cloud and self hosting.
OpenPanel Server Events cloud vs self hosted comparison (Pricing, features, costs, and more)
The cloud and self-hosted versions run the same product, so the real question is who runs the infrastructure and who keeps the data.
Monthly cost of self hosting OpenPanel Server Events on Railway
Railway typically runs about $20-40 per month at low volume, since ClickHouse, Postgres, Redis and the four app services all stay running.
System Requirements for Hosting OpenPanel Server Events on a VPS
Plan for a host that can run seven containers at once, with ClickHouse as the heaviest part.
Frequently Asked Questions (FAQs)
Why does the server SDK need a client secret?
The browser SDK only needs your clientId, since anything shipped to a browser is public.
Do server-side events get past ad blockers?
Yes. Point apiUrl at https://your-domain/api for a self-hosted install.
How do I pass the user's IP and user agent?
Send the x-client-ip header with the visitor's real IP for geo location, and the user-agent header for device detection.
Can I mix server and web SDK events in one funnel?
Yes, as long as both use the same profileId. Mismatched IDs are the usual reason a funnel looks broken.
Should I batch server events?
Batching helps when a job emits thousands of events in a burst. For a few events, the simple track call is fine.
How do I keep the secret out of the browser?
Never put clientSecret in frontend code, bundles, or public environment variables that a build step exposes.
Template Content
op-proxy
caddy:2-alpineop-worker
lindesvard/openpanel-worker:2.3.0op-clickhouse
clickhouse/clickhouse-server:25.12op-redis
redis:8.2.1op-postgres
ghcr.io/railwayapp-templates/postgres-ssl:17op-dashboard
lindesvard/openpanel-dashboard:2.3.0
