Error configuring SMTP: SMTP_SECURITY is invalid. It needs to be one of the following options: starttls, force_tls or off #628

Closed
opened 2025-10-09 16:42:23 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @mlopezcoria on GitHub.

Hello,

I'm getting this error message in the docker log:

Error loading config:
`SMTP_SECURITY` is invalid. It needs to be one of the following options: starttls, force_tls or off

But I read the documentation and the environment variables seem to be ok:

version: "3.8"

services:
  vaultwarden:
    image: vaultwarden/server:latest
    restart: always
    networks:
        - frontend
    volumes:
        - ./data:/data
    environment:
        - SMTP_HOST=mail.mydomain.com
        - SMTP_FROM=vaultwarden@mydomain.com
        - SMTP_PORT=587
        - SMTP_SECURITY=starttls
        - SMTP_USERNAME=no-reply@mydomain.com
        - SMTP_PASSWORD=areallysecretpassword

volumes:
  data:

networks:
  frontend:
    external: true

I tried changing SMTP_PORT=25 SMTP_SECURITY=off and also SMTP_PORT=465 SMTP_SECURITY=force_tls but log keeps showing the same error.

Am I doing anything wrong?

Originally created by @mlopezcoria on GitHub. Hello, I'm getting this error message in the docker log: ``` Error loading config: `SMTP_SECURITY` is invalid. It needs to be one of the following options: starttls, force_tls or off ``` But I read the documentation and the environment variables seem to be ok: ``` version: "3.8" services: vaultwarden: image: vaultwarden/server:latest restart: always networks: - frontend volumes: - ./data:/data environment: - SMTP_HOST=mail.mydomain.com - SMTP_FROM=vaultwarden@mydomain.com - SMTP_PORT=587 - SMTP_SECURITY=starttls - SMTP_USERNAME=no-reply@mydomain.com - SMTP_PASSWORD=areallysecretpassword volumes: data: networks: frontend: external: true ``` I tried changing `SMTP_PORT=25 SMTP_SECURITY=off` and also `SMTP_PORT=465 SMTP_SECURITY=force_tls` but log keeps showing the same error. Am I doing anything wrong?
Author
Owner

@mlopezcoria commented on GitHub:

I found the problem: I had to docker compose down && docker compose up -d

@mlopezcoria commented on GitHub: I found the problem: I had to `docker compose down && docker compose up -d`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#628