---
title: Upgrade guide
icon: "arrow-up-right-dots"
---

## General guidelines

**Always make sure to back up your database before starting the upgrade process** by running `docker exec -it {db_container_name_or_id} pg_dumpall -U {postgres_user} > databases_backup.sql`.

To restore backup, run `cat databases_backup.sql | docker exec -i {db_container_name_or_id} psql -U {postgres_user}`.

If you used Docker Compose, follow these steps:

1. In a terminal, on the host where Twenty is running, turn off Twenty: `docker compose down`

2. Upgrade the version by changing the `TAG` value in the .env file near your docker-compose. ( We recommend consuming `major.minor` version such as `v0.53` )

3. Bring Twenty back online with `docker compose up -d`

**Make sure that after each upgraded version you have non-corrupted backup.**

## Version-specific upgrade steps

## After v1.21

We know support sequential upgrades. You don't need to go through each version one by one.

## Before v1.21

Make sure to go through every major tagged version when upgrading (upgrade v1.6.x to v.7.y, then v.7.y to v.8.z, etc.).
