I’m having some issues bringing up the docker version of Home Assistant on my Raspberry Pi (4B). I have copied the sample docker compose file from the documentation and changed the config location. The container loads up when I issue the command but I can’t seem to access it. Does anyone know why?
version: '3' services: homeassistant: container_name: homeassistant image: "ghcr.io/home-assistant/home-assistant:stable" volumes: - ./config:/config - /etc/localtime:/etc/localtime:ro restart: unless-stopped privileged: true network_mode: host
The container comes up when I use
[email protected]:~/Containers/homeassistant $ docker-compose up Starting homeassistant ... done Attaching to homeassistant homeassistant | [s6-init] making user provided files available at /var/run/s6/etc...exited 0. homeassistant | [s6-init] ensuring user provided files have correct perms...exited 0. homeassistant | [fix-attrs.d] applying ownership & permissions fixes... homeassistant | [fix-attrs.d] done. homeassistant | [cont-init.d] executing container initialization scripts... homeassistant | [cont-init.d] done. homeassistant | [services.d] starting services homeassistant | [services.d] done.
but when I try to visit the IP address of my pi in my web browser I get nothing. I can’t even curl it from the pi itself.
[email protected]:~/Containers/homeassistant $ docker-compose up -d Starting homeassistant ... done [email protected]:~/Containers/homeassistant $ docker-compose ps Name Command State Ports --------------------------------------- homeassistant /init Up [email protected]:~/Containers/homeassistant $ curl localhost:8123 curl: (7) Failed to connect to localhost port 8123: Connection refused
However I can open a shell inside the container and curl it from there:
[email protected]:~/Containers/homeassistant $ docker-compose exec homeassistant sh /config # curl localhost:8123 -v * Trying 127.0.0.1:8123... * Connected to localhost (127.0.0.1) port 8123 (#0) > GET / HTTP/1.1 > Host: localhost: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: Tue, 14 Dec 2021 18:15:43 GMT < Server: Python/3.9 aiohttp/3.8.1 < * Connection #0 to host localhost left intact
Just to make sure I’m using the right port I have also added a http section to my
http: server_port: 8123
Unsuprisingly that doesn’t seem to change anything and now I’m at a complete loss. The log file remains completely empty so I’ve run out of ideas. Any help would be appreciated!