Deploying themes in domain cluster

The Theme documentation claims that Themes are better deployed as a JAR with some metadata:
It literally says: " An archive makes it simpler to have a versioned copy of the theme, especially when you have multiple instances of Keycloak for example with clustering."

However, the only place where that jar can be deployed is in standalone/deployments. And that’s not valid when using a cluster. Modules has to be properly deployed, which i have a few, but themes are not a module, so that won’t work.

Is there a way to deploy custom themes in a cluster? or is it only for standalone deployments?


1 Like

I’m also wondering about this topic, so I asked for feedback on our approach here.

From my reading, it seems like it’s possible to deploy a theme using the same process as a module:

[To] deploy the archive to Keycloak you can either manually create a module in modules or use the jboss-cli command. It’s simplest to use jboss-cli as it creates the required directories and module descriptor for you.

To deploy on Linux run:

bin/ --command="module add --name=org.example.mytheme"

Maybe the themes are not technically modules, but it looks like you can use the same CLI to install them.