Upgrades
How we upgrade Keycloak in your tenant, which upgrades cause downtime, and how we tell you.
We upgrade Keycloak for you. Every tenant runs an exact Keycloak image, pinned by its digest, and moves to a new one only when we upgrade it. Before any upgrade we rehearse it on a staging tenant and take a fresh backup of your database.
Patch upgrades: no downtime
A patch release stays on the same minor version, for example 26.8.0 to 26.8.1. What follows applies to Premium and Enterprise, which run two or more Keycloak replicas.
- We replace your Keycloak replicas one at a time, and a replica is only taken away once its replacement is ready. Sign-in keeps working throughout.
- Sessions are kept in the database, so users stay signed in and refresh tokens keep working.
- While replicas join and leave, a few requests can take 2 to 3 seconds. Keep your apps' timeouts for calls to Keycloak above that.
- If something is wrong, we roll back to the previous patch the same way, also without downtime. The database is unchanged, so nothing is lost.
Minor and major upgrades: a maintenance window
A minor release (26.7 to 26.8) or a major one (26 to 27) changes Keycloak's database schema. Keycloak migrates the schema when it first starts on the new version, and old and new versions cannot run side by side. So:
- We announce a maintenance window in writing before the upgrade.
- Sign-in is unavailable for a few minutes during the window: all replicas stop, the first new one migrates the schema, then the rest start.
- A backup is taken just before, and we note the exact time.
- We check the result before we close the window: a sign-in through your hostname, existing sessions and refresh tokens, and the error rates.
Major upgrades get extra testing on a staging tenant before we schedule yours.
If a minor or major upgrade has to be rolled back
An older Keycloak cannot run on a schema a newer one has migrated. Rolling back therefore means restoring your database to the backup taken just before the upgrade, then starting the previous version again. Changes made in Keycloak after the upgrade started are lost, and we tell you so in writing if it comes to that.
What you might want to check
Read the Keycloak release notes and the upgrading guide for the version we announce. They list changes in behaviour that can affect your apps, such as changed defaults or removed options.
See Keycloak versions for the Keycloak version tenants run.