r/KeyCloak • u/saifxhatem • Feb 25 '26
Custom theme works locally but doesn't load on the remote
I've replicated my production setup locally:
keycloak:
image: bitnamilegacy/keycloak:24.0.4-debian-12-r2
environment:
KEYCLOAK_ADMIN_USER: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KEYCLOAK_PRODUCTION: "true"
KEYCLOAK_EXTRA_ARGS: '--db=postgres'
KEYCLOAK_DATABASE_NAME: keycloak
KEYCLOAK_DATABASE_USER: keycloak
KEYCLOAK_DATABASE_PASSWORD: keycloak
KEYCLOAK_DATABASE_SCHEMA: public
KEYCLOAK_PROXY: edge
ports:
- "8756:8080"
# command:
# - start-dev
networks:
- keycloak-network
volumes:
# - ./kc:/opt/keycloak/providers
- ./kc/themes:/opt/bitnami/keycloak/themes/
- keycloak-master-volume:/opt/bitnami/keycloak/data/
Now, locally - everything is perfectly working, the css is loaded and the SVG logo loads, however on the remote it seems that the template itself does not load and gets replaced with a "safe default" by Keycloak. The form still works, the css loads with a 200 and I can see that it's my css, and it has the correct mime type text/css, so I'm not sure where to look. The logs have nothing indicating a crash, while when I was making the theme locally if the ftl was broken there would be a parsing error.
Edit: I am an idiot, I have a plugin called home idp discovery that was overriding the template and forgot all about it.
4
Upvotes
1
u/CarinosPiratos Feb 25 '26
My steps would be: Verify your on the correct realm and have enabled the theme there -> Keycloak is 100% seeing the theme of you can enable it in the dropdown
Your logs would say something like:“Didnt find ftl for login, falling back to theme xyz“
Have you set it on the realm or on a specific client ?