HomeAssistant docker compose start but frontend is not available

Hi, I’m running home assistant container on linux POP OS with docker compose (docker compose up -d).
This is my compose file:

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - ./homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host

The container start correctly, these are the logs:

2022-11-20 14:51:35 s6-rc: info: service s6rc-oneshot-runner: starting
2022-11-20 14:51:35 s6-rc: info: service s6rc-oneshot-runner successfully started
2022-11-20 14:51:35 s6-rc: info: service fix-attrs: starting
2022-11-20 14:51:35 s6-rc: info: service fix-attrs successfully started
2022-11-20 14:51:35 s6-rc: info: service legacy-cont-init: starting
2022-11-20 14:51:35 s6-rc: info: service legacy-cont-init successfully started
2022-11-20 14:51:35 s6-rc: info: service legacy-services: starting
2022-11-20 14:51:35 services-up: info: copying legacy longrun home-assistant (no readiness notification)
2022-11-20 14:51:35 s6-rc: info: service legacy-services successfully started

But when i try to navigate http://127.0.0.1:8123/ I have the “Unable to connect” error.

If I run docker compose with sudo all works fine (sudo docker compose up -d).

My user is already in the docker group, indeed I can run docker commands without sudo.

Check ./homeassistant/config to see if files were created there. There should be at least configuration.yaml, home-assistant_v2.db, and home-assistant.log

Hi, yes those files are in the config folder.

Try using the LAN IP rather than 127.0.0.1

I think my problem is this:

homeassistant  | 2022-11-27 15:39:34.919 ERROR (MainThread) [zigpy.application] Couldn't start application
homeassistant  | Traceback (most recent call last):
homeassistant  |   File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open
homeassistant  |     self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
homeassistant  | FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB0'

I’m running the container in priviliged mode, but I still have this error if I didn’t run it with sudo.
Why?