---
title: "Deploy PostHog Caddy Reverse Proxy"
description: "A Caddy reverse proxy for PostHog"
category: "Analytics"
url: https://railway.com/deploy/posthog-caddy-reverse-proxy
---

# Deploy PostHog Caddy Reverse Proxy

A Caddy reverse proxy for PostHog

**[Deploy PostHog Caddy Reverse Proxy on Railway](https://railway.com/template/posthog-caddy-reverse-proxy)**

- **Creator:** jayhale.dev
- **Category:** Analytics
- **Total deploys:** 2

## Template content

### posthog-reverse-proxy

- **Source:** jayhale/railway-posthog-caddy-reverse-proxy
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host a PostHog reverse proxy on Railway

PostHog works best with a [reverse proxy](https://posthog.com/docs/advanced/proxy/caddy).
This template gives you a fully-configured Caddy proxy for PostHog in 10 seconds or less (probably).

## About Hosting posthog-caddy-reverse-proxy

For US PostHog users, the only configuration needed is to [set an appropriate public domain](https://docs.railway.com/reference/public-domains) for the proxy.

For EU users, you will also need to update the PostHog hosts that will receive your proxied traffic.
I.e., update your app variables to match:
```
POSTHOG_API_HOST=eu.i.posthog.com
POSTHOG_ASSETS_HOST=eu-assets.i.posthog.com
```

## Common Use Cases

- Proxying analytics for your personal blog
- Proxying analytics for your side hustle
- Proxying analytics for your seed-stage startup
- Proxying analytics for your tech unicorn
- Proxying analytics for your Fortune500 conglomerate

## Dependencies for this template

The proxy is configured with the [Caddy official Docker image](https://hub.docker.com/_/caddy/).

### Deployment Dependencies

Just a [PostHog](https://posthog.com) account.

## Why Deploy your PostHog reverse proxy 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 a PostHog reverse proxy 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

- [Matomo Analytics + MariaDB](https://railway.com/deploy/matomo-analytics-mariadb) — Privacy-friendly analytics with MariaDB and persistent volumes.
- [Bugsink](https://railway.com/deploy/bugsink) — Self-hosted Error Tracking. Sentry-SDK compatible
- [SubTrackr](https://railway.com/deploy/bscottsubtrackr) — Self-hosted Subscription Tracker

Open this page in a browser: https://railway.com/deploy/posthog-caddy-reverse-proxy
