Skip to content

Realm Export/Import via Admin Console

Keycloak Export/Import via Admin Console

Export via Admin Console has 2 disadvantages:

  • No User Export
  • No Secret/Password Export du to security concerns

This means we should not use this option for Deveolpment or testing !

If you have a Realm Exporit you may run the following commansd to import this realm

  • Windows directory d:/dev/quarkus/security-keycloak-authorization-quickstart/imports is mapped to /opt/jboss/keycloak/imports/
  • ^ is line continutation on Windows CMD
D:\dev>ls -l d:/dev/quarkus/security-keycloak-authorization-quickstart/imports
-rw-r--r-- 1 Helmut None 75534 Jan 22 11:38 realm-export.json

D:\dev> cd D:\dev\Quarkus\security-keycloak-authorization-quickstart>

Now run run docker realm import 
docker run --name keycloak -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8280:8080 -p 8543:8443 ^
    -v "d:/dev/quarkus/security-keycloak-authorization-quickstart/imports:/opt/jboss/keycloak/imports" ^
	-e KEYCLOAK_IMPORT="/opt/jboss/keycloak/imports/realm-export.json -Dkeycloak.profile.feature.upload_scripts=enabled" ^
	quay.io/keycloak/keycloak:15.0.2

References

Published inKeycloak

Be First to Comment

Leave a Reply