PostHog/posthog
DevOps & Self-hostingSelf-hostable product analytics platform combining analytics, session replay, feature flags, experiments, error tracking, and a data warehouse.
What PostHog Is
PostHog is a product analytics and observability platform that ingests events, errors, session replays, logs, and business data into one store, then lets teams and AI agents query and act on it. Its products cover product analytics, web analytics, session replay, error tracking, logs, tracing, feature flags, experiments, surveys, and a managed data warehouse with 120+ sources. For LLM-backed apps, AI observability captures traces, generations, latency, and cost. The target audience is product, engineering, and growth teams that want one shared context layer instead of several separate tools.
The repository is the main PostHog monorepo (Python backend, TypeScript/React frontend) and is available under the MIT license; the ee directory carries a separate license, and a fully FOSS variant exists as posthog-foss licensing details.
Getting Started
For most users, the recommended path is the hosted service: sign up for PostHog Cloud US or the EU region, then connect the project and start sending events. The monthly free tier covers 1 million events, 5k recordings, 1M flag requests, 100k exceptions, 10GB of logs, and 1500 survey responses.
After creating an instance, the setup wizard installs and configures the SDK in your app:
npx -y @posthog/wizard@latest
Alternatively, add the JavaScript snippet or one of the SDKs for JavaScript, React, Next.js, Vue, React Native, Android, iOS, Flutter, Python, Node, PHP, or Ruby. Installation guides for each are linked from the getting-started docs.
To use PostHog from an AI agent or editor, the remote MCP server is https://mcp.posthog.com/mcp; the documented install command is:
npx @posthog/wizard mcp add
It routes to the correct US or EU data region after login and works with Claude Code, Cursor, Codex, VS Code, Zed, and PostHog Desktop; setup guides per client are in the MCP documentation.
Self-Hosting
A hobby instance can be deployed on Linux with Docker (4GB memory recommended):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby)"
Open-source deployments are intended to scale to roughly 100k events per month; beyond that the docs recommend migrating to PostHog Cloud. The maintainers state that no customer support or guarantees are provided for self-hosted open-source deployments, so self-hosting should be treated as an advanced, best-effort option rather than the default self-hosting notes.
Constraints and Considerations
- Self-hosted scale is limited to about 100k events/month; larger volumes require the cloud offering.
- Cloud usage beyond the free tier is billed by consumption; pricing is published on the pricing page.
- The hosted service is region-split (US and EU), and the MCP server resolves the region from the user's login.
- The repository is a monorepo, so contributing or building it locally requires following the local development guide.
HotRepo's take
PostHog has appeared repeatedly in HotRepo's daily snapshots: through 16–24 July 2026 it moved from 35,682 to 37,077 stars, gaining several hundred stars on most days in that window, and by the 19 November 2026 Python weekly list it held 40,953 stars with a best position of 13. Those numbers describe steady ongoing adoption rather than a single breakout day, consistent with a platform that keeps adding adjacent products. Community discussion has also focused on the team's engineering practices—the .cursorrules thread drew attention to how PostHog writes agent instructions discussion, and a separate thread observed multiple bots reviewing a PostHog PR discussion. At this scale the main practical decision for adopters is cloud versus self-hosted scope, not whether the project is maintained.
Written by AI from the project's README, updated . The project's own docs are the source of truth.
Hacker News
You might also like
- umami-software/umamiSelf-hosted web and product analytics that avoids cookies and third-party surveillance.
- Unleash/unleashOpen-source feature flag server that lets teams release, target, and kill features without redeploying, for developers and platform teams.
- yaojingang/GEOInflowSelf-hosted analytics that combines site visitors, AI search referrals and server crawl logs so teams can see which AI crawlers reach which pages.