Hello,
I’m a software developer but new to HomeAssistant. I have HomeAssistant running, or at least appears to be running, via a docker container but I cannot connect to it from my host machine, the WSL VM, or even exec’ed into the container that is running itself.
My setup:
OS Name: Microsoft Windows 10 Home
OS Version: 10.0.19043 N/A Build 19043
Docker version 20.10.11, build dea9396
I started the container using this command:
docker run -d -p 8123:8123 --privileged \
--volume "C:\Program Files\homeassistant:/config" \
--name homeassistant \
--network host \
-e "TZ=America/New_York" ghcr.io/home-assistant/home-assistant:stable
The container stays running and has this in the logs:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Yet none of these load from my browser:
http://localhost:8123
http://127.0.0.1:8123
http://host.docker.internal:8123
And even when I hop into the WSL VM that I’ve configured docker to use (wsl -d Ubuntu
), I just get:
$ curl localhost:8123
curl: (7) Failed to connect to localhost port 8123: Connection refused
$ curl http://127.0.0.1:8123
curl: (7) Failed to connect to 127.0.0.1 port 8123: Connection refused
And even when I exec into the container via docker exec -ti homeassistant /bin/bash
:
# curl -v http://127.0.0.1:8123
* Trying 127.0.0.1:8123...
* Connected to 127.0.0.1 (127.0.0.1) port 8123 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:8123
> User-Agent: curl/7.78.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 302 Found
< location: /onboarding.html
< Content-Length: 0
< Content-Type: application/octet-stream
< Date: Fri, 24 Dec 2021 11:43:38 GMT
< Server: Python/3.9 aiohttp/3.8.1
<
* Connection #0 to host 127.0.0.1 left intact
Which I guess actually looks like it’s connecting to the server, but no data is being returned.