Creating an Administrator User in Keycloak
This step is required only if an administrator user has not been created. An administrator user is required to access the Keycloak Administration Console.
To create the administrator user locally from the Keycloak Administration Console
- If a graphical user interface is available, you can access the Keycloak Administration Console locally:
- Navigate to http://localhost:8085/auth in a web browser.
- Select Administration Console and follow the instructions.
To create the administrator user using environment variables when there is no local user interface
- Add the environment variables
KEYCLOAK_ADMINandKEYCLOAK_ADMIN_PASSWORDto the file/etc/environment. These values specify the username and the password of the administrator. Restart the Keycloak.
The administrator user is automatically created with the specified credentials. The console (or log file) contains an entry confirming that the administrator user was created successfully.Note:
Once you have created the administrator user, you can delete the environment variables.