Keycloak on Docker & First Setup

First, What is Keycloak ?

Keycloak is an open source Identity and Access Management solution targeted towards modern applications and services.

Start Keycloak

docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin 


We need to create our custom Realm.


After created realm, we have to need roles for incoming users.


Now we’ll navigate to the Clients page. And click the ‘Create’ button.

After created client, we have to specify at least one ‘Valid Redirect URL’ that will use this client for authentication.

Example: http://localhost:8081/*


User — Credentials

User — Role Mapping

After all these configurations, let’s check it is working properly;


Request must be like;



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store