Upgrading PostHog

Last updated:

|Edit this page

🌇 Sunset Kubernetes deployments

This page covers our PostHog Kubernetes deployment, which we sunset and no longer support. We will continue to provide security updates for Kubernetes deployments until at least May 31, 2024.

For existing customers
We highly recommend migrating to PostHog Cloud (US or EU). Take a look at this guide for more information on the migration process.
Looking to continue self-hosting?
We still maintain our Open-source Docker Compose deployment. Instructions for deploying can be found here.

We want to make sure upgrading PostHog is as smooth as possible. We use a synchronous and an asynchronous migration framework to make sure database migrations are easy to be deployed, rolled back and safe to run.

Because some data migrations require touching tables that can get very large for some PostHog installation, some migrations are a little more involved.

For more information on any extra steps needed when updating to specific versions, check out our upgrade notes.

If you need help, feel free to join our community Slack for further assistance.

1. Get and update the Helm repo

To upgrade the Helm release posthog in the posthog namespace:

Terminal
helm repo add posthog https://posthog.github.io/charts-clickhouse/
helm repo update

2. Follow the upgrade notes

Terminal
helm list -n posthog
helm search repo posthog

Take note of the numbers of the Helm chart version (in the format posthog-{major}.{minor}.{patch} - for example, posthog-19.15.1) when running the commands above.

Make sure to check the upgrade notes for the new version, along with all the prior versions before moving forward**.

3. Run the upgrade

Terminal
helm upgrade -f values.yaml --timeout 30m --namespace posthog posthog posthog/posthog --atomic --wait --wait-for-jobs --debug

Check the Helm documentation for more info about the helm upgrade command.

Questions?

Was this page useful?

Next article

Upgrade notes

30.0.0 Self-hosted users must run async migrations 0005-0007 before updating to PostHog version 1.42.0. If you haven't run async migrations 0005-0007 yet, or if they aren't available on your current version, we recommend upgrading to PostHog version 1.41.4 first, then running the async migrations, then upgrading to 1.42.0. Note: for async migration 0007 disable the post checks in the advanced options when kicking off the async migration (otherwise you might see them fail and need to re-run the…

Read next article