Reputation: 51
it shows an error "we are sorry an internal error occurred" while entered username password and confirm password. How can i create initial admin user?
Upvotes: 4
Views: 12556
Reputation: 1550
If you are running Keycloak in docker container then you can define admin name and password during startup:
docker run --name keycloak -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin jboss/keycloak
Otherwise, you can add the user as follows (this actually what is done in docker container behind the scenes):
/opt/jboss/keycloak/bin/add-user-keycloak.sh --user "$KEYCLOAK_USER" --password "$KEYCLOAK_PASSWORD"
Upvotes: 7