# Invalid destination for keycloak docker behind proxy

**URL:** <https://forum.keycloak.org/t/invalid-destination-for-keycloak-docker-behind-proxy/17013>\
**Category:** Configuring the server\
**Tags:** saml\
**Created:** [August 22, 2022, 10:20am UTC](https://forum.keycloak.org/t/invalid-destination-for-keycloak-docker-behind-proxy/17013 "2022-08-22T10:20:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![husainr](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/husainr/32/6398_2.png) [@husainr](https://forum.keycloak.org/u/husainr)\
**Post date:** [August 22, 2022, 10:20am UTC](https://forum.keycloak.org/t/invalid-destination-for-keycloak-docker-behind-proxy/17013/1 "2022-08-22T10:20:55Z")

</div>

I am running the keycloak:15.0.2 version on docker which has the following architecture  
load balancer → ingress service → keycloak application  
my load balancer is hosted as [login.bsstag.com](http://login.bsstag.com) and my keycloak application is hosted as login2, therefore, my ACS URL hostname is login  
now when I try IDP initiated login I get an error as below:

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/b/b7d285d520d75064a20f29bdecf16928f51ca4f4.png)

Env variables in Docker-compose.yml  
- env:  
- name: DB\_VENDOR  
value: MYSQL  
- name: DB\_ADDR  
value: ##  
- name: DB\_DATABASE  
value: ##  
- name: DB\_USER  
value: ##  
- name: PROXY\_ADDRESS\_FORWARDING  
value: “true”  
- name: KC\_HOSTNAME\_STRICT  
value: “false”  
- name: KC\_PROXY  
value: passthrough  
- name: KC\_HOSTNAME  
value: login  
- name: KC\_HOSTNAME\_PATH  
value: [https://login.bsstag.com](https://login.bsstag.com)

---

<div class="post-metadata">

**Author:** ![bpedersen2](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/bpedersen2/32/3934_2.png) [@bpedersen2](https://forum.keycloak.org/u/bpedersen2)\
**Post date:** [August 22, 2022, 12:02pm UTC](https://forum.keycloak.org/t/invalid-destination-for-keycloak-docker-behind-proxy/17013/2 "2022-08-22T12:02:03Z")

</div>

You are mixing a few things here:

1. the KC\_ env variables are only accepted for keycloak quarkus (kc\>=18). So I would recommend to switch to KC 18 (KC19 has still some problems).

> [@husainr](#):
>
> value: “true”
> 
> - name: KC\_HOSTNAME\_STRICT  
> value: “false”
> - name: KC\_PROXY  
> value: passthrough

probaly you want edge, unless keycloak should do the TLS termination

> [@](#):
>
> - name: KC\_HOSTNAME  
> value: login

this should be the FQDN

> [@](#):
>
> - name: KC\_HOSTNAME\_PATH  
> value: [https://login.bsstag.com](https://login.bsstag.com)

This is not needed unless you need strict compat with older releases and should tne be set to " auth"  
It specifies the sub-path under which the realms are accessible.

---

<div class="post-metadata">

**Author:** ![husainr](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/husainr/32/6398_2.png) [@husainr](https://forum.keycloak.org/u/husainr)\
**Post date:** [August 24, 2022, 6:22am UTC](https://forum.keycloak.org/t/invalid-destination-for-keycloak-docker-behind-proxy/17013/3 "2022-08-24T06:22:18Z")

</div>

do we have a solution for jboss/keycloak instead of quarkus?
