# Environment variables being ignored

**URL:** <https://vaultwarden.discourse.group/t/environment-variables-being-ignored/1489>\
**Category:** Help\
**Created:** [February 24, 2022, 10:24am UTC](https://vaultwarden.discourse.group/t/environment-variables-being-ignored/1489 "2022-02-24T10:24:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawid](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@dawid](https://vaultwarden.discourse.group/u/dawid)\
**Post date:** [February 24, 2022, 10:24am UTC](https://vaultwarden.discourse.group/t/environment-variables-being-ignored/1489/1 "2022-02-24T10:24:18Z")

</div>

Hi there,

I’m running Vaultwarden on Docker quite a long time… Initially I’ve set variables in my docker-compose.yml file.

Now I wanted to disable the admin interface by removing the ADMIN\_TOKEN variable and restarting the container. Sadly that wasn’t the case.

Yes, I know about the config.json overriding the Docker vars - regardless if put to the .env or the docker-compose file - but I just removed the ADMIN\_TOKEN from the config.json.

Afterwards the admin page was disabled, but it won’t be enabled again if I put the ADMIN\_TOKEN back to the Docker vars (neither .env nor the yml file).

If I understood correctly, this should have worked as I don’t have any ADMIN\_TOKEN in the config.json anymore?

Would be pretty cool if someone could help me clear these things up.

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [February 24, 2022, 12:35pm UTC](https://vaultwarden.discourse.group/t/environment-variables-being-ignored/1489/2 "2022-02-24T12:35:33Z")

</div>

You are mentioning **restarting** the container.  
Just to be sure, did you do a `docker-compose up -d` or a `docker-compose restart`? because the latter will not re-read the .env file and the old settings will still be there.
