Updates and migrations_
Keep your self-hosted Appwrite instance up-to-date. Learn how to perform updates, manage versions, and ensure your self-hosted Appwrite stays current.
4 min read
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 indicate a migration is required. For example, you can upgrade from 1.6.0 to 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 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.5.111.6.21.7.4
1.9 is the exception: 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.9, or the 1.9 migration is skipped. For example, from 1.8.1 to 2.6.1 you should upgrade to:
1.9.51.9.92.6.1
Recent versions share a migration and can skip minor versions. The latest upgrade section 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:
- back up your server data before running the migration
- review the changelog for any breaking changes
- test the migration process on a non-production instance to make sure your application is working well
Upgrading to 2.6.1
Appwrite 2.6.1 upgrades from 1.9.6 or any later version. Run the upgrade command with the 2.6.1 tag, then run the migration.
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.6.1Then run the migration from the appwrite directory.
cd appwrite/docker compose exec appwrite migrateBack up your data first.
Appwrite 2.6.1 is a precautionary maintenance release that moves the runtime to PHP 8.5.12, which fixes CVE-2026-109618 and CVE-2026-109619. Appwrite is not affected by either vulnerability, because it serves requests through Swoole rather than PHP's web SAPIs (mod_php, PHP-FPM, CGI). From 2.6.0, the upgrade only replaces the images and the migration has nothing to change.
From 2.5.x or earlier, the migration also applies the 2.6.0 schema changes: it adds the resource-description and bucket stripMetadata fields and repairs presence-log schema.
The installer supplies the ExifTool service for image metadata stripping. Custom deployments must set _APP_EXIFTOOL_HOST to a reachable ExifTool service before enabling the bucket setting. If the host is empty, the service is unreachable, or stripping returns an error, Appwrite stores the original upload with its metadata intact, even when stripping is enabled. Monitor the ExifTool service before relying on this setting to remove private metadata. Existing files are not rewritten.
For custom S3-compatible endpoints, _APP_STORAGE_S3_PATH_STYLE can force path-style requests (enabled) or bucket-addressing endpoints (disabled); an empty value infers the style. For a custom domain/CNAME pointing directly at a bucket, set it to disabled.
Outbound HTTPS endpoints presenting a compromised certificate chain must replace their certificate chain. TLS verification stays enabled.
If you skip releases, also follow the upgrade notes of each release you skip: 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0.
Upgrading within the 1.9 line
If you are staying on Appwrite 1.9, upgrade to 1.9.9. It is a precautionary maintenance release that moves the runtime to PHP 8.5.12. Appwrite 1.9 is not affected by the PHP vulnerabilities above either. It retains Console 8.7.37 and reuses migration V25, so it introduces no schema changes, and from 1.9.8 the upgrade only replaces the images.
From 1.9.6 or 1.9.7, 1.9.9 also includes the 1.9.8 security fixes: it refreshes outbound TLS trust after the eMudhra certificate compromise and applies the SVG sanitizer fixes.
Back up your database and persistent storage. From the parent directory of your installation, run:
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:1.9.9cd appwrite/docker compose exec appwrite migrateOutbound HTTPS endpoints that still present a compromised certificate chain must replace their certificate chain. See the 1.9.9 and 1.9.8 release notes for details.
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.
parent_directory <= you run the command in this directory└── appwrite └── docker-compose.ymlThe parent directory is where you will find the appwrite directory, inside which there are docker-compose.yml and .env files.
Your Appwrite installation's parent directory name is expected to be appwrite. Changing the directory name will result in mismatched Docker project names.
Replace <APPWRITE_VERSION> below with the specific Appwrite image tag you intend to run (for example, 2.6.1). Avoid using latest in production.
Unix
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
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
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.
docker ps | grep appwrite/appwriteVerify 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.
cd appwrite/docker compose exec appwrite migrateThe 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!
Was this page helpful?
Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.