Settings Seem To Be Ignored In docker-compose.yml #1714

Closed
opened 2025-10-09 17:26:48 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @yuljk on GitHub.

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. 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!
OVERLORD added the better for forum label 2025-10-09 17:26:48 +03:00
Author
Owner

@yuljk commented on GitHub:

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...

@yuljk commented on GitHub: 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: See https://docs.docker.com/compose/environment-variables/
Author
Owner

@jjlin commented on GitHub:

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

@jjlin commented on GitHub: Your env file might be in the wrong format, see https://docs.docker.com/compose/env-file/
Author
Owner

@jjlin commented on GitHub:

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

@jjlin commented on GitHub: `environment` is a list; each entry under it needs a `-`.
Author
Owner

@yuljk commented on GitHub:

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

Kind Regards

@yuljk commented on GitHub: Ahh, many thanks @jjlin - Which category would I specify ENV_FILE? Kind Regards
Author
Owner
@yuljk commented on GitHub: I'm using https://github.com/dani-garcia/bitwarden_rs/blob/master/.env.template
Author
Owner

@dennisgerding commented on GitHub:

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

@dennisgerding commented on GitHub: 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:

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

@yuljk commented on GitHub: 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:

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

@yuljk commented on GitHub: Nevermind! - All sorted, reconfigured my HAProxy backend to listen on port 8000.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1714