Installation
PostHog offers two deployment options: PostHog Cloud (recommended) and self-hosted. Choose the option that best fits your needs.PostHog Cloud (Recommended)
PostHog Cloud is the fastest and easiest way to get started. We handle all infrastructure, scaling, and updates for you.Benefits
- No infrastructure to manage: We handle servers, scaling, and updates
- Generous free tier: 1 million events per month included
- Always up-to-date: Automatic updates with new features
- 99.9% uptime SLA: For paid plans
- EU and US regions: Choose where your data is stored
Sign Up
Choose the region closest to your users:PostHog Cloud US
Data stored in the United States
PostHog Cloud EU
Data stored in the European Union (Frankfurt)
Getting Started with Cloud
Create your account
Sign up at app.posthog.com/signup (US) or eu.posthog.com/signup (EU)
Self-Hosted
Deploy PostHog on your own infrastructure for complete control over your data.When to Self-Host
Consider self-hosting if you:- Need to keep all data on your own servers
- Require air-gapped deployment
- Have strict compliance requirements
- Want to customize the PostHog codebase
Requirements
Before deploying PostHog, ensure you have: Minimum Requirements:- 4 CPU cores
- 8 GB RAM
- 200 GB storage (grows with usage)
- Docker and Docker Compose installed
- A domain name (for SSL/HTTPS)
- 8+ CPU cores
- 16+ GB RAM
- SSD storage for better performance
- Regular backups configured
- Monitoring and alerting set up
Docker Installation
The recommended way to self-host PostHog is with Docker Compose.Configure environment
Copy the example environment file and update settings:Edit
.env to set:POSTHOG_SECRET: A random secret keyDOMAIN: Your domain namePOSTHOG_DB_PASSWORD: Database password
Start PostHog
Launch all services with Docker Compose:This will start:
- PostgreSQL (data storage)
- ClickHouse (analytics database)
- Redis (caching)
- PostHog application server
- Worker processes
Kubernetes Deployment
For larger deployments, use our Helm chart:Configuration
Key configuration options in your.env file:
Verify Installation
After installation, verify PostHog is working:Access the interface
Open PostHog in your browser:
- Cloud:
https://app.posthog.comorhttps://eu.posthog.com - Self-hosted:
https://yourdomain.com
Next Steps
Install a library
Choose an SDK and integrate PostHog with your application
Quickstart guide
Follow our quickstart to capture your first events
Configure projects
Set up projects, teams, and data ingestion settings
Manage organizations
Manage organization members and access controls
Troubleshooting
Self-Hosted Issues
Services won’t start:- Increase RAM allocation (minimum 8 GB recommended)
- Reduce ClickHouse cache settings in
docker-compose.yml
- Check worker logs:
docker compose logs worker - Verify ClickHouse is running:
docker compose ps clickhouse - Check network connectivity between services
Getting Help
- Documentation: Self-hosting docs
- Community: Slack community
- GitHub: Report issues
- Support: Email [email protected]