4. Add Custom Theme

Custom themes are added to a realm by

  1. adding the theme directory to /opt/keycloak-4.8.3.Final/themes
  2. selecting the theme via Admin Web UI >> Realm Settings >> Themes

Each theme is selectable based on the directory name of the theme. Themes can extend other themes.

Here are two links to get started with a custom theme:

  1. Currently version v2.0.0 of OSC’s Keycloak theme can be used as a starting point for modification. This theme is based off of the default keycloak theme which itself is based off the base theme. Files to modify include:
  2. See the Keycloak documentation for themes: https://www.keycloak.org/docs/latest/server_development/index.html#_themes

Remember after adding a theme you still need to configure your realm in the Keycloak admin UI to use the theme for the login pages.

Note

Soon we will offer an ood-keycloak base theme that be easier to extended to provide most of the common themeing a site might like to perform. It will also work well for OTP views.