:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
# Development-mode runtime defaults (committed to repo).
# Sourced by bin/start for host-side processes. Loaded into the sandbox
# container via docker-compose env_file. Override in .env.local (gitignored).
#
# Service connection defaults (DATABASE_URL, REDIS_URL, KAFKA_HOSTS,
# CLICKHOUSE_HOST, OBJECT_STORAGE_ENDPOINT, etc.) live in .env.services
# — shared with hobby deployments via docker-compose env_file.
# Core
DEBUG=1
ALLOW_DEV_LOGIN=1
# shows the seeded dev personal API key's full value in Settings > Personal API keys
ALLOW_DEV_API_KEY_REVEAL=1
SKIP_SERVICE_VERSION_REQUIREMENTS=1
# Object storage (host-side only — container endpoint is in .env.services)
# Browser-reachable host for presigned URLs (objectstorage:19000 only resolves inside Docker).
OBJECT_STORAGE_PUBLIC_ENDPOINT=http://localhost:19000
SESSION_RECORDING_V2_S3_ENDPOINT=http://localhost:8333
# Redis host overrides (subsystems that don't read REDIS_URL)
CDP_REDIS_HOST=redis7
SESSION_RECORDING_API_REDIS_HOST=redis7
COOKIELESS_REDIS_HOST=redis7
# Temporal
TEMPORAL_HOST=temporal
# Services
BILLING_SERVICE_URL=https://billing.dev.posthog.dev
API_QUERIES_PER_TEAM={"1": 100}
# Internal request token for Python <-> Rust service communication
INTERNAL_REQUEST_TOKEN=dev-internal-token
# Node.js ingestion consumer reaches Cymbal (Rust) on the host via lvh.me (cross-platform)
ERROR_TRACKING_CYMBAL_BASE_URL=http://lvh.me:3302
# Duckgres host port
DUCKGRES_PORT=15432
# Ingestion also writes $feature_flag_called events to the flag_evaluations table, for every team.
# The write happens only when all three are set. Without it, a team on a flag_evaluations
# mode shows no data in the flag Usage tab.
INGESTION_OUTPUT_FLAG_EVALUATIONS_TOPIC=clickhouse_flag_evaluations
INGESTION_FLAG_EVALUATIONS_MODE=dual_write
INGESTION_FLAG_EVALUATIONS_TEAMS=*
# Dagster
DAGSTER_UI_HOST=localhost
DAGSTER_UI_PORT=3030
DAGSTER_WEB_PREAGGREGATED_MAX_PARTITIONS_PER_RUN=3000
# OpenTelemetry
OTEL_SERVICE_NAME=posthog-local-dev
OTEL_PYTHON_LOG_LEVEL=debug
# Collector's OTLP gRPC port is mapped to host
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_TRACES_EXPORTER=otlp
# Explicitly disable if not used
OTEL_METRICS_EXPORTER=none
OTEL_LOGS_EXPORTER=none
OTEL_PYTHON_DJANGO_INSTRUMENT=true
OTEL_PYTHON_DJANGO_MIDDLEWARE_POSITION=1
# DuckLake
DUCKLAKE_RDS_HOST=localhost
DUCKLAKE_RDS_PORT=5432
DUCKLAKE_RDS_DATABASE=ducklake
DUCKLAKE_RDS_USERNAME=posthog
DUCKLAKE_RDS_PASSWORD=posthog
DUCKLAKE_BUCKET=ducklake-dev
DUCKLAKE_BUCKET_REGION=us-east-1
DUCKLAKE_S3_ACCESS_KEY=object_storage_root_user
DUCKLAKE_S3_SECRET_KEY=object_storage_root_password
# Allow DuckLake catalog reset on version mismatch (dev convenience)
POSTHOG_ALLOW_DUCKLAKE_CATALOG_RESET=1
# Postgres schema fast-path restore mode for `hogli` (auto|off|...)
POSTHOG_SCHEMA_RESTORE_IN_DEV=auto
# personhog (Rust person/group service)
PERSONHOG_ADDR=127.0.0.1:50052
# Node CDP/error-tracking servers require this to be true (separate from the removed Django gate).
PERSONHOG_ENABLED=true
# Debug
PYDEVD_DISABLE_FILE_VALIDATION=1
# Setup wizard cloud runs — local-only OAuth app client_id, created by bin/ensure-local-setup on
# `hogli start`. Same ID as POSTHOG_DEV_CLIENT_ID in @posthog/wizard.
WIZARD_CLOUD_RUN_OAUTH_CLIENT_ID=DC5uRLVbGI02YQ82grxgnK6Qn12SXWpCqdPb60oZ