Installing HACS is tricky in Docker, but the documentation is very straightforward when you know how to read

HASS latest version in Docker in Ubuntu server in VM on a Dell Server. For all intents and purposes it runs VERY well except for installing new things that it doesnt want (my instance is sentient and has a bit of an attitude)

sudo wget -O - https://get.hacs.xyz | bash -
results in Permission Denied no matter how I have my permissions set, chmod 777, chown

how do you install this manually?

I don’t know the answer of your question but you just lack of knowledge how to get sudo permission, for me, i has worked at first trial. So, no need to generalize.

Moreover, keep in mind that you are passing outside core home assistant, so expect more and more advanced stuff, it will not decrease.

Independent of HACS, just check if any command would work with SUDO, which is elevating permissions into super user.

I do not in fact lack a knowledge on how to get sudo permissions. though I may be a bit rusty on passing docker permissions since none of my 3 linux certifications really cover that. I appreciate the insight and speculations though

I don’t see sudo in any commands in HACS installation page. I am just stating that it is not about it sucks how to install HACS, it is just matter or missing pieces you will find out soon.

Where are you running this command?

1 Like

This got me thinking [THANK YOU]; commands and files I can usually run and drop directly from the Ubuntu host and interact with the docker environment was not functioning as expected the solution is:

sudo docker exec -it [dockername] bash
wget -O - https://get.hacs.xyz | bash -

This works and the rest is very straightforward as expected.

2 Likes

Exactly as the docs say :slight_smile:

can you show me where? I was unable to find that anywhere here https://hacs.xyz/

You have to click on container, which is your install type, then it gives you two options, one of which says ‘contanier’ again.

1 Like

there it is, I missed the second container header for like 6 hours. ugh its been a long day! Thanks for the extra pair of eyes, sometimes we need more than one

1 Like

Works for you maybe, but clearly not in every instance:

root@HAdebiandrive:~# sudo docker exec -it homeassistantnew bash
bash-5.1# wget -O - https://get.hacs.xyz | bash -
Connecting to get.hacs.xyz ([2606:4700:3031::ac43:8f2c]:443)
Connecting to raw.githubusercontent.com ([2606:50c0:8003::154]:443)
writing to stdout
-                    100% |********************************|  2742  0:00:00 ETA
written to stdout
INFO: Trying to find the correct directory...
INFO: Found Home Assistant configuration directory at '/config'
INFO: Changing to the custom_components directory...
INFO: Downloading HACS
Connecting to github.com (192.30.255.112:443)
wget: bad address 'github.com'
bash-5.1# ping github.com
PING github.com (192.30.255.113): 56 data bytes
64 bytes from 192.30.255.113: seq=0 ttl=47 time=37.137 ms
64 bytes from 192.30.255.113: seq=8 ttl=47 time=31.425 ms
64 bytes from 192.30.255.113: seq=9 ttl=47 time=30.999 ms

EDIT: I tried four more times, getting different errors each time, and on the fourth time, it worked.

I then restarted my homeassistant machine, and now homeassistant will not start at all. Logs show 2023-01-12 22:41:18 ERROR (MainThread) [homeassistant.loader] Unable to resolve dependencies for hacs: we are unable to resolve (sub)dependency repairs, as reported by several users on HA doesn't start after HACS update. I now do not have a usable homeassistant install at all anymore. Restarting the machine doesn’t help.

EDIT 2: Following the below comment, I have opened an issue for this at Installing HACS completely disables homeassistant · Issue #2992 · hacs/integration · GitHub.

re-enter the container and try again.

or do what @ludeeus asks and post an issue on his github.

Thanks—sorry, who is @ludeeus and what is the URL to his github? I don’t see anybody by that name in this conversation.

EDIT: NVM, posting this question linked me to his profile, I found it.

I find it annoying that on every restart of HASS that HACS has to reinstall all of its python/pip dependencies making HASS startup time slow, so… If you are comfortable with your own Dockerfile and building your images before you restart, here is a trick to reduce that startup time, this Dockerfile needs to be run in your host/HASS primary configuration directory.

FROM badouralix/curl-jq:latest AS pip

ADD custom_components /config/custom_components

RUN cat /config/custom_components/*/manifest.json | jq -rs '.[].requirements[]' > requirements.txt

FROM ghcr.io/home-assistant/home-assistant:stable

COPY --from=pip requirements.txt /

RUN pip install -r /requirements.txt
2 Likes