The approach depends on whether you're using standalone.sh
(or .bat presumably) or a docker image.
If you're using standalone.sh
, you can use the --debug
option, documented in standalone.sh -h
:
standalone.sh --debug '*:8000'
(the *
is to allow access from any host. Plain --debug 8000
will allow access only from localhost)
For docker images, this will be the documented approach from version 12 on, and it works at least from Keycloak 11.0.2:
$ git diff
diff --git a/docker-compose/keycloak-standalone/docker-compose.yml b/docker-compose/keycloak-standalone/docker-compose.yml
index fcf3a52..93b7209 100644
--- a/docker-compose/keycloak-standalone/docker-compose.yml
+++ b/docker-compose/keycloak-standalone/docker-compose.yml
@@ -11,11 +11,14 @@ services:
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
+ DEBUG: "true"
+ DEBUG_PORT: "*:8000"
ports:
- 8080:8080
+ - 8000:8000
volumes:
- data:/opt/jboss/keycloak/standalone/data
(Again, the *
is to allow access from any host.)