Hi all, I am new to Pi and HA. I am not sure this topic fitted in this category. If not please let me know.
Here is what happened, I successfully installed the Hassio via docker in Raspbian with Pi4. I was trying to add the feature of remote access with DuckDNS. When I modified the DuckDNS config and configuration.yaml. After restarting the HA system, I cannot access the HA web via phone app or IP address, but I am still able to access the files via samba on my windows computer. Then I checked the container in the portainer, I found the homeassistant container there was not published to ports, like the screenshot shown below. Can I know the fix to republish the container to ports?
I also want to have the answer for how did this happen if I made the issue clear enough? Here I only have the screenshot for my configuration yaml file, the DuckDNS config I did the change as per instruction, which I don’t believe it’s the cause of this issue. Thanks in advanced.
Did you set up port forwarding on your router? Make sure you include the port at the end of the base URL if the external port you forwarded was anything other than 443. Once you set a base URL you have to access with https, even with your LAN IP address. Make sure you have https in the base URL too.
The home assistant containers use host networking so there aren’t any published ports for them. Also, please don’t share code as an image. Share it as text formatted as code.
Thanks @Tediore, I did change the url with port in DuckDNS config, but not with the configuration yaml file. I assume without port it only stops you remote access, but you are still able to use 192.168.1.XX:8123 to access HA web. Is that correct? Or do you mean with http uncomment in yaml file, you cannot use normal way to access the HA web, which is the IP address without HTTP?
I will change to code instead of pic next time, thanks.
I don’t think you should use the port in the DuckDNS config but I don’t have add-ons so I’m not sure.
You need to specify the external port you forwarded in the base URL. So for example, if you forwarded port 10000 external to 8123 internal, you need to put https://your-domain.duckdns.org:10000
as the base URL. If you forwarded 443 to 8123 you can just use https://your-domain.duckdns.org
since 443 is the default port for https.
Once you specify a base URL you can only access over https, even on your local network. So you’d need to use https://192.168.1.x:8123
locally.