nextcloud-docker-dev
nextcloud-docker-dev copied to clipboard
Impossible to connect on the nextcloud with Keycloak
Hi everyone :slightly_smiling_face:
I would like to use Keycloak to do tests and I cannot log in with Keycloak.
I followed the instructions : https://github.com/juliushaertl/nextcloud-docker-dev#keycloak .
I run a few docker containers with this command :
docker compose up proxy nextcloud ldap keycloak
Then, I tried to log in with keycloak :
But, when I clicked on the "Login with Keycloak" button. I get this error message :
So, I tried to connect on the http://keycloak.dev.local . But, I get this another error message :
I saw my configuration from Settings > OpenID Connect and the configuration seems good to me ?
I don't know if it's a bug or not. Can you help me, please ? :pray:
Looks like a typo in the URL:
keycloak not keacloack
Looks like a typo in the URL:
keycloak not keacloack
Thanks @juliushaertl , I am stupid ><
I retried with keycloak.dev.local and I have this error page :
And I always have the same problem when I would like to log in with keycloak :
I wonder if it's a problem with the port number (?) :thinking:
$ docker compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
master-database-mysql-1 mariadb:10.5 "docker-entrypoint.s…" database-mysql 8 minutes ago Up 8 minutes 0.0.0.0:8212->3306/tcp, :::8212->3306/tcp
master-keycloak-1 quay.io/keycloak/keycloak:20.0 "/opt/keycloak/bin/k…" keycloak 8 minutes ago Up 8 minutes 8080/tcp, 8443/tcp
master-ldap-1 osixia/openldap "/container/tool/run…" ldap 8 minutes ago Up 8 minutes 636/tcp, 0.0.0.0:3389->389/tcp, :::3389->389/tcp
master-mail-1 ghcr.io/juliushaertl/nextcloud-dev-mailhog:latest "MailHog" mail 8 minutes ago Up 8 minutes 1025/tcp, 8025/tcp
master-nextcloud-1 ghcr.io/juliushaertl/nextcloud-dev-php80:latest "/usr/local/bin/boot…" nextcloud 8 minutes ago Up 7 minutes 0.0.0.0:8210->80/tcp, :::8210->80/tcp
master-proxy-1 ghcr.io/juliushaertl/nextcloud-dev-nginx:latest "/app/docker-entrypo…" proxy 8 minutes ago Up 8 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp
master-redis-1 redis:7 "docker-entrypoint.s…" redis 8 minutes ago Up 8 minutes 6379/tcp
The port numbers should not be needed as the request should go through the proxy container. I also cannot reproduce that, for me this works fine :/
Maybe try restarting proxy with docker-compose up -d --force-recreate proxy
Arf... Always the same problem even after run the docker compose up -d --force-recreate proxy command...
I tried to delete all my images and recreate with docker compose up proxy nextcloud ldap keycloak and always the same problem... It's very strange... :thinking:
I don't know if it's that, but the url is keycloak.local.dev and not keycloak.dev.local : https://github.com/juliushaertl/nextcloud-docker-dev/blob/172b158844e028858df4a1a4b258c1ec6330bf46/docker/bin/bootstrap.sh#LL132C1-L132C130
Ah I see, i think the auto setup doesn't take the DOMAIN_SUFFIX into account properly. However independent of that keycloak should be reachable in the browser through keycloak${DOMAIN_SUFIX}
Hmm... But, should I have access to keycloak.local in this case, no ?
In my .env file, the domain sufix is .local.
# .env
DOMAIN_SUFFIX=.local
If you write keycloak.dev.local in the project and in configuration files keycloak${DOMAIN_SUFIX}, I don't know if it can work with keycloak.dev.local :thinking:
I tried with keycloak.local or keycloak.dev.local and I have the same result :thinking:
Can you check the container logs of proxy and keycloak if there are any errors or messages when you try to open keycloak.local in your browser?
