Upgrade

This page explains how to upgrade FusionAuth to a newer version.

Migrations#

If there were database migrations required, what happens on an upgrade depends on two settings: the runtime mode and the silent mode.

If silent mode is set to true, FusionAuth will automatically migrate your database to the latest schema version.

If silent mode is false and the runtime mode is set to development, Maintenance mode will appear when you access any URL hosted by FusionAuth. Follow the prompts to complete the migrations.

In all other cases the migrations will not be applied, and you'll have to perform them yourself. If you want to manage your own database upgrades, performing the SQL migrations out of band with another tool or process is a good option.

When Are Database Migrations Applied

Runtime ModeSilent ModeMigration Behavior
developmenttrueMigration applied automatically
developmentfalseMaintenance mode UI displayed, user prompted to run migrations
productiontrueMigration applied automatically
productionfalseMigration never applied by FusionAuth, must be applied out of band

See the configuration reference or the silent mode guide for more information. To apply the database migrations out of band see the database upgrade documentation.

Docker latest Tag#

The Docker Compose file references the latest tag, but that tag is not dynamic. It is only the latest at a point in time. To get the most recently released image, you have a couple of options:

  • Pull the latest image with this command: docker pull fusionauth/fusionauth-app:latest or docker compose pull and recreate your deployment with docker compose up -d which will recreate every container where a new image is available.
  • Edit the Docker Compose file to specify a specific version. This is a good idea for a production deployment. Run docker compose pull you can only pull the specified image, or just run docker compose up -d which will pull the image and recreate the container at the same time.
  • Remove all images with docker rmi <IMAGE ID> selected from the list of IMAGE IDs which you can show with docker images. This requires that the image isn't used and therefore may prompt you to remove containers using it. Since FusionAuth stores all state in the database, and for docker you use volumes to persist data, you can safely remove the containers. After that you can use docker compose pull, docker compose build and docker compose up -d accordingly to get images specified the in the docker-compose.yml.

Use docker image prune to remove all unused images after upgrading.