Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't create initial admin user in keycloak

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?

like image 270
Harihara Subramanian Avatar asked Oct 17 '25 12:10

Harihara Subramanian


1 Answers

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"
like image 114
Yuriy P Avatar answered Oct 19 '25 14:10

Yuriy P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!