Creating an Administrator User in Keycloak
This step is only required if the administrator user has not yet been created. An administrator user is required to access the Keycloak Administration Console.
How to create the administrator user locally in 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.
How to create the administrator user using environment variables when there is no local user interface
- Add the
KEYCLOAK_ADMIN
andKEYCLOAK_ADMIN_PASSWORD
environment variables to the/etc/environment
file. These values specify the username and the password of the administrator. Restart 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.