Anything special to do to start on docker?

I followed these instructions on my Mac:

docker run --init -d \
  --name homeassistant \
  --restart=unless-stopped \
  -v /etc/localtime:/etc/localtime:ro \
  -v /Users/<myusername>/Documents/homeassistant:/config \
  --network=host \
  homeassistant/home-assistant:stable

the image started successfully. I attempted to go to

http://192.168.0.85:8123/
http://localhost:8123/
http://homeassistant.local:8123/

This error occurred over and over:

# This site can’t be reached

Check if there is a typo in homeassistant.local.

DNS_PROBE_FINISHED_NXDOMAIN

Do I need to expose the ports in docker?

Well, the problem is that Docker on the Mac doesn’t support host networking. You need to explicitly pass the port (8123) through - and be aware that any integration that uses mDNS or similar (such as cast) won’t work.

Did you follow the official instructions for MacOS ? I would not call following the instructions special, so the answer to the topic question would be “No”.

How should I port forward
-p 8123:80
-p 80:8123
-p 8123:8123
?

I got it working. For anyone in the future here is the docker setup:

docker run --init -d \
  --name homeassistant \
  --restart=unless-stopped \
  -p 8123:8123 \
  -v /etc/localtime:/etc/localtime:ro \
  -v /Users/peterboivin/Documents/homeassistant:/config \
  homeassistant/home-assistant:stable

For some reason they do not list Home Assistant Container for MacOS.

Here are the installation instructions for Linux Instead of pos\rt forwarding they use network=host.

They don’t list it because like Windows, macOS doesn’t support host mode networking so it isn’t officially supported.

1 Like