Keycloak behind SSL proxy on port 443 redirects to port 8080 for Account console

I’m trying to deploy Keycloak behind an Nginx reverse proxy. Keycloak inside its container is listening on 8080 in edge proxy mode. I can visit the admin console just fine. Then when I try to access the account console for the user I’m logged in with I get a time out because I am redirected to the :8080 port.

Also, when I manually edit the url to remove the 8080, then the account console tries to start up, but fails because of 403.

What gives?

Don’t duplicate your topics: FAQ - Keycloak

I found the problem/solution: I was using a chain of two proxies, the last of which was using http to connect to keycloak. I don’t have access to the other one, but it seems to be incorrectly forwarding the protocol and the port.