Linux

Where Does Self-Hosted PostHog Store Data?

PostHog event pipeline volumes and env secret paths on Linux for self-hosted analytics stacks. Covers defaults.

Last updated

PostHog splits state across many containers. Postgres keeps users and dashboards. ClickHouse keeps raw events. Kafka and Redis buffer ingestion between them. Each persists through its own named volume.

Settings come from a .env file with secrets and domain names. The compose file maps volumes with prefixed names. Back up all data volumes with the env file. Event tables without the app database lose project context. Feature flags evaluate from the same store. Session replay needs object storage configured.

Where PostHog stores this, by platform

Linux
posthog_postgres-data (Postgres volume)

User and dashboard database volume. Dump Postgres for portable backups instead of raw copies. Inspect for the host mountpoint.

Linux
posthog_clickhouse-data (events volume)

Raw event tables for analytics queries. Larger than Postgres on busy sites. Back up with the env file and app database.

Frequently asked questions

what do i back up for a PostHog move

Back up the Postgres, ClickHouse, and Kafka volumes with the .env file. Events flow through Kafka into ClickHouse. The env holds secrets. All pieces restore analytics.

where are PostHog volumes on the host

Run docker volume ls to list posthog volumes, then inspect for mountpoints. Names gain a compose prefix like posthog_postgres-data. The .env file holds release and secrets.

Notice an outdated path? Let us know.