Docker Compose - Portainer Stack v2 - SMTP env Setup #910

Closed
opened 2026-02-04 23:19:25 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @redtripleAAA on GitHub (Jan 23, 2021).

Greetings,

Can you someone please help modify the following docker compose file to include SMTP environment variables please

---
version: "2"
services:
bitwardenrs:
image: bitwardenrs/server:latest
container_name: bitwardenrs
volumes:
- /volume1/docker/BitWardenRS/config:/data/
ports:
- 8100:80
restart: unless-stopped

The setup is working fine on Docker Synology NAS, but having trouble to configure the SMTP settings for the instance.

Link: https://github.com/dani-garcia/bitwarden_rs/wiki/SMTP-configuration

Or do you recommend to run the above just normal and then modify the config.json file manually?
https://github.com/dani-garcia/bitwarden_rs/wiki/Configuration-overview

Thanks

Originally created by @redtripleAAA on GitHub (Jan 23, 2021). Greetings, Can you someone please help modify the following docker compose file to include SMTP environment variables please ``` --- version: "2" services: bitwardenrs: image: bitwardenrs/server:latest container_name: bitwardenrs volumes: - /volume1/docker/BitWardenRS/config:/data/ ports: - 8100:80 restart: unless-stopped ``` The setup is working fine on Docker Synology NAS, but having trouble to configure the SMTP settings for the instance. Link: https://github.com/dani-garcia/bitwarden_rs/wiki/SMTP-configuration Or do you recommend to run the above just normal and then modify the config.json file manually? https://github.com/dani-garcia/bitwarden_rs/wiki/Configuration-overview Thanks
OVERLORD added the better for forum label 2026-02-04 23:19:25 +03:00
Author
Owner

@BlackDex commented on GitHub (Jan 23, 2021):

Hello @ansred,

Just add environment as a key like so:

---
version: "2"

services:
  bitwardenrs:
    image: bitwardenrs/server:latest
    container_name: bitwardenrs
    volumes:
      - /volume1/docker/BitWardenRS/config:/data/
    ports:
      - 8100:80
    restart: unless-stopped
    environment:
      - TZ=Europe/Amsterdam
      - SMTP_HOST=smtp.domain.tld
      - SMTP_FROM=bitwarden@domain.tld
      - SMTP_PORT=587
      - SMTP_SSL=true
      - SMTP_USERNAME=username
      - SMTP_PASSWORD=password

This works with all the options mentioned in this file: https://github.com/dani-garcia/bitwarden_rs/blob/master/.env.template

@BlackDex commented on GitHub (Jan 23, 2021): Hello @ansred, Just add `environment` as a key like so: ```yaml --- version: "2" services: bitwardenrs: image: bitwardenrs/server:latest container_name: bitwardenrs volumes: - /volume1/docker/BitWardenRS/config:/data/ ports: - 8100:80 restart: unless-stopped environment: - TZ=Europe/Amsterdam - SMTP_HOST=smtp.domain.tld - SMTP_FROM=bitwarden@domain.tld - SMTP_PORT=587 - SMTP_SSL=true - SMTP_USERNAME=username - SMTP_PASSWORD=password ``` This works with all the options mentioned in this file: https://github.com/dani-garcia/bitwarden_rs/blob/master/.env.template
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#910