Is there an official list of ports?

I am running home assistant in a container, and I don’t want to use the --net=host option. I want to specify all the required ports for home assistant to work properly.

I know it’s not just port 8123, because when I run it using --net=host it automatically discovers devices on my network, but it doesn’t when only port 8123 is open.

I’ve looked around and found some information, but nothing official.

I know ports 5353, 1900, 1901, 51827 are somehow relevant to services running in home assistant, but I am looking for an official list of ports that will allow me to specify them so I don’t have to use the --net=host option.

Thanks

It depends on what addon’s you’re using. Custom or not. You’ll know once you install the addon, it’ll have the option to turn on a port for external xyz. I don’t think there is a pre defined list because it could literally be anything.

1 Like

I don’t think this is completely valid, because during the installation of HA, without any add-ons installed, the system behaves diffrently if you are using --net=host or -p 8123, as you can see below.

So obviously something is not communicating properly when using -p 8123.

What install method are you using?

These are the two methods I use for installing.

docker pull homeassistant/home-assistant:stable
docker run -d \
 --restart=always \
 --name=homeassistant \
 -h homeassistant \
 -e PUID=1001 \
 -e PGID=1001 \
 -e TZ=Europe/Nicosia \
 --net=host \
 -v homeassistant:/config \
 homeassistant/home-assistant:stable
docker pull homeassistant/home-assistant:stable
docker run -d \
 --restart=always \
 --name=homeassistant \
 -h homeassistant \
 -e PUID=1001 \
 -e PGID=1001 \
 -e TZ=Europe/Nicosia \
 --net=network \
 -p 8123:8123 \
 -v homeassistant:/config \
 homeassistant/home-assistant:stable

Have you found a solution to this ?
I am also not wanting to run as network mode = host

1 Like

You will have to research all the different protocols used to see what ports and type of packets they use.
Port 1900 is SSDP Discovery and uPNP.
Port 5353 is mDNS.
Port 51827 is probably Homekit.
There might be more port for those features/integrations and there might be more features/integrations which use other ports.

Remember that SSDP Discovery, uPNP and mDNS use multicast packets.

Found this whilst setting up Shelly devices.

Unicast port is 5683

Don’t know if that’s helps.