udarnick
(Peter Boivin)
May 29, 2021, 6:36pm
1
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?
Tinkerer
(aka DubhAd on GitHub)
May 29, 2021, 7:10pm
2
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”.
udarnick
(Peter Boivin)
May 29, 2021, 10:59pm
4
How should I port forward
-p 8123:80
-p 80:8123
-p 8123:8123
?
udarnick
(Peter Boivin)
May 29, 2021, 11:03pm
5
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
.
Tinkerer
(aka DubhAd on GitHub)
May 31, 2021, 8:11am
7
They don’t list it because like Windows, macOS doesn’t support host mode networking so it isn’t officially supported.
1 Like