How PostHog Built a $1.4B Business on Open Source

Indie Hacker Newsgo watch the original →

PostHog commoditized product analytics by open-sourcing 98% of its codebase, effectively locking in users while monetizing the operational complexity of scaling ClickHouse and Kafka for enterprise customers.

The Open Source Strategy

PostHog achieved a $1.4 billion valuation by open-sourcing the vast majority of its platform, keeping only 916 files behind a paid license out of 48,707 total files. The company provides a fully functional self-hosted version that replaces multiple vendors, including Mixpanel for analytics, Hotjar for session recording, and LaunchDarkly for feature flags. By offering a single-command deployment via Docker Compose, they allow users to run the entire stack—including ClickHouse, Kafka, Postgres, and Redis—on a single machine.

The Operational Moat

The core of PostHog's business model is not the code itself, but the operational difficulty of scaling the event pipeline. While the open-source version is functional for hobbyists, the company explicitly warns that it lacks commercial support, data-loss recovery, and the ability to scale beyond a few hundred thousand events without significant engineering effort. By keeping the proprietary code focused on enterprise-grade features like dashboard subscriptions and group analytics, they ensure that high-volume customers eventually migrate to their managed cloud service to avoid the burden of maintaining the infrastructure.

Platform Architecture

The platform functions as a unified event stream that powers multiple modules:

  • Analytics: Auto-captures clicks and page views, enabling retroactive event analysis.
  • Session Replay: Records user sessions across web and mobile platforms.
  • Feature Flags & Experiments: Allows cohort-based rollouts and A/B testing directly tied to event data.
  • Data Pipeline: Includes a warehouse layer to sync data from Stripe and HubSpot, alongside error tracking and LLM observability tools.
  • Self-Driving Mode: An AI-driven feature that analyzes errors and rage clicks to automatically generate pull requests for the user.
  • #dev-tooling
  • #ai
  • #open-source

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.