---
title: "Deploy PostHog"
description: "Deploy the self-hosted version of PostHog."
category: "Analytics"
url: https://railway.com/deploy/posthog-1
---

# Deploy PostHog

Deploy the self-hosted version of PostHog.

**[Deploy PostHog on Railway](https://railway.com/template/posthog-1)**

- **Creator:** Hexatare's Projects
- **Category:** Analytics
- **Total deploys:** 179

## Template content

### Plugins https://posthog.com/favicon.svg

- **Image:** ghcr.io/hexatare/posthog-railway-template/plugins:latest

### ZooKeeper https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/zookeeper:latest

### Objectstorage https://devicons.railway.app/minio

- **Image:** ghcr.io/hexatare/posthog-railway-template/objectstorage:latest

### Property Defs RS https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/property-defs-rs:latest

### Temporal https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/temporal:latest

### ClickHouse https://devicons.railway.com/i/clickhouse.svg

- **Image:** ghcr.io/hexatare/posthog-railway-template/clickhouse:latest

### Replay Capture https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/replay-capture:latest

### Kafka Init https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/kafka-init:latest

### Feature Flags https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/feature-flags:latest

### SeaweedFS https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/seaweedfs:latest

### Temporal Django Worker https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/temporal-django-worker:latest

### Cyclotron Janitor https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/cyclotron-janitor:latest

### Web https://posthog.com/favicon.svg

- **Image:** ghcr.io/hexatare/posthog-railway-template/web:latest
- **Public domain:** Yes

### Worker https://posthog.com/favicon.svg

- **Image:** ghcr.io/hexatare/posthog-railway-template/worker:latest

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

- **Image:** ghcr.io/hexatare/posthog-railway-template/db:latest

### Kafka https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/kafka

### Livestream https://posthog.com/favicon.svg

- **Image:** ghcr.io/hexatare/posthog-railway-template/livestream:latest
- **Public domain:** Yes

### Redis https://devicons.railway.com/i/redis.svg

- **Image:** ghcr.io/hexatare/posthog-railway-template/redis7:latest

### Capture https://devicons.railway.app/

- **Image:** ghcr.io/hexatare/posthog-railway-template/capture:latest

## Documentation

<p align="center">
  <img alt="posthoglogo" src="https://user-images.githubusercontent.com/65415371/205059737-c8a4f836-4889-4654-902e-f302b187b6a0.png">
</p>

# Deploy and Host PostHog on Railway

PostHog is an open-source analytics platform built for product teams that want full control over their data. It provides powerful tools for product analytics, session recording, feature flags, A/B testing, and event pipelines—without needing to send your data to third-party SaaS tools.

## About Hosting PostHog

Hosting PostHog yourself means owning your data, reducing vendor lock-in, and avoiding usage-based pricing surprises. Traditionally, setting up PostHog involves running a complex install script, configuring multiple services manually, and managing infrastructure updates.

This template simplifies the entire process by provisioning everything needed to run PostHog on Railway, with just a few clicks. It’s containerized, portable, and production-ready—making it a seamless way to self-host with minimal DevOps overhead.

## Common Use Cases

- Product analytics with full data ownership  
- Privacy-focused event tracking for compliance-conscious teams  
- Customizable analytics infrastructure for startups and enterprises  

## Dependencies for PostHog Hosting

- PostgreSQL  
- Redis (v6 and v7)  
- Kafka &amp; ZooKeeper  
- ClickHouse  
- MinIO  
- Temporal  
- PostHog Worker &amp; Dashboard  
- Plugins &amp; Feature Flags  
- Session Replay &amp; Capture services  

### Deployment Dependencies

Everything is included and pre-configured in this Railway template — no manual setup required.

## Why Deploy PostHog 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 PostHog 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

- [Betterlytics](https://railway.com/deploy/betterlytics) — Betterlytics is a cookieless analytics platform GDPR-compliant.
- [Finance Tracker](https://railway.com/deploy/finance-tracker-1) — Private multi-user household finance ledger with budgets and CSV import.
- [Matomo Analytics + MariaDB](https://railway.com/deploy/matomo-analytics-mariadb) — Privacy-friendly analytics with MariaDB and persistent volumes.

Open this page in a browser: https://railway.com/deploy/posthog-1
