Search code examples
dockerdocker-composekeycloakport

What is port 9990 in a dockerized keycloak and should I publish it publickly?


I am recently started to learn keycloak. Today I realized that there is a 9990 port but I could not understand why it says its Admin Console while based on this doc Admin Console is http://localhost:8080 not http://localhost:9990.

you-say-keycloak-1     | 17:01:05,116 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

What is this 9990 port and what is the difference between it and 8080? Basically IDK why I cannot see it even though I published the port as you can see in this compose file:

version: "3"

services:
  keycloak-db:
    image: postgres:15.2-alpine3.17
    environment:
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    volumes:
      - keycloak_db_volume:/var/lib/postgresql/data

  keycloak:
    image: jboss/keycloak:16.1.1
    ports:
      - 8080:8080
      # - 8443:8443 HTTPS port
      - 9990:9990 # Admin UI
    links:
      - keycloak-db
    volumes:
      - keycloak_volume:/tmp
    environment:
      KEYCLOAK_USER: ${KEYCLOAK_USER}
      KEYCLOAK_PASSWORD: ${KEYCLOAK_PASSWORD}
      DB_VENDOR: ${DB_VENDOR}
      DB_ADDR: ${DB_ADDR}
      DB_USER: ${DB_USER}
      DB_PASSWORD: ${DB_PASSWORD}

volumes:
  keycloak_db_volume:
  keycloak_volume:

Any idea? I really appreciate if you could give me some detailed answer about this keycloak ports and what are they.


Solution

  • Port 9990 is the administration console of the underlying WildFly application server. You should not expose it to the open internet, but it may be useful to expose it to your internal network.

    However, Keycloak version 16.1.1 is quite outdated, it was released 1 year and 2 months ago. The currently up-to-date versions (20.0.5 and 21.0.1) have migrated from using WildFly as a distribution for Keycloak to using Quarkus, which does not contain such an administration console, so this knowledge is only useful as long as you are working under a deprecated version of Keycloak which no longer receives security updates.