Open
Conversation
altserg
commented
Jan 9, 2026
1. Added possibility to specify the user name, instead of default homeassistant
2. Added possibility to pass extra options to HASS
3. Added chown to the user:group before dropping root capabilities
HASS still complaints about followinf issue, do not know how to fix it. Tried many ways playing with caps, all fail.
Missing required permissions for Bluetooth management: Missing NET_ADMIN/NET_RAW capabilities for Bluetooth management.
Automatic adapter recovery is unavailable. Add NET_ADMIN and NET_RAW capabilities to the container to enable it
Sample docker-compose file:
services:
hass:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
restart: unless-stopped
stop_grace_period: 30s
volumes:
- /home/hass/hass:/config:rw
- /home/hass/tmp/docker/run:/etc/services.d/home-assistant/run:ro
- /home/hass/tmp/hass-venv:/var/tmp/homeassistant-venv:rw
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
- /run/hass:/run/hass
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
privileged: true
security_opt:
- no-new-privileges=true
- apparmor=docker-default
cap_drop:
- ALL
cap_add:
- NET_ADMIN
- NET_RAW
network_mode: host
group_add:
- dialout # Dialout group
environment:
- TZ=Europe/Amsterdam
- USER=hass
- PUID=1004
- PGID=1004
- UMASK=007
- PACKAGES=iputils
- HASS_OPTIONS=${HASS_OPTIONS}
- UV_LINK_MODE=copy
- PIP_CACHE_DIR=/var/tmp/homeassistant-venv/.pip-cache
Requires following changes in docker-compose.yaml: read_only: true tmpfs: - /run:rw,size=4m,mode=0755
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.