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 Mode | Silent Mode | Migration Behavior |
|---|---|---|
development | true | Migration applied automatically |
development | false | Maintenance mode UI displayed, user prompted to run migrations |
production | true | Migration applied automatically |
production | false | Migration 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:latestordocker compose pulland recreate your deployment withdocker compose up -dwhich 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 pullyou can only pull the specified image, or just rundocker compose up -dwhich 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 withdocker 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 usedocker compose pull,docker compose buildanddocker compose up -daccordingly to get images specified the in thedocker-compose.yml.
Use docker image prune to remove all unused images after upgrading.