Inside of Keycloak
Testing your theme in Storybook is helpful, but eventually, you'll need to test it in a real Keycloak instance before deploying it to production.
Prerequisites
Install Docker: Ensure Docker Desktop (or just Docker) is installed and running on your computer.
Install Maven: Maven is required to build
.jar
files locally. Check if it's already installed by running:mvn --version
If not, follow the instructions below to install Maven.
Using Homebrew:
brew install maven
Running Keycloak in Docker
Once the prerequisites are set up, you're ready to start Keycloak. Run the following command in your Keycloakify project:
npx keycloakify start-keycloak
You will be prompted to select the Keycloak version to spin up:

Keycloakify will launch the selected Keycloak version in a Docker container.
Once the container is running, you’ll see two links:

Keycloak Admin Console: http://localhost:8080 The Keycloak instance is preconfigured with your theme, a custom realm named
myrealm
, and a test user (testuser/password123
) for quick testing. Changes to the configuration are saved in the.keycloakify
directory so that they persist across restarts.Test Web App: https://my-theme.keycloakify.dev This app redirects to your login theme. Edits to your theme are auto-rebuilt and updated in the Keycloak container. Simply refresh the page to see changes live.

Logging in with the test user redirects you to a page where you can inspect the decoded ID token (JWT) and access your custom Account and Admin themes (if you implement them).

More Options
Want to use a custom Keycloak image? Load some extentions? Import a realm configuration? No problem! The start-keycloak command support many options!
startKeycloakOptionsLast updated
Was this helpful?