Skip to content
Home / Migrations / PostHog self-hostedPostHog Cloud

PostHog self-hosted PostHog Cloud

easy

PostHog Cloud includes 1M free events/mo. Self-hosted was operationally burdensome for small teams. Migration preserves all your events.

Estimated: 1-2h · 5 steps
Progress0%
Step 1: Create PostHog Cloud account

Sign up at app.posthog.com. Get your new project API key.

Step 2: Export historical data

Use the PostHog export API or download events as CSV/JSON from your self-hosted instance.

Step 3: Import data

Use PostHog's historical migration endpoint to batch-import events.

curl -X POST 'https://app.posthog.com/capture/' -d '{"api_key": "...", "historical_migration": true, "batch": [...]}
Step 4: Update SDK key

Replace your self-hosted URL and key with PostHog Cloud endpoint.

posthog.init('phc_XXXXX', { api_host: 'https://app.posthog.com' })
Step 5: Shut down self-hosted

Once data verified, stop your self-hosted instance and reclaim server costs.

Events appearing in PostHog Cloud dashboard, all feature flags working
Get started with PostHog Cloud

What this migration involves

Moving from PostHog self-hosted to PostHog Cloud is rated easy and takes about 1-2h on a typical project. The guide breaks it into 5 steps, 2 of which ship with runnable commands and 1 with a verification check.

FAQ

How long does migrating from PostHog self-hosted to PostHog Cloud take?

Around 1-2h for a typical project — 5 steps, difficulty rated easy, 2 of them with copy-paste commands.

Is moving from PostHog self-hosted to PostHog Cloud reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your PostHog self-hosted data before you start.

What does PostHog Cloud cost compared to PostHog self-hosted?

Pricing for both tools is contact-based or not tracked yet.