[keycloak-user] How to stop the keycloak server from standalone sh

Stan Silvert ssilvert at redhat.com
Tue Nov 29 13:00:52 EST 2016

If I understand correctly, you are asking if there is a way to trigger 
the export when you don't have access to the command line?

You want to do something like this?

|bin/standalone.sh -Dkeycloak.migration.action=export
-Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=<FILE TO EXPORT TO>


|It is possible to set system properties like those above from 
standalone.xml. If you don't have direct access to edit standalone.xml, 
you can set them with the WildFly admin console or connect with jboss-cli.|
|Then |reboot the server and the export should happen.  I say "should" 
because I've never actually tried it.

On 11/29/2016 11:25 AM, Aritz Maeztu wrote:
> Hello,
> I'm running a keycloak instance from a docker image, so when I start the
> container everything is up an running. Now I want to export the realms
> and users to deploy it in production and I've got two chances:
> 1- Copy the values from the mysql database (I'm using the keycloak-mysql
> image).
> 2- Run the standalone.sh export command.
> I would like to go the second way, but I'm into trouble since the
> widlfly server is launched with the docker container altogether. I can
> browse in to it for the standalone.sh script, but still haven't found a
> way to stop it (as the server is launched I get a "Address already in
> use" error when I try to perform the export while the server is running).
> Any ideas? Thanks in advance

More information about the keycloak-user mailing list