PostHog Hosting on Your Own VPS
Product analytics and session recording with event data that never leaves your server.
Size a server for PostHog
Every stop is a real configuration you can deploy. Priced per 30 days, billed by the hour, exclusive of 18% GST.
What PostHog is
PostHog is a product analytics platform: event tracking, funnels, retention, session recording and feature flags. Self-hosting it keeps behavioural data about your users on infrastructure you control, which for some organisations is the difference between being able to use analytics at all and not.
It is the heaviest application in this category, and it is important to be honest about why. PostHog stores events in ClickHouse, with PostgreSQL for application data, Kafka for ingestion and Redis for caching. That is four data systems, and ClickHouse in particular is memory-hungry by design — it trades RAM for query speed over large event tables.
PostHog's own guidance has moved toward recommending their cloud for smaller deployments, precisely because the self-hosted footprint is substantial. Self-host it when data residency or contractual requirements make that necessary, and size accordingly rather than hopefully. Session recording in particular consumes storage fast.
Why run PostHog on a VPS
Event data stays on your own machine, in a region you choose.
No per-event pricing — retention is a disk decision.
Root access for ClickHouse tuning, which is where the performance work is.
Storage you can extend as recordings and events accumulate.
PostHog features
Event capture with autocapture or explicit tracking
Funnels, retention and path analysis
Session recording
Feature flags and experiments
SQL access to the event store
SDKs for web, mobile and server
Recommended server
A starting point for PostHog, not a hard floor — size it on the sliders.
| Memory | 16 GB. ClickHouse, Kafka, PostgreSQL and Redis together — this is not a small install |
|---|---|
| CPU | 4 vCPU minimum; 8 for meaningful event volume |
| Storage | 160 GB and upward; session recordings consume storage very quickly |
| Operating system | Ubuntu 22.04 LTS |
How deployment works
PostHog is deployed with ClickHouse, PostgreSQL, Kafka and Redis, behind TLS on your own domain. Size generously — ClickHouse is designed to use memory for query performance, and an undersized instance is slow in a way tuning will not fix. Set retention on events and especially on session recordings before volume becomes a problem.
What people run it for
Analytics under data residency rules
Behavioural data kept in a required jurisdiction.
High event volume
Where per-event cloud pricing outgrows a server.
Sensitive products
Sectors where sending user behaviour to a third party is not permitted.
Feature flagging
Rollouts and experiments alongside the analytics that measure them.
PostHog hosting questions
Related applications
Deploy PostHog on your own server
Root access, your choice of size, and no container between you and the application.