Installation HA core on docker debian fails at startup

Hi everyone,
I just tried to install HA core on docker debian as non-root with the following command line:

docker run -d --name="home-assistant" -e "TZ=Europe/Rome" -v ~/homeassistant:/config -v /run/dbus:/run/dbus:ro --net=host --restart always ghcr.io/home-assistant/home-assistant:stable

but it fails at startup, here’s the log:

2024-10-31 16:52:29 s6-rc: info: service legacy-services: stopping
2024-10-31 16:52:29 s6-rc: info: service legacy-services successfully stopped
2024-10-31 16:52:29 s6-rc: info: service legacy-cont-init: stopping
2024-10-31 16:52:29 s6-rc: info: service legacy-cont-init successfully stopped
2024-10-31 16:52:29 s6-rc: info: service fix-attrs: stopping
2024-10-31 16:52:29 s6-rc: info: service fix-attrs successfully stopped
2024-10-31 16:52:29 s6-rc: info: service s6rc-oneshot-runner: stopping
2024-10-31 16:52:29 s6-rc: info: service s6rc-oneshot-runner successfully stopped
2024-10-31 16:52:32 s6-rc: info: service s6rc-oneshot-runner: starting
2024-10-31 16:52:32 s6-rc: info: service s6rc-oneshot-runner successfully started
2024-10-31 16:52:32 s6-rc: info: service fix-attrs: starting
2024-10-31 16:52:32 s6-rc: info: service fix-attrs successfully started
2024-10-31 16:52:32 s6-rc: info: service legacy-cont-init: starting
2024-10-31 16:52:32 s6-rc: info: service legacy-cont-init successfully started
2024-10-31 16:52:32 s6-rc: info: service legacy-services: starting
2024-10-31 16:52:32 services-up: info: copying legacy longrun home-assistant (no readiness notification)
2024-10-31 16:52:32 s6-rc: info: service legacy-services successfully started
2024-10-31 16:52:34 Traceback (most recent call last):
2024-10-31 16:52:34   File "<frozen runpy>", line 198, in _run_module_as_main
2024-10-31 16:52:34   File "<frozen runpy>", line 88, in _run_code
2024-10-31 16:52:34   File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
2024-10-31 16:52:34     sys.exit(main())
2024-10-31 16:52:34              ^^^^^^
2024-10-31 16:52:34   File "/usr/src/homeassistant/homeassistant/__main__.py", line 207, in main
2024-10-31 16:52:34     with open(fault_file_name, mode="a", encoding="utf8") as fault_file:
2024-10-31 16:52:34          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-31 16:52:34 PermissionError: [Errno 13] Permission denied: '/config/home-assistant.log.fault'
2024-10-31 16:52:34 [15:52:34] INFO: Home Assistant Core finish process exit code 1
2024-10-31 16:52:34 [15:52:34] INFO: Home Assistant Core service shutdown

How can I solve this?
Thank you

Blockquote

You are mounting the volume as read only, so Home Assiststant has no permissions to write to it. Remove that and try again.

1 Like

the dbus is in ro it is ok.

Did you give to the user executing the command the or the group of the user the right to read/write and execute?
As you docker is spinning up, I suppose, you have the non root user in a docker group but then I believe you need to specify the PUID and PUIG in order to make HA work fine.
See this: Improving Docker security - non-root configuration - #8 by thi_baut

If it is a security concern, you need to pay attention to host network as well.
hope it helps.

1 Like

Use macvlan
It’ll avoid the mdns issues you will eventually learn about

1 Like