Secure external access

Hello,
Already for several days I have been struggling with setting up (encrypted) external access to Home Assistant without success.
I have registered a domain name, and I would like to use a subdomain (A-record) to forward a request to my own external ip-address.

On HomeAssistant, Nginx Proxy Manger is installed and it is possible to establish a non-secure connection (by using http://subdomain.nl). Therefore, on the router, http port80 is forwarded to the internal ip-address of HomeAssistant.

Of course it is recommendable to use a secure connection and a Let’s Encrypt certificate. Normally, on the router port 443 could be opened to forward traffic to the internal ip-address of Home Assistant. However, this port is already used for my NAS. Whatever I do (including alternative https-ports 4443 or 8443), by typing https://subdomain.nl…the result is that a request ends on my NAS…

It seems to be that the Let’s Encrypt certificate is correctly installed.

What could be a possible solution? I have read many topics on the ha-community but did not find an answer…

Kind regards,
Pim.

Forward port 443 to nginx

Use xxxxx.subdomain.nl for homeassistant

Use yyyyyy.subdomain.nl for your NAS.

Let nginx route to the correct internal host based on the the prefix.

Thank you for your quick answer!

First part succeeded :slight_smile:

However, adding a redirection host for the NAS failed, probably due to a certificate problem. The subdomain for the NAS already used a Lets Encrypt certificate. Should I remove this?

Yeah, just let nginx handle the encryption for all subdomains. It should generate a separate certificate for each.

Thanks again…but still the notification: Problem with the verification of the certificate detected.

What mistake have I made?

I don’t know, I don’t have access to your network to see how it is setup :man_shrugging: