Keycloak upgrade to 16.1.0 standalone

Upgrading Keycloak to 16.1.0 is not straightforward, it requires manual hands, especially if you’re behind a nginx proxy or other reverse proxy.

The documentation has some vague hints that sends you to dead ends.

I wrote a little upgrade script for my keycloak upgrades

As you see this is for keycloak with a postgresql datasource.

Now since they don’t provide an upgrade script anymore you have to manually edit the standalone.xml file in standalone/configuration/standalone.xml .

Since I’m using a non-standard port I have to edit the port numbers for http & https

and since I use port 4001 and 4443

then since I’m using postgresql I have to again define the datasource and driver, also remove the ExampleDS and H2.

Also I have to set this datasource to be the default one

Since there is no migration script and the old standalone.xml doesn’t work anymore this new script for just this version is as follows

And that’s all there is to it.
Don’t you just love Java and XML configuration files?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.