---
title: "3.1: Upgrade guide"
description: "Version-specific changes and preserved upgrade instructions."
icon: "arrow-up-right-dots"
---

<Note>
  Historical upgrade notes. Check the [maintenance policy](/self-hosting/advanced/release-maintenance-policy)
  for support status. These instructions describe this release, not the current installation defaults.
</Note>

Read the notes for every version you cross. Use the [upgrade checklist](/self-hosting/advanced/upgrade)
to plan backups, service interruption and recovery. Old commands using `latest` or `stable` must be
resolved to the historical target release before use; they must not jump to today's release.

Before the Docker commands below, edit the `formbricks` service's `image` in your existing
`docker-compose.yml`. Replace `latest` with your exact published **3.1.x** tag, for example
`ghcr.io/formbricks/formbricks:v3.1.0` for the initial release. These historical GHCR tags include `v`. Confirm the selected tag with
`docker compose config --images` before running `pull` or `up`; keep your existing volumes and settings.

<Info>
  With Formbricks 3.0, we introduced an automatic data migration system. If you're using a version older than
  **v2.7**, you must upgrade step-by-step through earlier versions (e.g. **2.4 → 2.5 → 2.6 → 2.7**). Once you
  reach **v2.7**, you can upgrade directly to **any v3.x or future release** without needing intermediate
  migrations.
</Info>

### Steps to migrate

This guide is for users who are **self-hosting Formbricks** using the **one-click setup**. If you have a different setup, you may need to adjust the commands accordingly.

Before running these steps, **navigate to the `formbricks` directory** where your `docker-compose.yml` file is located.

1. **Backup your Database**: Backing up your database is crucial before upgrading. Use the following command to create a backup:

```bash
docker exec formbricks-postgres-1 pg_dump -Fc -U postgres -d formbricks > formbricks_pre_v3.1_$(date +%Y%m%d_%H%M%S).dump
```

<Info>
  If you run into “**No such container**”, use `docker ps` to find your container name,
  e.g. `formbricks_postgres_1`.
</Info>

If you prefer storing the backup as an `*.sql` file remove the `-Fc` (custom format) option. In case of a restore scenario you will need to use `psql` then with an empty `formbricks` database.

1. Pull the selected version of Formbricks:

```bash
docker compose pull
```

1. Stop the running Formbricks instance & remove the related containers:

```bash
docker compose down
```

1. Restarting the containers with the selected version of Formbricks:

```bash
docker compose up -d
```

When you start the latest version of **Formbricks**, it will **automatically detect and apply any required data migrations** during startup. You don’t need to run any manual migration steps or download separate migration images.

- Access your updated instance

Once the containers are running, simply go to the **same URL** as before to access your updated **Formbricks** instance.

That’s it! This new process ensures your **Formbricks** setup stays up to date with the latest schema changes as soon as you run the updated container.
