---
layout: article
title: Updates and migrations
description: Keep your self-hosted Appwrite instance up-to-date. Learn how to perform updates, manage versions, and ensure your self-hosted Appwrite stays current.
---

To upgrade your Appwrite server from an older version, you should use the Appwrite migration tool *after you have installed the new version*. The migration tool will adjust your Appwrite data to the new version's structure to make sure your Appwrite data is compatible with any internal changes.

You can upgrade to a newer patch version without running the migration unless the [release notes](https://github.com/appwrite/appwrite/releases) indicate a migration is required. For example, you can upgrade from [`1.6.0`](https://github.com/appwrite/appwrite/releases/tag/1.6.0) to [`1.6.1`](https://github.com/appwrite/appwrite/releases/tag/1.6.1) without running the migrate command, but upgrading from `1.6.0` to `1.6.2` or later will require the migrate command because [`1.6.2`](https://github.com/appwrite/appwrite/releases/tag/1.6.2) requires a migration.

If you're trying to migrate to a newer minor version, you should upgrade to each minor version's latest patch. For example, if you're upgrading from `1.5.1` to `1.7.4` you should upgrade to:

1. `1.5.11`
1. `1.6.2`
1. `1.7.4`

`1.9` is the exception: [`1.9.6`](https://github.com/appwrite/appwrite/releases/tag/1.9.6) added a new migration in a patch release, and each migration only runs its own changes. From `1.8.x` or earlier, upgrade to `1.9.5` and run the migration before moving to `1.9.7`, or the `1.9` migration is skipped. For example, from `1.8.1` to `2.5.0` you should upgrade to:

1. `1.9.5`
1. `1.9.7`
1. `2.5.0`

Recent versions share a migration and can skip minor versions. The [latest upgrade section](#upgrading-to-latest) names the oldest version that upgrades to the current release in one step. From an older version, upgrade to that version first.

Before upgrading, be sure to:

1. [back up your server](/docs/advanced/self-hosting/production/backups) data before running the migration
1. review the [changelog](https://github.com/appwrite/appwrite/releases) for any breaking changes
1. test the migration process on a non-production instance to make sure your application is working well

# Upgrading to 2.5.0

Appwrite 2.5.0 upgrades from `1.9.6` or any later version. Run the upgrade command with the `2.5.0` tag, then run the migration.

```sh
docker run -it --rm \
    --publish 20080:20080 \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="upgrade" \
    appwrite/appwrite:2.5.0
```

Then run the migration from the `appwrite` directory.

```sh
cd appwrite/
docker compose exec appwrite migrate
```

The migration stays on V25. It adds the function `interval` and Android platform `fingerprints` columns and widens the webhook `httpPass` column, and it takes longer the more projects you have. The new compose file moves `openruntimes/executor` to 1.1.2; existing runtime containers are removed when it starts and cold-start on their next execution.

Migrating a project to another install or to Cloud doesn't carry the passkey policy, the password rotation policy or Android signing certificate fingerprints yet, so set them again on the destination. Migrated team memberships get new IDs, so custom membership IDs aren't kept.

If you upgrade with `--use-existing-config`, change the executor image to `openruntimes/executor:1.1.2` yourself. **Back up your data first.**

If you skip releases, also follow the upgrade notes of each release you skip: [`2.0.0`](https://github.com/appwrite/appwrite/releases/tag/2.0.0), [`2.1.0`](https://github.com/appwrite/appwrite/releases/tag/2.1.0), [`2.2.0`](https://github.com/appwrite/appwrite/releases/tag/2.2.0), [`2.3.0`](https://github.com/appwrite/appwrite/releases/tag/2.3.0), [`2.4.0`](https://github.com/appwrite/appwrite/releases/tag/2.4.0).

# Installing the next version

The first step is to install the latest version of Appwrite. Head to the directory where you ran your previous Appwrite install command.

```text
parent_directory <= you run the command in this directory
└── appwrite
    └── docker-compose.yml
```

The parent directory is where you will find the appwrite directory, inside which there are `docker-compose.yml` and `.env` files.

**Parent directory naming**

Your Appwrite installation's parent directory name is expected to be `appwrite`. Changing the directory name will result in mismatched Docker project names.

**Choose an image tag**

Replace `<APPWRITE_VERSION>` below with the specific Appwrite image tag you intend to run (for example, `2.5.0`). Avoid using `latest` in production.

## Unix

```sh
docker run -it --rm \
    --publish 20080:20080 \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="upgrade" \
    appwrite/appwrite:<APPWRITE_VERSION>
```

## CMD

```cmd
docker run -it --rm ^
    --publish 20080:20080 ^
    --volume //var/run/docker.sock:/var/run/docker.sock ^
    --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
    --entrypoint="upgrade" ^
    appwrite/appwrite:<APPWRITE_VERSION>
```

## PowerShell

```powershell
docker run -it --rm `
    --publish 20080:20080 `
    --volume /var/run/docker.sock:/var/run/docker.sock `
    --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
    --entrypoint="upgrade" `
    appwrite/appwrite:<APPWRITE_VERSION>
```

This will pull the `docker-compose.yml` for the selected version/tag and perform the upgrade steps.
Once the setup completes, verify that you have the latest version of Appwrite.

```sh
docker ps | grep appwrite/appwrite
```

Verify that the `STATUS` doesn't have any errors and all the `appwrite/appwrite` containers have the same version.

# Running the migration

We can now start the migration. Navigate to the `appwrite` directory where your `docker-compose.yml` is present and run the following command.

```sh
cd appwrite/
docker compose exec appwrite migrate
```

The data migration can take longer depending on the amount of data your Appwrite instance contains. The Appwrite migration command uses multi-threading to speed up the process, meaning that adding more CPU cores can help speed up the process.

Once the migration process has been completed successfully, you're all set to use the latest version of Appwrite!
