5.7. Starting and configuring the Keycloak server
To start a Keycloak server, you can use Docker and run the following command:
docker run --name keycloak -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
where keycloak.version is set to 26.0.7 or higher.
Access your Keycloak server at localhost:8180.
Log in as the admin user to access the Keycloak administration console. The username and password are both admin.
Now, import the realms for the two tenants:
- Import the default-tenant-realm.json to create the default realm.
-
Import the tenant-a-realm.json to create the realm for the tenant
tenant-a.
For more information, see the Keycloak documentation about how to create a new realm.