- Published on
Setup Keycloak for development purposes
Keycloak docker-compose
Just paste code below to file and name it docker-compose.yml
services:
keycloak:
image: quay.io/keycloak/keycloak:26.0
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
ports:
- '8000:8080'
command:
- start-dev
Run command docker compose up -d
and open in the browser url http://localhost:8000
. Login to the keycloak with user and password - in a file both are admin
.
Keycloak internal setup
- Create the realm Fill the name and click create.
- Create the client Click
clients
in a sidebar and clickCreate client
. Fill theClient ID
, which is very important and commonly used in oauth libraries. This settings I would leave that way, because the most popular and used everywhere is code flow which is instandard flow
checkbox. Next you should determine your URIs. For Angular it can look like this: Create the user There's nothing complicated here, just fill the inputs.
Create a password for the user In the
Credentials
tab you are able to set the password for your user.
That's it! You are good to go with a development :)