Welcome theme in Keycloak 17/Quarkus

Hi All,

Does anybody know how to enable a welcome theme in the new (Quarkus) distribution of Keycloak? I used to set it in the standalone.xml file, but now I don’t know where to do it.

Thanks!

Hi,

you can configure it in your conf/keycloak.conf with the option ‘‘spi-theme-welcome-theme=theme-name’’

( Server Developer Guide )

1 Like

This works here at my side:
KC_SPI_THEME_WELCOME_THEME: mytheme

And in the mytheme folder I have the usual welcome folder.

1 Like

Do you use that as a build or runtime env var?

Works as runtime config property

1 Like

I am trying to use the following in a Dockerfile

COPY ./theme/mythem themes/mytheme/
ENV KC_SPI_THEME_WELCOME_THEME=mytheme
ENV KC_SPI_THEME_ACCOUNT_THEME=mytheme
ENV KC_SPI_THEME_LOGIN_THEME=mytheme
ENV KC_SPI_THEME_EMAIL_THEME=mytheme

However the settings remain unset

image

The directory structure inside the container is /opt/keycloak/themes/mytheme/account and /opt/keycloak/themes/mytheme/welcome etc

Anything obvious I am doing wrong?

The realm theme configuration doesn‘t work via server config / env vars, this has to be done in each realm.
Server config is global, not realm-related. Welcome theme is a global theme, not realm-related.

Ah thanks, makes sense