[SOLVED] Home assistant reverse proxy setup with Caddy 2

I’m new to home automation and have just set up Home assistant as a container on an Intel NUC. The home assistant instance is working great locally and I can control the devices I have added without issue.

My current project is to get access externally from my network by using a reverse proxy and I have setup caddy for this purpose.

All the port forwarding for 80, 443, and the caddy side appears to be functional as I have no problem using https://portainer.mydomain.com/ to access my portainer container from outside my network.

I am having difficulty however getting Home Assistant to work.

My caddyfile contains:

`portainer.mydomain.com` {

`hass.mydomain.com` {

I have added internal and external URLs:

External: https://hass.mydomain.com/

Configuration.yaml http section is:

    base_url: https://hass.mydomain.com
    use_x_forwarded_for: true

I am making the assumption that because accessing portainer is working that the issue is not with caddy and I am failing to ensure that home assistant is correctly setup.

Much appreciation in advance for any insights you may have into fixing my situation.


Unclear why but it appears with trusted proxy I cannot use
Once I changed it to the internal IP address of the NUC access is working as it should!