Open the server Apps tab
Select your VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.


Product analytics with session recordings and feature flags
Add your server credentials to Server Compass
Choose from our template library
Fill in settings and click Deploy
Use the PostHog template in Server Compass to deploy the official self-hosted hobby stack with PostgreSQL, Redis, ClickHouse, Redpanda, Temporal, object storage, and PostHog services on your VPS, then verify the web UI in a browser.
Select your VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Use the template picker search to find PostHog in the Server Compass template catalog.

Choose the PostHog template. Server Compass fills the host port, public domain, generated secrets, official image settings, and proxy values used by the generated hobby stack.

Confirm the app name and compose services. In this run, the app was named posthog-demo and used host port 4800.

Review the generated environment values, confirm the port is available, and click Deploy Now.

Keep the deployment modal open while Server Compass uploads the compose file, prepares the official PostHog hobby files, pulls the service images, starts the containers, and verifies the stack.

After deployment finishes, return to the Apps tab and confirm the PostHog app is marked Running with its application URL available.

Open the application URL in a browser. The PostHog preflight web UI confirms the site is reachable and core services are responding.

The PostHog preflight web UI loaded successfully in Chromium at http://167.233.138.53:4800/.
It deploys the official PostHog hobby stack, including PostHog web/worker services, PostgreSQL, Redis, ClickHouse, Redpanda, Temporal, object storage, Browserless, and supporting ingestion services.
The tutorial used host port 4800, which maps to the PostHog Caddy proxy on container port 80.
The tutorial verifies a clean first-run deployment because real analytics events, users, projects, and access settings depend on your production server.
No. The deployment guide should live on the PostHog template detail page and be linked from the reusable template deployment docs page.
For terminal enthusiasts: deploy PostHog manually with these simple steps.
Begin by establishing a secure connection to your server through the terminal.
# Access your VPS
ssh root@YOUR_SERVER_IP
# With SSH key authentication
ssh -i ~/.ssh/your-private-key root@YOUR_SERVER_IPFirst time? Ensure Docker is installed first: curl -fsSL https://get.docker.com | sh
Create a dedicated folder for your application files.
# Create and navigate to project directory
mkdir -p ~/apps/posthog
cd ~/apps/posthogCreate the following docker-compose.yml in your project directory:
services:
posthog:
image: posthog/posthog:latest
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgres://posthog:<your-db-password>@db:5432/posthog
- REDIS_URL=redis://redis:6379
- SECRET_KEY=<your-secret-key>
- SITE_URL=<your-site-url>
restart: unless-stopped
depends_on:
- db
- redis
- clickhouse
db:
image: postgres:16-alpine
environment:
- POSTGRES_USER=posthog
- POSTGRES_PASSWORD=<your-db-password>
- POSTGRES_DB=posthog
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7-alpine
restart: unless-stopped
clickhouse:
image: clickhouse/clickhouse-server:latest
volumes:
- clickhouse_data:/var/lib/clickhouse
restart: unless-stopped
volumes:
postgres_data:
clickhouse_data:
PORTHost port(default: 8000)SITE_URLSite URLSECRET_KEYSecret keyDB_PASSWORDDB passwordRun Docker Compose to launch your application.
# Launch the stack
docker compose up -d
# Verify container status
docker compose ps
# Follow the logs
docker compose logs --followConfigure UFW to allow traffic to your application.
# Allow the application port through firewall
sudo ufw allow 8000/tcp
sudo ufw reload
# Access your app at:
# http://your-server-ip:8000Deploy PostHog without touching the command line. Server Compass gives you a clean UI for one-click deployments.
After deploying PostHog with Server Compass, complete these steps to finish setup
Create admin account
Create project
Install tracking snippet
Need help? Check out our documentation for detailed guides.
Common questions about self-hosting PostHog
Simply download Server Compass, connect to your VPS, and select PostHog from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.
PostHog requires a minimum of 2048MB RAM. We recommend a VPS with at least 4096MB RAM for optimal performance. Any modern Linux server with Docker support will work.
Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard PostHog backup and restore procedures.
Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest PostHog image will be pulled and deployed with zero downtime.
PostHog is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.
Download Server Compass and deploy PostHog to your VPS in under 3 minutes. No Docker expertise required.
Download Server Compass