Keycloak theme development

Notes on developing a custom Keycloak theme
Jun 18, 2023 · 103 words · 1 minute read

There are other guides out there that go into more detail on this. However, I found the guide didn’t work as expected.

The problem is, if you access your local instance using http://localhost:8080 as the documentation says, it gives a ‘We are sorry… Page not found’ message.

I found I had to add an /etc/hosts entry and access it using that hostname:

127.0.0.1 keycloak

To run up the local container, I used:

docker run --rm -ti --name keycloak -p 8080:8080 -v ./themes/rossgolderltd:/rossgolderltd -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=secret quay.io/keycloak/keycloak:21.1.1 start-dev

Then I am able to access it via http://keycloak:8080/ and things are working as expected.