You can add 1 more environment variable in docker-compose.yml of keycloak HOSTNAME : host.docker.internal The problem would get solved.