# Custom theme jar deployment

**URL:** <https://forum.keycloak.org/t/custom-theme-jar-deployment/13018>\
**Category:** Getting advice\
**Created:** [January 12, 2022, 2:39pm UTC](https://forum.keycloak.org/t/custom-theme-jar-deployment/13018 "2022-01-12T14:39:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiney1821](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/tiney1821/32/4777_2.png) [@Tiney1821](https://forum.keycloak.org/u/Tiney1821)\
**Post date:** [January 12, 2022, 2:39pm UTC](https://forum.keycloak.org/t/custom-theme-jar-deployment/13018/1 "2022-01-12T14:39:54Z")

</div>

When creating and deploying a custom theme jar to the standalone/deployments folder I’m running into an issue where the themes are not available.

I have followed the guide in [Server Developer Guide](https://www.keycloak.org/docs/latest/server_development/#deploying-themes) and the final step of : “To deploy the archive to Keycloak simply drop it into the standalone/deployments/ directory of Keycloak and it will be automatically loaded.” seems a little vague as to what happens next.

Upon deploy of the theme I’m getting the following

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/6/6c5fb56a83801e6bbff607213fb5aa8ab44f3d48.png)

I can also see the mounted themes within the keycloak-16.1.0\standalone\tmp\vfs\temp\tempxxx\contentxxx looking at the content file whilst the server is running so I’m certain that my themes exist along with the META-INF/keycloak-themes.json file.

An example of my keycloak-themes.json file is provided

```auto
{
  "themes": [
    {
      "name": "customThemeOne",
      "types": [
        "login"
      ]
    },
    {
      "name": "customThemeTwo",
      "types": [
        "login"
      ]
    }
  ]
}

```

Any help or information would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![semangard](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/semangard/32/1922_2.png) [@semangard](https://forum.keycloak.org/u/semangard)\
**Post date:** [January 12, 2022, 2:54pm UTC](https://forum.keycloak.org/t/custom-theme-jar-deployment/13018/2 "2022-01-12T14:54:35Z")

</div>

I’ve just made a COPY of the themes directories into the Dockerfile and it worked

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/3/3569591954572643c5cee5e5f411c12d0edc2782.png)

and get a look at [Dockerized setup with custom theme](http://forum.keycloak.org/t/dockerized-setup-with-custom-theme/12638)

---

<div class="post-metadata">

**Author:** ![maccamb](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/maccamb/32/10327_2.png) [@maccamb](https://forum.keycloak.org/u/maccamb)\
**Post date:** [May 3, 2024, 3:32pm UTC](https://forum.keycloak.org/t/custom-theme-jar-deployment/13018/3 "2024-05-03T15:32:37Z")

</div>

I am running into a similar problem on Linux using a docker container.

The issue is that I provide the jar file using a bind that results in the file having the owner and group set to what they are on the host (which does not have a keycloak user - I use the latest and unaltered image from keycloak/keycloak)

Keycloak server in the container cannot see that file as it likely runs under user keycloak.

I can always go into the container and manually change the owner and group but I want to automate the deployment.

Still trying to figure out a solution and if I find one I’ll post here.

---

<div class="post-metadata">

**Author:** ![maccamb](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/maccamb/32/10327_2.png) [@maccamb](https://forum.keycloak.org/u/maccamb)\
**Post date:** [May 4, 2024, 2:04pm UTC](https://forum.keycloak.org/t/custom-theme-jar-deployment/13018/4 "2024-05-04T14:04:47Z")

</div>

So I could not identify a solution where I could completely automate the process without using a Dockerfile.

So I decided to not adopt the recommended production solution and instead did a bind mount of the host theme directory to /opt/keycloak/themes in the container. That seems to be working.

Interestingly I suspect that this issue can be avoided with podman. But alas Synology does not have a package for podman yet. I may build that when I am done with my current project.

I am sure I’ll be back with other keycloak questions…

In the meantime many thanks to the community for your excellent help and collaboration!
