Upgrade Keycloak version 18.0 to 25.0

Hi all,
I’m trying to upgrade from v18 to 25 but that seems to be tricky.

when trying to do one step upgrade i saw some issue related to liquibase Upgrade liquibase version to avoid a bug where a changeset is execute… by vramik · Pull Request #23560 · keycloak/keycloak · GitHub

so i tried to do two hoop upgrade

18->21.1.2->25.0 but im always getting timeout in the migration part.

following this topic:

i tried to prolong the timeout of QUARKUS since i got this in my logs

: org.hibernate.HibernateException: Transaction was rolled back in a different thread!

but it didn’t help

i also tried to do another hoop i.e. 18->19->21->25 but each hoop that include upgrade to 21 is also falling in the migration with the same errors

any idea anyone?

@amir4895 follow the initial discussion. See my reply. Did you find the quarkus.properties file in the keycloak conf folder? /opt/keycloak/conf?

Answer in the first discussion thread please.

Hi @amir4895

Did you manage to update it to 25? I am thinking of upgrading to 26 from version 18. What obstacles did you come across?
Did you have any problem with migration of DB (in particular keeping the same user IDs?)

Thanks

Hello,

If I were you, in case of using OIDC, I would try to upgrade from 18->19->21->24->25, because from 24 to 25, there are some changes we must do to make Keycloak work with OIDC.

Thanks,

I recently upgraded a customer directly from 10 to 26.1 without issues.

You “just” have to know what to to, this implies that you know what you have and how to change these things (code, configuration, etc.).
If there are a lot of realms and clients, play with transaction timeouts.
Do several dry-runs in a isolated environment with a copy of your prod-db.
Backup the prod-db before the actual update.
Do migration on a single node, no other nodes running during the process.
If in doubt, ask your Keycloak expert. If you don’t have one, find one. This invest is much more cheaper than failing too often alone.