How to fix Docker Home-Assistant [finish] process exit code 256
Problem:
Your Docker container running home-assistant always exits immediately after starting up, with the log being similar to this:
$ docker-compose up
Recreating 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.
homeassistant | [finish] process exit code 256
homeassistant | [finish] process received signal 15
homeassistant | [cont-finish.d] executing container finish scripts...
homeassistant | [cont-finish.d] done.
homeassistant | [s6-finish] waiting for services.
homeassistant | [s6-finish] sending all processes the TERM signal.
homeassistant | [s6-finish] sending all processes the KILL signal and exiting.
homeassistant exited with code 0
Solution
You need to start the container with --privileged=true
if using docker
directly to start up the service, or use privileged: true
if using docker-compose
.
Here’s an example of a working docker-compose.yml
file:
services:
homeassistant:
container_name: homeassistant
restart: unless-stopped
image: ghcr.io/home-assistant/home-assistant:stable
network_mode: host
privileged: true
environment:
- TZ=Europe/Berlin
volumes:
- ./config:/config