# Can i activate a custom theme by configuration

**URL:** <https://forum.keycloak.org/t/can-i-activate-a-custom-theme-by-configuration/941>\
**Category:** Configuring the server\
**Tags:** admin-console\
**Created:** [January 14, 2020, 12:14pm UTC](https://forum.keycloak.org/t/can-i-activate-a-custom-theme-by-configuration/941 "2020-01-14T12:14:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julian-B90](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/julian-b90/32/272_2.png) [@Julian-B90](https://forum.keycloak.org/u/Julian-B90)\
**Post date:** [January 14, 2020, 12:14pm UTC](https://forum.keycloak.org/t/can-i-activate-a-custom-theme-by-configuration/941/1 "2020-01-14T12:14:32Z")

</div>

I have create a custome theme and i want to activate this theme by configuration.

Have anyone a solution?

At the Moment i have Deployed my Theme as Archiv and added it by Module in the standalone.xml

```
<theme>
    <staticMaxAge>2592000</staticMaxAge>
    <cacheThemes>true</cacheThemes>
    <cacheTemplates>true</cacheTemplates>
    <dir>${jboss.home.dir}/themes</dir>
    <modules>
        <module>de.xxx.xxxx.keycloak-custom-theme</module>
    </modules>
</theme>
```

---

<div class="post-metadata">

**Author:** ![Robinyo](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@Robinyo](https://forum.keycloak.org/u/Robinyo)\
**Post date:** [January 14, 2020, 10:10pm UTC](https://forum.keycloak.org/t/can-i-activate-a-custom-theme-by-configuration/941/2 "2020-01-14T22:10:19Z")

</div>

See: [Configure Theme](https://www.keycloak.org/docs/latest/server_development/#configure-theme)

And, looking at my application’s [database export](https://github.com/Robinyo/serendipity/blob/master/keycloak/keycloak-export.json) I can’t see any mention of the realm’s theme?

---

<div class="post-metadata">

**Author:** ![themightyscot](https://avatars.discourse-cdn.com/v4/letter/t/bc8723/32.png) [@themightyscot](https://forum.keycloak.org/u/themightyscot)\
**Post date:** [January 17, 2020, 7:41pm UTC](https://forum.keycloak.org/t/can-i-activate-a-custom-theme-by-configuration/941/3 "2020-01-17T19:41:01Z")

</div>

I have the same issue. Running keycloak in docker/kubernetes/aws infrastructure. I have added my theme to the themes directory and tried setting environment variables but still having issues getting my custom theme to be the default for a specific realm when the container restarts. The theme is still there when I restart but I have to reselect it in the dropdown menu for the client. How do I set that to default on container rebuild? Is there a way to edit a standalone.xml file or set an environment variable? The documentation doesn’t seem to cover this scenario.

---

<div class="post-metadata">

**Author:** ![Nikhiljbhandari](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/nikhiljbhandari/32/10642_2.png) [@Nikhiljbhandari](https://forum.keycloak.org/u/Nikhiljbhandari)\
**Post date:** [January 6, 2021, 5:44am UTC](https://forum.keycloak.org/t/can-i-activate-a-custom-theme-by-configuration/941/4 "2021-01-06T05:44:18Z")

</div>

U need to add tag

`<default>theme name</default>` after `<dir>${jboss.home.dir}/themes</dir>`
