# Upgrade Keycloak version 18.0 to 25.0

**URL:** <https://forum.keycloak.org/t/upgrade-keycloak-version-18-0-to-25-0/27940>\
**Category:** Getting advice\
**Created:** [September 18, 2024, 11:40pm UTC](https://forum.keycloak.org/t/upgrade-keycloak-version-18-0-to-25-0/27940 "2024-09-18T23:40:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amir4895](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/amir4895/32/7145_2.png) [@amir4895](https://forum.keycloak.org/u/amir4895)\
**Post date:** [September 18, 2024, 11:40pm UTC](https://forum.keycloak.org/t/upgrade-keycloak-version-18-0-to-25-0/27940/1 "2024-09-18T23:40:53Z")

</div>

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](https://github.com/keycloak/keycloak/pull/23560)

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:

> [@Keycloak Upgrade Docker Container From 18.0.2 to 21.0.2 With +200 Realms](https://forum.keycloak.org/t/keycloak-upgrade-docker-container-from-18-0-2-to-21-0-2-with-200-realms/26836):
>
> Hi dear community, I am reaching out to you because we need some community help on upgrading our KC version from 18.0.2 to 21.0.2. We run a multi-tenancy approach where each organisation with users is represented by a realm. Since we serve multiple organisations, we have more than 300 on our KC. I am aware of the fact, that around 300 realms, KC suffers significant performances issues, and we do have a plan to move away from this approach, and go for groups. However, we decided first to upgrade …

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?

---

<div class="post-metadata">

**Author:** ![borisnu](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/borisnu/32/10824_2.png) [@borisnu](https://forum.keycloak.org/u/borisnu)\
**Post date:** [September 26, 2024, 5:43pm UTC](https://forum.keycloak.org/t/upgrade-keycloak-version-18-0-to-25-0/27940/2 "2024-09-26T17:43:11Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![AdamMK](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/adammk/32/12016_2.png) [@AdamMK](https://forum.keycloak.org/u/AdamMK)\
**Post date:** [March 6, 2025, 12:42pm UTC](https://forum.keycloak.org/t/upgrade-keycloak-version-18-0-to-25-0/27940/3 "2025-03-06T12:42:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andretadeu](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/andretadeu/32/11973_2.png) [@andretadeu](https://forum.keycloak.org/u/andretadeu)\
**Post date:** [March 10, 2025, 9:54am UTC](https://forum.keycloak.org/t/upgrade-keycloak-version-18-0-to-25-0/27940/4 "2025-03-10T09:54:18Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [March 10, 2025, 10:36am UTC](https://forum.keycloak.org/t/upgrade-keycloak-version-18-0-to-25-0/27940/5 "2025-03-10T10:36:33Z")

</div>

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.
