Remote access while port 80 and 443 used by other application

Hi guys,
This is my first post. I have been playing with Hassio on raspberry pi and everything works pretty good within my home network.
So I decided to move to next step so that I can access it from outsite. There are some threads and tutorial which are really helpful using duckdns to do it. But I’m afraid my case is bit different.
I have a static IP address and I have already used 80 and 443 for Nextcloud.
My current setup is I have a domain, lets say, pointing to my ip address for nextcloud server. I have setup the letsencrypt for that service.

Therefore, when I point duckdns to my ip, it will pick up the nextcloud page and letsencrypt certificate.

Is it possible to assign a letsencrpty certificate to a port and connect the port to another subdomain.
So I can use to access my home assistant on my ip:8123?

I have a feeling that this requires a lot of works. But to be honest, all I need is to access home assistant from my android app. Any other way to achieve it is also welcome.

Thank you.

Nabu Casa cloud?
Or use a reverse proxy like Caddy will also work.

Hey, you can also use nginx. You point from the web to your main ip address where your domain with nginx is installed. In the config file which looks like this you can add a “location”. Its easy to find how to configure this file. At the end you will have something like:

location /home-assistant {
 proxy_pass your_ip:8123

Home Assistant doesn’t work with url paths like that. It has to be a domain/subdomain.

Thank you guys for your suggestion!
I will try reverse proxy sometime when I’m free.
Very appreciated!!

This is the exact setup I have , I have a Nextcloud server using Nextcloudpi (on an Odroid HC1)
which as you say uses port 80 and 443 for Lets encrypt. I have a Duckdns domain name for example . pointing to Nextcloud and then I have Hassio on another Odroid HC1 running the duckdns addon which includes Lets encrypt, but does not use port 80 or 443 for the certificate verification .
It uses a script I think to achieve it although though I would have to spend some time trying to find where I discovered this info .

The difference is I set up another Duckdns name say for example to point to the server but if I access this it shows the nextcloud server until I add port 8123 to the end like this and then it shows the Home assitant server.

The addon takes care of the rest and the certificate gets updated every 3 months or something like that.

as long as your router forwards from outside 8123 to inside your network to 8123 on what ever IP you have for home assistant and Nextcloud is port forwarded 80 and 443 to the IP of Nextcloud server.

it does explain it a little on the addon page .

But the main thing I found was I needed to add :8123 to the end of url to connect to home assitant and not nextcloud

Otherwise you get a page like this

1 Like