#Changing the environment variables used to run an addon's container

1 messages · Page 1 of 1 (latest)

drowsy ravine
#

how do I change the environment variables used to run an addon? I'm trying to configure vaultwarden and it requires that some settings be set via envvar.

solid granite
#

I don't think you can. Not directly. Which settings?

drowsy ravine
# solid granite I don't think you can. Not directly. Which settings?

A great many of them, apparently. I've done a bit of source-diving to figure out how I'm supposed to affect the envvars of the VaultWarden process, and from the looks of the addon's source, the expected way is to pass them to the container itself; the with-contenv helper in the shebang causes that script to inherit whatever envvars the container was started with

GitHub

Vaultwarden (Bitwarden) - Home Assistant Community Add-ons - hassio-addons/addon-bitwarden

dense field
drowsy ravine
# dense field See step 6 in the docs <https://github.com/hassio-addons/addon-bitwarden/blob/ma...

That's the page I screenshotted above, the one which explicitly says "these settings require a restart and must be set with environment variables". When you say that those options can't be set with this addon, are you speaking from personal experience, having attempted to set them yourself (Github tells me that you were a contributor some years back, so I assume you have it installed)? Or are you only saying that from having looked through the documentation just now?

If those options can't be set, then push notifications can't be enabled, and that means no autosyncing vaults to mobile, apparently. If there truly is no way to set the environment variables used to start an addon container, then I might need to file a PR against the addon in order to expose that functionality via the config UI, but I'd really rather keep the source hacking to a minimum if at all possible.

dense field
#

In summary, if you aren't happy with the addon implementation, fork it, or run it elsewhere.

drowsy ravine
#

I'm just so new to this platform that I don't even know where to look yet

solid granite
drowsy ravine
#

if this were, say, a docker or k8s cluster that I was managing, I'd know where to start looking, but I just have no idea how Hass's containers are configured

solid granite
#

But the addon does not seem to allow you to set these.

drowsy ravine
#

rrrright, which is why I'm asking for where in HA itself to go to configure that environment

#

I feel like I'm saying the same thing over and over again, which usually means I'm not saying something right

#

but I'm not sure how to say it better

solid granite
#

Addons are managed by the supervisor. I'm not aware lf an option to configure this outside of the addon settings.

drowsy ravine
solid granite
#

I understand what you want but I'm afraid this is not supported by HAOS unless the developer of the addon allows it.

drowsy ravine