Set default theme Keycloak 17

Viewed 938

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?

3 Answers

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.

I have same problem, in the end I set custom theme to each realm manually.

Related