Environment Variables aren't processed if running Docker binary normally #2044

Closed
opened 2026-04-06 02:51:21 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @DUOLabs333 on 7/26/2022

Subject of the issue

If I run vaultwarden/server:latest with source /etc/.env; /start.sh or source /etc/.etc; /vaultwarden, the new environment variables aren't used (DATA_FOLDER is still /data, and it is using a sqlite database, not my postgres one.

Deployment environment

  • vaultwarden version: 1.25.1
  • Install method: Docker image, but run manually in a chroot (the compiled version --- it's too old to show the version number at start-up --- does not have this problem).

  • Clients used:

  • Reverse proxy and version:

  • MySQL/MariaDB or PostgreSQL version:

  • Other relevant details:

Steps to reproduce

  1. Download the tar ball of the docker image
  2. Chroot into it and make an /etc/.env file with DATA_FOLDER=/etc/data.
  3. Copy /data to /etc/data.
  4. Run source /etc/.env; /start.sh.
  5. See that the data folder used is not /etc/data

Expected behaviour

The variables in /etc/.env are not respected.

Actual behaviour

Troubleshooting data

*Originally created by @DUOLabs333 on 7/26/2022* <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue If I run `vaultwarden/server:latest` with `source /etc/.env; /start.sh` or `source /etc/.etc; /vaultwarden`, the new environment variables aren't used (`DATA_FOLDER` is still `/data`, and it is using a sqlite database, not my postgres one. ### Deployment environment <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> * vaultwarden version: 1.25.1 <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: Docker image, but run manually in a chroot (the compiled version --- it's too old to show the version number at start-up --- does not have this problem). * Clients used: <!-- web vault, desktop, Android, iOS, etc. (if applicable) --> * Reverse proxy and version: <!-- if applicable --> * MySQL/MariaDB or PostgreSQL version: <!-- if applicable --> * Other relevant details: ### Steps to reproduce 1. Download the tar ball of the docker image 2. Chroot into it and make an `/etc/.env` file with `DATA_FOLDER=/etc/data`. 3. Copy `/data` to `/etc/data`. 4. Run `source /etc/.env; /start.sh`. 5. See that the data folder used is not `/etc/data` ### Expected behaviour The variables in `/etc/.env` are not respected. ### Actual behaviour <!-- Tell us what actually happened --> ### Troubleshooting data <!-- Share any log files, screenshots, or other relevant troubleshooting data -->
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#2044