I´m migrating to Keycloak 17 but I´m struggling with the custom themes.
On my previous version (16.1.1) I was able to set the default theme with the KEYCLOAK_DEFAULT_THEME env variable, which pointed to my custom theme.
Now i´m still able to load the themes correctly (They appear on the web console), but v17 it´s not responding to this env.
I found a way to set up the welcome theme on startup with:
kc.sh start --spi-theme-welcome-theme=custom
but this option doesn´t work for other kind of themes like login or admin.
Is there any other env or flag that i can use on startup?
You can still use it via ENV, but you have to set KC_SPI_THEME_DEFAULT. Additionally, you may have to start Keycloak with the --auto-build option.
If you start your server with kc.sh start --spi-theme-default=custom-theme, then it should use the supplied custom theme, according to: https://github.com/keycloak/keycloak/blob/bfce612641a70e106b20b136431f0e4046b5c37f/services/src/main/java/org/keycloak/theme/DefaultThemeManager.java#L57
This worked for me with Keycloak 18.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With