---
title: "Deploy OpenPanel"
description: "Self-hosted Mixpanel and Plausible alternative: events, funnels, retention"
category: "Analytics"
url: https://railway.com/deploy/openpanel-3
---

# Deploy OpenPanel

Self-hosted Mixpanel and Plausible alternative: events, funnels, retention

**[Deploy OpenPanel on Railway](https://railway.com/template/openpanel-3)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/openpanel-3/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Analytics

## Template content

### OpenPanel API https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/openpanel.png

- **Source:** https://github.com/aalfath/openpanel-railway-template
- **Health check:** /healthcheck

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### OpenPanel Worker https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/openpanel.png

- **Source:** https://github.com/aalfath/openpanel-railway-template
- **Health check:** /healthcheck

### OpenPanel https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/openpanel.png

- **Source:** https://github.com/aalfath/openpanel-railway-template
- **Health check:** /proxy-health
- **Public domain:** Yes

### ClickHouse https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/clickhouse.png

- **Source:** https://github.com/aalfath/openpanel-railway-template
- **Health check:** /ping

### OpenPanel Dashboard https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/openpanel.png

- **Source:** https://github.com/aalfath/openpanel-railway-template
- **Health check:** /api/healthcheck

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host OpenPanel on Railway

OpenPanel is an open-source web and product analytics platform, a self-hosted alternative to Mixpanel and Plausible. It tracks page views and custom events, and gives you funnels, retention, user profiles and real-time dashboards. It is cookieless by default and has SDKs for websites, React, Next.js, mobile apps and backends.

## About Hosting OpenPanel

OpenPanel is several services working together. This template deploys OpenPanel 2.3.0 as seven services: a Caddy front door that serves the dashboard and the `/api` routes on one public domain, the API (event ingestion and auth), the dashboard, the worker (queues and event batching), ClickHouse for event storage, plus Railway Postgres and Redis. Every OpenPanel service builds from a public GitHub repo with pinned images, so you get an "update available" notice when a new version is released. Secrets are generated at deploy time, migrations run on each API start, and ClickHouse, Postgres and Redis keep their data on volumes. Nothing needs to be filled in at deploy time.

## Common Use Cases

* Privacy-friendly website analytics without cookie banners
* Product analytics for web and mobile apps: funnels, retention and user journeys
* Replacing Mixpanel, Google Analytics or Plausible with analytics you host yourself

## Dependencies for OpenPanel Hosting

* PostgreSQL (users, projects, dashboards)
* Redis (queues and caching)
* ClickHouse (event storage, included in the template)

### Deployment Dependencies

* [OpenPanel self-hosting docs](https://openpanel.dev/docs/self-hosting/self-hosting)
* [OpenPanel environment variables](https://openpanel.dev/docs/self-hosting/environment-variables)
* [OpenPanel on GitHub](https://github.com/Openpanel-dev/openpanel)
* [Template repo](https://github.com/aalfath/openpanel-railway-template)

### Implementation Details

After the deploy, open the `OpenPanel` service's domain and create your account. Only the first account can sign up; invite teammates from the dashboard. Then create a project and add the tracking snippet it shows to your site.

To use a custom domain, add it to the `OpenPanel` service, then on `OpenPanel API` set `API_URL` to `https://YOUR-DOMAIN/api`, `DASHBOARD_URL` to `https://YOUR-DOMAIN` and `CUSTOM_COOKIE_DOMAIN` to `YOUR-DOMAIN`. The worker and dashboard read these from the API service.

Optional: email (password resets, invites) through `RESEND_API_KEY` and `EMAIL_SENDER`, and the AI assistant through `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`. Set them on `OpenPanel API` and `OpenPanel Worker`.

## Why Deploy OpenPanel 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 OpenPanel 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.



## Similar templates

- [Plausible WordPress](https://railway.com/deploy/deploy-plausible-for-wordpress-sites) — Cookie-free WordPress stats from your own Plausible
- [Typesense Multilingual](https://railway.com/deploy/deploy-typesense-multilingual-search) — Locale-aware multilingual search with Typesense
- [Formbricks](https://railway.com/deploy/formbricks-surveys) — Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Open this page in a browser: https://railway.com/deploy/openpanel-3
