Unable to access ADMIN panel and also send emails

Hi,

Having issue accessing the ADMIN panel after setting the environment variable for ADMIN_TOKEN=string in the docker compose file.

When I go to url/admin, i get the message below:
“The admin panel is disabled, please configure the ‘ADMIN_TOKEN’ variable to enable it”

Also, I have set the environment variable for SMTP settings as below and I am still getting a generic error when trying to send email or request password hints as below:

My docker compose file:

version: '3'

services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: always
    environment:
      - WEBSOCKET_ENABLED=true  # Enable WebSocket notifications.
      - SMTP_EXPLICIT_TLS=true
      - SMTP_PASSWORD='xxx'
      - SMTP_USERNAME='apikey'
      - SMTP_AUTH_MECHANISM='Login'
      - SMTP_SSL=false
      - SMTP_PORT=465
      - SMTP_FROM='xxx'
      - SMTP_HOST='smtp.sendgrid.net'
      - SIGNUPS_ALLOWED=false
      - LOG_FILE='/var/log/vaultwarden.log'
      - SHOW_PASSWORD_HINT=false
      - ADMIN_TOKEN=xxx
    ports:
      - 80:80
    volumes:
      - ./vw-data:/data

Have you run docker-compose up -d after changing those settings? A stop/start will not work.

yes, I have after changing those variables.

Then i suggest to do a down and up -d instead just to be sure

If that doesn’t work. It could be that you have a config.json file in your vw-data which overrides all the env values

You also need to configure a sender identity from your sendgrid account. I had the same problem, everything configured ok in vaultwarden, but the issue was from sendgrid

Also see SMTP Configuration · dani-garcia/vaultwarden Wiki · GitHub

I was able to get the admin portal to work and I can access it. I have looked at the SMTP Configuration in the link provided above and I am still getting an error. Please see screenshots below.

Screenshot from 2022-01-14 10-28-57

I triple checked my API key and it is correct.

Please verify the key starts with SG and also make sure the key has the correct rights.

As described here SMTP Configuration · dani-garcia/vaultwarden Wiki · GitHub

Authentication errors are mostly wrong rights, or invalid copy/paste

@BlackDex,

Hi, yes, it does start with SG.
It does have the right to send mails.

Just to be sure. You did not convert the API Key to base64?
Because it should be just the plain API Key as-is.