# Nextcloud SAML client works in v15 but not Keycloak.X

**URL:** <https://forum.keycloak.org/t/nextcloud-saml-client-works-in-v15-but-not-keycloak-x/12805>\
**Category:** Configuring the server\
**Created:** [December 28, 2021, 10:03pm UTC](https://forum.keycloak.org/t/nextcloud-saml-client-works-in-v15-but-not-keycloak-x/12805 "2021-12-28T22:03:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![summersab](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/summersab/32/3514_2.png) [@summersab](https://forum.keycloak.org/u/summersab)\
**Post date:** [December 28, 2021, 10:03pm UTC](https://forum.keycloak.org/t/nextcloud-saml-client-works-in-v15-but-not-keycloak-x/12805/1 "2021-12-28T22:03:57Z")

</div>

I have followed two excellent guides to set up a client for Nextcloud authentication:  
[https://rmm.li/wiki/doku.php?id=linux\_server\_manuals:nextcloud\_saml\_authentication\_against\_keycloak](https://rmm.li/wiki/doku.php?id=linux_server_manuals:nextcloud_saml_authentication_against_keycloak)

> <https://stackoverflow.com/questions/48400812/sso-with-saml-keycloak-and-nextcloud/48400813#48400813>

When I create a client with the WildFly-based Docker image, the integration works just fine. However, Keycloak.X does not. Upon browsing to my Nextcloud host, the page redirects to `https://login.nunimbus.com/auth/realms/realmid/protocol/saml?SAMLRequest=[...]` and shows the error, “We are sorry… Page not found.” I have tried creating the realm and client from scratch as well as exporting/importing the realm from the WildFly image to Keycloak.X - nothing I have tried has worked.

Here is how I am starting my WildFly Keycloak container (I am running behind a reverse proxy):

```auto
docker run -ti -p 8080:8080 \
  -e KEYCLOAK_USER=keycloak \
  -e KEYCLOAK_PASSWORD=<password> \
  -e PROXY_ADDRESS_FORWARDING=true \
  -e KEYCLOAK_FRONTEND_URL=https://login.domain.com/auth \
  jboss/keycloak:latest

```

For the Keycloak.X image:

```auto
docker run \
  -e KEYCLOAK_ADMIN=keycloak \
  -e KEYCLOAK_ADMIN_PASSWORD=<password> \
  -p 8080:8080 \
  -ti quay.io/keycloak/keycloak-x \
  --http-enabled=true \
  --proxy=passthrough

```

I am happy to provide an export of my realm, but it exceeds the limit for forum posts. I can put it up on GitHub somewhere.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![summersab](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/summersab/32/3514_2.png) [@summersab](https://forum.keycloak.org/u/summersab)\
**Post date:** [December 29, 2021, 6:32am UTC](https://forum.keycloak.org/t/nextcloud-saml-client-works-in-v15-but-not-keycloak-x/12805/2 "2021-12-29T06:32:04Z")

</div>

Ah - I figured it out. In Keycloak.X, `auth` is not part of the URI’s route. For example:  
[https://kc.domain.com/auth/realms/realmid](https://kc.domain.com/auth/realms/realmid)

should become:  
[https://kc.domain.com/realms/realmid](https://kc.domain.com/realms/realmid)

I changed these in the Nextcloud settings, and everything works just fine. I hope this will help others who may have the same problem!
