📥Importing the JAR of Your Theme Into Keycloak
Now that you have your theme as a .jar file, let's see how you can import it in Keycloak so that it appears in the dropdown list for selecting theme in the Keycloak Admin console.

Takes the following instructions with a grain of salt. They are contributed by the comunity and might not be up to date. They'll give you an idea of how it's suposed to be done but you'd be better of looking for the official documentation on how to load keycloak extentions.
cd ~/github
git clone https://github.com/keycloakify/keycloakify-starter
cd keycloakify-starter
# Just to make sure these instructions remain relevant in the future
# We pin the version of the starter we are using.
git checkout c6511feee3d9471f6ea67bc5176e28150ab951ef
yarn
yarn build-keycloak-theme
docker run \
-p 8080:8080 \
--name my-keycloak \
-e KC_BOOTSTRAP_ADMIN_USERNAME=admin \
-e KC_BOOTSTRAP_ADMIN_PASSWORD=admin \
-v "./dist_keycloak/keycloak-theme-for-kc-all-other-versions.jar":/opt/keycloak/providers/keycloak-theme.jar \
quay.io/keycloak/keycloak:26.0.4 \
start-dev
Here we use "start-dev"
but in production use "start --optimized"
Last updated
Was this helpful?