# Why does Keycloak require upload\_scripts to be enabled, when importing realms from a json file?

**URL:** <https://forum.keycloak.org/t/why-does-keycloak-require-upload-scripts-to-be-enabled-when-importing-realms-from-a-json-file/13537>\
**Category:** Miscellanaeous\
**Created:** [February 10, 2022, 8:11am UTC](https://forum.keycloak.org/t/why-does-keycloak-require-upload-scripts-to-be-enabled-when-importing-realms-from-a-json-file/13537 "2022-02-10T08:11:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eldarj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/eldarj/32/4365_2.png) [@eldarj](https://forum.keycloak.org/u/eldarj)\
**Post date:** [February 10, 2022, 8:11am UTC](https://forum.keycloak.org/t/why-does-keycloak-require-upload-scripts-to-be-enabled-when-importing-realms-from-a-json-file/13537/1 "2022-02-10T08:11:16Z")

</div>

I’m running Keycloak in docker, and I wanted to have a realm json file to be imported on Keycloak container start up. So, I mounted a dir and provided the json file, which then Keycloak imports.

I define the import file setting the path to it via the KEYCLOAK\_IMPORT env var.

This works perfectly, but requires me additionally to set  
`-Dkeycloak.profile.feature.upload_scripts=enabled` via e.g. `JAVA_OPTS_APPEND`

Why is upload\_scripts required, as I think the realm should be imported on init - so nothing to do with actual uploading scripts later on.

What can I do to achieve this without upload\_scripts?

---

<div class="post-metadata">

**Author:** ![eldarj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/eldarj/32/4365_2.png) [@eldarj](https://forum.keycloak.org/u/eldarj)\
**Post date:** [February 13, 2022, 11:27am UTC](https://forum.keycloak.org/t/why-does-keycloak-require-upload-scripts-to-be-enabled-when-importing-realms-from-a-json-file/13537/2 "2022-02-13T11:27:29Z")

</div>

Worth reading

[http://forum.keycloak.org/t/import-users-without-upload-scripts/2315/9](http://forum.keycloak.org/t/import-users-without-upload-scripts/2315/9)

For me, I had to remove the default policies, as I had authorization enabled - which in turn added references to JS Authenticators and similar.
