PostHog

PostHog

Tracking what people do inside an app, event by event

PostHog is open source product analytics. Rather than counting visits to a website, it records what people do inside an application, one event at a time. Around that core, the repository ships a web analytics dashboard modeled on Google Analytics, session replay, feature flags, A/B experiments, error tracking, surveys and LLM observability. The README's headline calls it "the open source platform for building self-driving products", meaning a mode that turns errors, rage clicks and failed queries into researched reports and pull requests for someone to review and merge. PostHog runs as a cloud service in a US or an EU region, or self-hosted with Docker Compose on your own server.

The comparison of self-hosted web analytics tools separates PostHog's product analytics from the audience measurement the other compared tools provide.

Autocapture, SQL queries and a fully MIT mirror

  • Autocapture or manual events: events are collected without tracking code or instrumented one by one, then explored in charts or straight in SQL
  • Flags and experiments next to the data: roll a feature out to a cohort, then measure its statistical impact on your goal metrics
  • Joined-up data: logs and data synced from Stripe or HubSpot can be queried alongside product events
  • LLM observability: traces, generations, latency and cost for an LLM-powered app
  • A fully free mirror: the posthog-foss repository is synced automatically from the main one, has all proprietary code removed, and is MIT-licensed

Hobbyist self-hosting, around 100k events a month

Self-hosting is built for hobbyists, a group PostHog leaves out of its target customers. The docs describe the open source deployment as "made for hobbyists or hosting PostHog in weird and wonderful ways (like in your basement)". The company's public handbook defines its target customers as ambitious software teams, then adds: "Not hobbyists or cost-conscious bootstrappers, basically."

PostHog sets the volume ceiling itself. According to the README, open source deployments "should scale to approximately 100k events per month", and past that point the company recommends migrating to its cloud. Everything runs on a single machine, which the docs say is "unlikely to scale past a couple 100ks events without significant effort in scaling". The cloud is free for the first million events each month.

The hobby stack runs more than thirty services. docker-compose.hobby.yml starts PostgreSQL, ClickHouse, Redis, Kafka (through Redpanda), Temporal and Elasticsearch, plus PostHog's own services. The README recommends 4 GB of memory, while the self-hosting docs ask for the equivalent of a Hetzner VM with 4 vCPUs, 16 GB of RAM and more than 30 GB of storage. PostHog announced the end of its Kubernetes deployment in February 2023. If the goal is website analytics, Rybbit does session replay with six containers and its docs suggest a VPS with at least 2 GB of RAM, and Open Web Analytics produces click heatmaps and session recordings on PHP and MySQL.

Paid features stay in the cloud. A self-hosted instance has no group analytics, correlation analysis, data pipelines, SAML, RBAC or audit logs, and it caps alerts at two. Code in the ee/ directory is under a proprietary license that requires a PostHog Enterprise subscription for production use.

Self-hosted instances get neither versions nor support. PostHog does not tag releases or publish CVEs: every change, security fixes included, ships continuously from master to the cloud and to the latest Docker image, which the company recommends running. The team does not answer tickets from self-hosted users and cannot help recover lost data.