I cannot login to keycloak in the initial setup. I managed to run the server via /standalone.sh -b=0.0.0.0 command and when accessing it via http://x.x.x.x:8080 the login page doesn't allow me to login with admin/admin username and password. any hint is highly apreciated.
In order to create the initial administrator user you need to use add-user-keycloak.sh
(.bat) script located in keycloak/bin
with all other scripts. Run it before starting/restarting the server, so Keycloak could pick up the user:
$ ./add-user-keycloak.sh -u admin -p password
.
$ ./add-user-keycloak.sh --help
will show you all the available options.
According to the latest keycloak documentation (today) there are two procedures to creating the first administrator credentials:
Creating the account on the local host
If your server is accessible from localhost, perform these steps. Procedure:
Creating the account remotely
If you cannot access the server from a localhost address, or just want to start Keycloak from the command line, use the KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD environment variables to create an initial admin account.
For example:
export KEYCLOAK_ADMIN=<username>
export KEYCLOAK_ADMIN_PASSWORD=<password>
bin/kc.[sh|bat] start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With