Is Docker the only supported method of installing Home Assistant container

Hello,

I have installed Home Assistant using the Core method, which is becoming deprecated.

I think about migrating to Container installation method.
Because I would prefer to use unprivileged container E.G. to have all files owned by non-root user, I think about running my HA container with Podman.

In the documentation, instructions are for Docker.
Does it mean it is the only supported method for container installation I.E. if I have an issue and use Podman, could I have the reply my method is not the officially supported one?

The documentation doesn’t specify docker. It only gives it as an example of container orchestration.

Many issues are unrelated to install method

If you’re asking about why your Bluetooth dongle isn’t seen by system you may get that response but many people will still help.

If your asking about why an automation doesn’t work your install method should not really be a question

I wouldn’t be too concerned.

2 Likes

On the flip-side, I have HAOS installed and I tend to only offer answers to questions from people also using HAOS because there might be something I’m unaware of with other methods. I know on at least one occasion I’ve pointed somebody in the direction of an addon when they weren’t using Supervisor - not helpful. So you might find others do the same - but this would be even more so for Core too. So I’d be saying why not just install HAOS, perhaps virtualized.

3 Likes

Thanks for your replies.

About HA OS: I prefer to keep most control I can to my machine so I think container is the best compromize. No need for a virtual machine, the most part is managed by the host and only HA is containerized. Only my opinion.

I understand in case of asking help here, sure it won’t change a lot because the most part won’t concern installation method.

Which make another point coming to my mind: what about submiting issue on GitHub? Will it change something about how it will be managed if I use docker or an unprivileged Podman container?

I would compare it to HA core, where I read starting it using SystemD is not supported when nothing was documented to start HA OS automatically in the official documentation.

For HA container, Docker is taken as an example but what happens for other like Podman when submitting an issue on GitHub?

1 Like

In support orgs they would ask you to attempt to repro your issue in a vanilla environment without podman if it still breaks podman isn’t involved. Accept the case otherwise bump it.

This is literally how MS Premier has done it since they started. I don’t expect Nabu / HA dev teams to be any different even on open source

Its not that they don’t like podman it’s expensive to ‘support’ every case known to man and lines need to draw somewhere.

1 Like

The official install guide says you should use priviliged mode without saying why/when it’s needed. So I don’t think support from the HA team has high value. I’m using the linuxserver.io version because their readme files actually explain each option. Most of their containers use the root user for setup and then run the app with the uid/gid you specify. Some of them have been migrated to support the user option but last time I checked, HA was not one of them. The config files will still be owned by the user you specify, so I think it fits your needs.

2 Likes

Same is true for the official HA container.

There is always value but honestly most people looking to run non root user, unprivileged container or non host networking probably will not need it.

1 Like

Can you elaborate?
I don’t see how to do it in the documentation.
Specifying uid and gid requires another implementation as fare as I know.

What I refer is what about if something change between version and makes a regression? The example I encountered with HA core was UV which required to change the SystemD unit file but using a SystemD unit file is not oficialy supported. If a similar cas happens with a container installation, what is supported or not?

You try to reproduce your issue without that part. The thing you have to do in ALL cases is isolate down to the component(s) that is causing the issue so. In essence is there a different way of doing it in a supported manner and if it works when you do it that way. Then your case is invalid. If it’s still broken it’s valid and your method does not matter to the case. (that’s exactly how they will determine support)

I would like to add another consideration. HA not being the easiest of things to maintain, if the main operator is absent/seriously_ill/dead then you may need an installation that also the lesser advanced in the family can operate. I found containers impossible to explain to people that only need to see that once every few years and creating a manual is a lot of work. I believe that the HAOS is easier to maintain as most of it is graphics, not text on black screen…this may still be impossible to manage but less a risk, just my 2cts.
I will migrate to HAOS from docker, only for this reason

1 Like

Yeah a point a lot of us simply don’t like to talk about. But survivability of my system is built in on day 1.

I run HAOS in a virtual machine (VirtualBox). I think that would classify as a container.

The host OS I’m using is Ubuntu. (Windows, Mac and Solaris can also host.) There is a cookbook instructions somewhere that can get HAOS running in the virtual machine if you find the HA installation documentation troublesome (headless installation instructions).

The challenge comes when adding a dongle, like Z-Wave, Zigbee, MySensors Serial Gateway, etc. (I have all three) Essentially your assigning a USB port to the virtual machine. It’s not too difficult once you see what’s going on.

VB leaves Ubuntu to run other programs. I’m running an MQTT broker, an irrigation controller front end (SIP Sustainable Irrigation Platform) and an self written energy data aggregator.

I’ve had a few mysterious glitches, but no more than any other person running HA has had. The worst was during a power outage where the power went off and on several times with in five minutes.

I create Homeassistant user and group on host system. 1002
add user to needed groups for device/system access. Dialout is really only group i add. I dont use bluetooth on server.

I add user in docker compose as shown below.
Honestly I check dockerfile and see nothing that indicates “user” should work but seems it does.

##########################################
#           HOMEASSISTANT                #
##########################################
  homeassistant:
    container_name: homeassistant
    hostname: homeassistant
    user: 1002:1002    
    privileged: false
    restart: unless-stopped
    stop_grace_period: 10s
    depends_on:
      - mariadb    
    image: ghcr.io/ghcr.io/home-assistant/home-assistant:2025.4.4
    volumes:
      - "/srv/docker/homeassistant/config:/config"
      - "/etc/localtime:/etc/localtime:ro"
#    ports:
#      - "8123:8123/tcp" # HA UI
#    environment:
#      PGID: 1002 #does not work for HA
#     PUID: 1002 #does not work for HA
    networks:
      homeassistant:
      macvlan30_net:
        mac_address: "02:42:0a:3c:1b:f1"
        ipv4_address: "192.168.30.15"

From host

user@srvxd:/srv$ docker inspect $(docker ps -q) --format '{{.Config.User}} {{.Name}}'
1002:1002 /homeassistant

inside container

homeassistant:/config$ ps ax
PID   USER     TIME  COMMAND
    1 1002      0:00 /package/admin/s6/command/s6-svscan -d4 -- /run/service
   19 1002      0:00 s6-supervise s6-linux-init-shutdownd
   21 1002      0:00 /package/admin/s6-linux-init/command/s6-linux-init-shutdownd -d3 -c /run/s6/basedir -g 3000 -C -B
   28 1002      0:00 s6-supervise s6rc-fdholder
   29 1002      0:00 s6-supervise s6rc-oneshot-runner
   37 1002      0:00 /package/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ipcserver-access -v0 -E -l0 -i data/rules -- /package/admin/s6/command/s6-sudod -t 30000 -- /package/admin/s6-rc/command/s6-rc-o
   69 1002      0:00 s6-supervise home-assistant
   70 1002      0:44 python3 -m homeassistant --config /config
  844 1002      0:00 bash
  850 1002      0:00 ps ax

docker deamon is still running as root.
There is a way to change that but i havent dont that

1 Like