Site cannot be reached

Did install via documentation. Page says, " Once the Home Assistant Container is running Home Assistant should be accessible using http://<host>:8123"

  • Ubuntu, Docker, Docker Compose, Portainer (which is accessible).
  • docker ps -a shows two containers: Portainer has entries for ports, HA does not.
  • ss -lntu shows listening ports: 8123 is not displayed.

Any thoughts?

I’m guessing you installed using Docker?

How? docker run, compose file, portainer?

Did you put the HA container into host networking mode?

Docker? yes
Docker run, not compose but I could
HA container is in “my-main-net” not host. (Portainer is using the “my-main-net” network as well.

What did your run command look like?

I should have included this. It right is copied from the documentation page on home-assistant.io:

docker run -d
–name homeassistant
–privileged
–restart=unless-stopped
-e TZ=America/Denver
-v /opt/homeassistant/config:/config
–network= my-main-net

This might also help: Portainer is reporting no published ports:

Ok, so…

  1. You’re not exposing ports, so no ports will be shown
  2. Is that a macvlan network?

No it is not a macvlan. Just normal out of the box stuff (I can always get fancy later).

The portainer compose file specified the port. HomeAssistant said it would install on default presumably without specifying any ports.

I would suggest redoing the compose file and specifying the port.

Then it’s likely just another internal bridge network, which is why you’re having this problem.

It is indeed an internal bridge network. Not sure why Portainer can be accessed but not Homeassistant. I think the problem lies with the installation not setting up listening ports. I will try to wrestle with that or figure out what ports HA needs to have open.

Thanks much.

Ports were not specified in the command line instructions :frowning: I fixed it by:

Portainer > homeassistant > Duplicate/Edit > Network Ports configuration 8123:8123

I need to create a proper YAML file

Thanks for pointing me in the right direction. :persevere:

Keep in mind that as a result any integration that uses SSDP, UPnP, or similar discovery methods… none of those will work.

Host networking mode opens every port between the host and the home assistant container, and removes any network isolation between home assistant and the host. Portainer won’t show ports, because every port is open. You also can’t specify a network for a container in host networking mode, because it uses the network settings of the host. So, you need to remove the line
network= my-main-net

You also need to access home assistant by spelling out the IP, NOT container name. If the host is at 192.168.0.156, your home assistant would be at http://192.168.0.156:8123

When you specify host networking mode, but still can’t access home assistant by the ip of the machine:8123, it can mean docker isn’t set up properly. It can also be a firewall or conflict with some other process on the host machine.

Since you’re running on Ubuntu, did you follow the extra docker post install steps? Can you run docker commands without using sudo?

Also make sure you don’t have multiple versions of docker installed.

1 Like