Request that environemntal variables override config.json

I was recently helping a friend set this up using my gcloud guide, and at some point he must have accidentally saved the admin console because when he tried to disable it he couldn’t because the token was saved to his config.json.

I know that while in my case (using Docker) it makes sense to have env variables override config.json, it may not for other use cases.

I think the admin page is a problem area for my use case because of this, and I think I’m going to discourage its use entirely because of this. But if env variables would override it I think it would be much better.

@bradford, i understand what you mean.
But that is not really possible because the Admin interface is used to change the configuration at runtime.
Which means it needs to override the env variables and not the other way around.

Also, during starting of bitwarden_rs in the log-file you should see that there are settings overridden.
I’m thinking about a nice way to show this in the admin interface and maybe even show the differences.

Customarily, env var values override the corresponding config file values, so the opposite behavior in bitwarden_rs seems like a common source of confusion. Of course, there are historical reasons for that. Changing the behavior now would potentially break a lot of installations, but one workaround might be to add another config item like env_overrides={true | false} to indicate that the environment overrides the config file for people who prefer that.

Maybe in a future major version, the config system can be revamped to start people off with a barebones config file instead of env vars.