Unable to connect to home assistant with DuckDNS and reverse proxy

Hello,

At home I have a dynamic IP from my ISP and so I need to configure DuckDNS but I also have a remote server that is hosting my www.domain.com.

What I want in the end to obtain is access to my HASSIO server from my personal server with HTTPS.
I plan of configuring Let’s encrypt on my server and the proxy pass to DuckDNS on port 8123.
But for now I still have issues even without SSL.

I want to start by saying that I got mydomain.duckdns.org:8123 up and running, without HTTPS and I can access it from outside my network.

I have created a reverse proxy from http://mydomain.domain.com to mydomain.duckdns.org.
When I visit mydomain.domain.com the HASSIO page loads, I enter my credentials, it does the login but when it does the auth callback return it fails with “Unable to connect to home assistant”.

I have fiddled with base_url, setting it to both duckdns and domain.com, with trusted networks but still no dice.

To get over this bump I need help first getting passed this AUTH redirection fail and then if I don’t manage, configuring HTTPS.

Thank you,
Liviu