PostHog logo

PostHog

✓ Verified FOSSMIT
Top open-source alternative to Mixpanel / Amplitude

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

Tech StackPython, React, ClickHouse, PostgreSQL
Self-Host DifficultyMedium
License ModelMIT
GitHub RepositoryPostHog/posthog

Recommended VPS & Hardware Sizing

Estimated Hosting: $10 - $15/mo (e.g. Hetzner CPX21 or Linode)
Min RAM:2 GB
Rec RAM:4 GB
Compute:2 vCPU
Disk Space:25 GB SSD

PostHog vs Mixpanel / Amplitude Comparison Matrix

Evaluation CriteriaPostHog (Open Source)Mixpanel / Amplitude (Proprietary)
Event Volume CostsFixed hardware costs onlyExponential bill growth as DAU scales
User Privacy / GDPRData never leaves your serversThird-party US tracking processors
Feature BreadthAnalytics + Replay + Flags in one appSeparate subscriptions for Mixpanel + Hotjar
INTERACTIVE TCO MODELEstimated Rate: $410/user/mo

Financial Impact: Migrating from Mixpanel / Amplitude to Self-Hosted PostHog

Detailed Stack Calculator →
5 Users (Early Startup)50 Users (Scaleup)200 Users (Enterprise Org)
Mixpanel / Amplitude (Cloud SaaS)Per-Seat Tax
$123,000per year ($10,250/mo)
3-Year Spend:$369,000

* Excludes enterprise SSO add-ons & usage overages

PostHog (Self-Hosted)Zero Per-Seat Fee
$120per year ($10/mo Linux VPS)
3-Year Compute:$360

* Commodity Hetzner / DigitalOcean compute instance

Cumulative 3-Year ROI+$368,640Net savings across 36 months (100% reduction)
Annual Free Cash:+$122,880/yr
Need C-Level Buy-In? Generate an instant ROI proposal memo to present to your CTO or CFO.

Core Capabilities & Features

✓Product Analytics & Event Funnels
✓Session Replay & Heatmaps
✓Feature Flags & A/B Testing
✓Self-Hosted ClickHouse Speed

Self-Host PostHog with Docker Compose

Tweak configuration ports, secrets, and volumes live. Download or copy your ready-to-run container file:

1-Click Docker Compose Generator

Generate production-ready container definitions with customizable ports and volumes.

PostHogMIT

The open source Product Operating System with event funnels & session replays

Difficulty: Medium40,244 ⭐
Configure Parameters
docker-compose.posthog.yml
version: '3.8'

services:
  posthog:
    image: posthog/posthog:latest
    restart: unless-stopped
    ports:
      - "${POSTHOG_PORT:-8000}:8000"
    environment:
      - SITE_URL=http://localhost:${POSTHOG_PORT:-8000}
      - SECRET_KEY=${SECRET_KEY:-posthog_secret_change_me_2026}
    volumes:
      - posthog_data:/var/lib/posthog

volumes:
  posthog_data:

Frequently Asked Questions: Self-Hosting PostHog

How do I self-host PostHog using Docker Compose?

You can deploy PostHog (PostHog/posthog) on any Linux server by copying the docker-compose.yml template on this page, configuring your desired host port and persistent volume directory, and running 'docker compose up -d'.

How does PostHog compare to Mixpanel / Amplitude?

PostHog is an open-source, self-hosted alternative to Mixpanel / Amplitude built with Python, React, ClickHouse, PostgreSQL. Unlike Mixpanel / Amplitude ($20 - $800+ / month (Volume-tiered based on MTU)), PostHog has zero per-user licensing fees and keeps 100% of your data on your own infrastructure.

What are the minimum VPS RAM and CPU requirements for PostHog?

For production self-hosting (Medium difficulty tier), we recommend at least 4 GB RAM (minimum 2 GB), 2 vCPU, and 25 GB SSD storage, which typically costs $10 - $15/mo (e.g. Hetzner CPX21 or Linode).

Is PostHog free for commercial business use under the MIT license?

Yes. Distributed under the MIT license, PostHog can be self-hosted internally by businesses and engineering teams of any size without per-seat royalties.

README INTEGRATION // REPO EMBED

Embed Official PostHog Badge in GitHub README

Served locally from OSSMatrix with Cloudflare global edge caching. Real-time verified alternative status, zero third-party dependencies, sub-5ms load time.

Live Preview:PostHog Badge
Markdown Embed (GitHub / GitLab)
[![OSSMatrix Alternative](https://ossmatrix.com/api/badge/posthog)](https://ossmatrix.com/project/posthog)
HTML Embed (Docs / Landing Pages)
<a href="https://ossmatrix.com/project/posthog" target="_blank" rel="noopener noreferrer"><img src="https://ossmatrix.com/api/badge/posthog" alt="PostHog on OSSMatrix" /></a>
SIMILAR REPOSITORIES // PEER COMPARISON

Compare PostHog with Other Self-Hosted Alternatives

All Mixpanel / Amplitude Alternatives →