SH SelfHostAlt
Sponsored Self-host any open-source app on Hostinger KVM VPS from $4.99/mo (1-Click Docker) →
PostHog logo

PostHog

MIT ★ 41,216 Stars Active · 2026-11-28

Product analytics, session recording, feature flagging and a/b testing that you can self-host (alternative to Mixpanel, Amplitude, Heap). ).

Category
Analytics
Tech Stack / Runtime
Python
Open-Source License
MIT
GitHub Health
★ 41,216 · 3,746 forks
#analytics#python#react#javascript#typescript
Official docker-compose.yml (Hobby Self-Hosted)

Quick Docker Compose Reference for PostHog

# PostHog Self-Hosted Hobby Quickstart (Recommended: 4 vCPU, 8 GB RAM+ VPS)
# Official 1-line installer: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby)"
services:
  web:
    image: posthog/posthog:latest
    restart: unless-stopped
    ports:
      - "8000:8000"
    environment:
      DATABASE_URL: postgres://posthog:posthog@db:5432/posthog
      REDIS_URL: redis://redis:6379/
      CLICKHOUSE_HOST: clickhouse
      SITE_URL: https://analytics.example.com
    depends_on:
      - db
      - redis
      - clickhouse
  db:
    image: postgres:15-alpine
    restart: unless-stopped
    environment:
      POSTGRES_DB: posthog
      POSTGRES_USER: posthog
      POSTGRES_PASSWORD: posthog
    volumes:
      - postgres-data:/var/lib/postgresql/data
  redis:
    image: redis:7-alpine
    restart: unless-stopped
  clickhouse:
    image: clickhouse/clickhouse-server:24.3
    restart: unless-stopped
    volumes:
      - clickhouse-data:/var/lib/clickhouse
volumes:
  postgres-data:
  clickhouse-data:

PostHog System Requirements & Self-Hosting Guide

Deploy PostHog (1 – 2 GB RAM) →

Recommended VPS

1 – 2 GB RAM

1 – 2 vCPU · $4 – $6/mo VPS

Deployment Method

Intermediate

Native Linux Binary / Systemd Service

Commercial Use (MIT)

Yes — free for personal, internal company, and commercial use with attribution.

Maintenance Status

Active

Last commit: 2026-11-28

Frequently Asked Questions about PostHog

Is PostHog free to self-host for commercial use?

PostHog is released under the MIT license. Yes — free for personal, internal company, and commercial use with attribution. It has 41,216 GitHub stars and was last updated on 2026-11-28.

What VPS specifications do I need to self-host PostHog?

Based on its Python runtime and Analytics workload, we recommend at least 1 – 2 GB RAM and 1 – 2 vCPU (typically $4 – $6/mo VPS).

Does PostHog support Docker deployment?

PostHog is primarily deployed as a Native Linux Binary / Systemd Service. Check the official repository for installation scripts or community Docker images.

More Open-Source Analytics

View all →
★ 75.7k

Modern data exploration and visualization platform. .

Replaces: Tableau Power BI Looker
Apache-2.0 Python
Details →
★ 50.6k Docker

Easy way for everyone in your company to ask questions and learn from data. .

Replaces: Tableau Power BI Looker
AGPL-3.0 Java/Docker
Details →
★ 42.6k Docker

Schedule posts, track the performance of your content, and manage all your social media accounts in one place (alternative to Buffer, Hootsuite, Sprout Social). ).

Replaces: Buffer Hootsuite
AGPL-3.0 Docker
Details →
★ 40.5k Docker

Simple, fast, privacy-focused (alternative to Google Analytics). , Source Code).

Replaces: Mixpanel
MIT Nodejs/Docker
Details →
★ 33.7k

Visualizer for neural network and machine learning models. .

MIT Python/Nodejs
Details →