[GH-ISSUE #992] Settings Seem To Be Ignored In docker-compose.yml #704

Closed
opened 2026-03-03 02:02:22 +03:00 by kerem · 9 comments
Owner

Originally created by @yuljk on GitHub (May 11, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/992

Hi - I've configured my docker-compose.yml as per below:-

# docker-compose.yml
version: '3'

services:
 bitwarden:
  image: bitwardenrs/server
  restart: always
  volumes:
      - /etc/bitwardenrs/bw-data:/data
  environment:
    LOG_FILE: /data/bitwardenrs.log
    LOG_LEVEL: debug
    INVITATIONS_ALLOWED: "true"
    SIGNUPS_ALLOWED: "true"
    SIGNUPS_VERIFY: "true"
    SHOW_PASSWORD_HINT: "true"
    DOMAIN: https://vault.mydomain.com
    ADMIN_TOKEN: KedoCWHw8SLgq8X7p1nNz7lFqex6UwMxi7R6pvOfmAOaxzCalnaJjWjMOz0F1b1p
    SMTP_HOST: someip
    SMTP_FROM: vault.mydomain.com
    SMTP_PORT: 25
    SMTP_SSL: "false"
  ports:
    - 443:80

However, after running docker-compose up -d, Many of my settings are ignored. I am able to create an account without email verification, the admin page is asking me to create a token still etc.

The log file is generated, so that's a start I guess!

Is there some syntax issue I'm not seeing here?

I also tried specifying an .env file and configuring my settings there instead, however it never seems to be read.

Like so ENV_FILE: /etc/bitwardenrs/bw-data/bitwardenrs.env

Any help greatly appreciated!

Originally created by @yuljk on GitHub (May 11, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/992 Hi - I've configured my docker-compose.yml as per below:- ``` # docker-compose.yml version: '3' services: bitwarden: image: bitwardenrs/server restart: always volumes: - /etc/bitwardenrs/bw-data:/data environment: LOG_FILE: /data/bitwardenrs.log LOG_LEVEL: debug INVITATIONS_ALLOWED: "true" SIGNUPS_ALLOWED: "true" SIGNUPS_VERIFY: "true" SHOW_PASSWORD_HINT: "true" DOMAIN: https://vault.mydomain.com ADMIN_TOKEN: KedoCWHw8SLgq8X7p1nNz7lFqex6UwMxi7R6pvOfmAOaxzCalnaJjWjMOz0F1b1p SMTP_HOST: someip SMTP_FROM: vault.mydomain.com SMTP_PORT: 25 SMTP_SSL: "false" ports: - 443:80 ``` However, after running docker-compose up -d, Many of my settings are ignored. I am able to create an account without email verification, the admin page is asking me to create a token still etc. The log file is generated, so that's a start I guess! Is there some syntax issue I'm not seeing here? I also tried specifying an .env file and configuring my settings there instead, however it never seems to be read. Like so ENV_FILE: /etc/bitwardenrs/bw-data/bitwardenrs.env Any help greatly appreciated!
kerem 2026-03-03 02:02:22 +03:00
Author
Owner

@jjlin commented on GitHub (May 11, 2020):

environment is a list; each entry under it needs a -.

<!-- gh-comment-id:626932886 --> @jjlin commented on GitHub (May 11, 2020): `environment` is a list; each entry under it needs a `-`.
Author
Owner

@yuljk commented on GitHub (May 11, 2020):

Ahh, many thanks @jjlin - Which category would I specify ENV_FILE?

Kind Regards

<!-- gh-comment-id:626939750 --> @yuljk commented on GitHub (May 11, 2020): Ahh, many thanks @jjlin - Which category would I specify ENV_FILE? Kind Regards
Author
Owner

@jjlin commented on GitHub (May 11, 2020):

See https://docs.docker.com/compose/environment-variables/

<!-- gh-comment-id:626941062 --> @jjlin commented on GitHub (May 11, 2020): See https://docs.docker.com/compose/environment-variables/
Author
Owner

@yuljk commented on GitHub (May 11, 2020):

Thanks - I've tried the following and the settings are still not being read

`# docker-compose.yml
version: '3'

services:
bitwarden:
image: bitwardenrs/server
restart: always
volumes:
- /etc/bitwardenrs/bw-data:/data
env_file:
- /etc/bitwardenrs/bw-data/bitwardenrs.env
ports:
- 443:80
`
I'm totally confused, the documentation suggests this should work...

<!-- gh-comment-id:626974392 --> @yuljk commented on GitHub (May 11, 2020): Thanks - I've tried the following and the settings are still not being read `# docker-compose.yml version: '3' services: bitwarden: image: bitwardenrs/server restart: always volumes: - /etc/bitwardenrs/bw-data:/data env_file: - /etc/bitwardenrs/bw-data/bitwardenrs.env ports: - 443:80 ` I'm totally confused, the documentation suggests this should work...
Author
Owner

@jjlin commented on GitHub (May 11, 2020):

Your env file might be in the wrong format, see https://docs.docker.com/compose/env-file/

<!-- gh-comment-id:626978912 --> @jjlin commented on GitHub (May 11, 2020): Your env file might be in the wrong format, see https://docs.docker.com/compose/env-file/
Author
Owner

@yuljk commented on GitHub (May 11, 2020):

I'm using https://github.com/dani-garcia/bitwarden_rs/blob/master/.env.template

<!-- gh-comment-id:626981727 --> @yuljk commented on GitHub (May 11, 2020): I'm using https://github.com/dani-garcia/bitwarden_rs/blob/master/.env.template
Author
Owner

@dennisgerding commented on GitHub (May 12, 2020):

Did you change settings through the admin panel? Please know that environment variables get overwritten by settings in config.json.

<!-- gh-comment-id:627169156 --> @dennisgerding commented on GitHub (May 12, 2020): Did you change settings through the admin panel? Please know that environment variables get [overwritten](https://github.com/dani-garcia/bitwarden_rs/wiki/Configuration-overview) by settings in ``config.json``.
Author
Owner

@yuljk commented on GitHub (May 12, 2020):

I've scrapped using docker-compose.yml and instead have opted to install the Debian package here https://github.com/greizgh/bitwarden_rs-debian.

I have installed the package and created the systemd service file. Bitwarden_rs starts successfully, however I don't see it listening on ports 80 or 443 when checking netstat -tulpn | grep LISTEN

The Web UI subsequently isn't accessible. Where do I configure the ports in my .env file?

Many thanks

<!-- gh-comment-id:627408273 --> @yuljk commented on GitHub (May 12, 2020): I've scrapped using docker-compose.yml and instead have opted to install the Debian package here https://github.com/greizgh/bitwarden_rs-debian. I have installed the package and created the systemd service file. Bitwarden_rs starts successfully, however I don't see it listening on ports 80 or 443 when checking netstat -tulpn | grep LISTEN The Web UI subsequently isn't accessible. Where do I configure the ports in my .env file? Many thanks
Author
Owner

@yuljk commented on GitHub (May 12, 2020):

Nevermind! - All sorted, reconfigured my HAProxy backend to listen on port 8000.

<!-- gh-comment-id:627424109 --> @yuljk commented on GitHub (May 12, 2020): Nevermind! - All sorted, reconfigured my HAProxy backend to listen on port 8000.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#704
No description provided.