-
Hello, I am new to Keycloak and am not yet fully familiar with its details. I have been able to successfully install, start and log into the Admin console using a Ubuntu VM and containers for keycloak and mariadb. However I am unable to log in to the Admin console using the provisioned admin credentials if I repeat the setup on my Synology NAS that runs its own nginx web server. (And I have been unsuccessful in locating any leads to debug this issue, so I am humbly seeking help here.) My experience is as follows:
Since (1) the error does not occur on my VM and I am able to successfully login using admin credentials, and (2) the only difference between the two setups that I can think of is the nginx web server, I suspect that my keycloak setup on the NAS may deficient, specifically wrt reverse-proxy. I would greatly appreciate any guidance on this matter. Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 12 replies
-
If you're running Keycloak behind a reverse proxy, you have to configure it accordingly. |
Beta Was this translation helpful? Give feedback.
-
Make sure Keycloak has the hostname, port and path configured correctly. Check for errors in the network tab and the stored cookies in the browser's developer tools. There should be no errors in the network tab, and cookies set for the |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for your help! So...
So my guess is that the issue may be related to I continued exploring and found the following page: https://www.keycloak.org/server/hostname It has 2 sections that I think may be relevant - see attached screenshot below - and am considering the following: I am going to try this and will report results. But I would also appreciate any guidance based on the above. Many thanks! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It's likely that Keycloak still misses some parameter - try setting You should at least see some session cookies - |
Beta Was this translation helpful? Give feedback.
-
After much digging in I have concluded that there may be inconsistencies in the way keycloak supports dev-mode - either in documentation or in code. Specifically the way cookies are set when HTTPS is not used. So I decided to switch to HTTPS and that solved the issue. Lol! Thank you guys for engaging, encouraging and helping me! Much appreciated! |
Beta Was this translation helpful? Give feedback.
After much digging in I have concluded that there may be inconsistencies in the way keycloak supports dev-mode - either in documentation or in code. Specifically the way cookies are set when HTTPS is not used.
So I decided to switch to HTTPS and that solved the issue. Lol!
Thank you guys for engaging, encouraging and helping me! Much appreciated!