Fix Keycloak Script Upload Is Disabled. How to export / import / backup your realm configuration.

Problem: “[org.keycloak.services.error.KeycloakErrorHandler] (default task-10) Uncaught server error: java.lang.RuntimeException: Script upload is disabled”

This article is about the problem of importing a realm by the web UI of KeyCloak. Mostly when you backup your configuration from KeyCloak you use the easy and comfortable way of UI.

After the export we should have a json file containing the whole configuration of the exported realm. When we then try to reimport the json. An error can occur:

2022-02-15 15:53:14,294 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-10) Uncaught server error: java.lang.RuntimeException: Script upload is disabled
Source: https://www.czetsuyatech.com/2019/12/keycloak-script-upload-is-disabled-when-importing-a-realm.html

Source: https://www.czetsuyatech.com/2019/12/keycloak-script-upload-is-disabled-when-importing-a-realm.html

For this problem or issue an easy-to-use solution exists.

Solution:

To fix the problem ssh into your container or server where you are running your KeyCloak instance. First stop your instance and then you can execute the following:

cd /bin
./standalone.sh -Dkeycloak.profile.feature.upload_scripts=enabled

After executing this and the server started you can again open the import page of the KeyCloak Web UI and the error should no longer exist.

I hope the article helped. Happy coding!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Walter-Tscharf-Development

Walter-Tscharf-Development

If you like my work or have question contact me.