Keycloak.x Admin Account

We are evaluating Keycloak.x for a new project. Installation is a breeze. However we have difficulties to activate the server (adding the initial admin user) because we don’t have browser access to localhost. Even using ngrok doesn’t work - http://localhost:8080/auth times out. Is there a command line version to add the user (similarly to We played with but there’s just not enough documentation.


Hi @gfreund

you can use this command to add a new global admin use in the shell:

.../bin/ -r master -u <username> -p <password> as described in a number of available documentations as well as in the original keycloak manual Link

and start the service by using this command:

.../bin/ -b -bmanagement

Continuing the discussion from Keycloak.x Admin Account:

Thanks @xkey,
much appreciated. We’ve done this with regular keycloak (also I didn’t know the switches - thanks, very helpful).

However now how do I get the same thing working for keycloak.x? There is no The utilities provided are, and with little documentation.


This is only available for wildfly you could however make a node script to add users like so: quick keycloak-nodejs-script · GitHub

@gfreund since keycloak.x is running on top of quarkus, you can use below property to make keycloak x instance available from outside the Linux box.

Note: This will be added in the fil present in conf directory.

Let me know if this solution works for you.

Once you had set the initial admin user you can remove it later.


You can use environment variable to do that

$ export KEYCLOAK_ADMIN=admin; export KEYCLOAK_ADMIN_PASSWORD=change_me
$ /opt/jboss/keycloak/bin/ start-dev