[GH-ISSUE #388] Invite mails use localhost as domain #224

Closed
opened 2026-03-03 01:26:54 +03:00 by kerem · 5 comments
Owner

Originally created by @ldidry on GitHub (Feb 8, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/388

The line 72 of the .env.template file says that there is no need to set DOMAIN "Unless you are using U2F, or having problems with attachments not downloading" but without setting up DOMAIN, the invite link in mails uses http://localhost as domain.

This could be fixed either by updating the documentation or using the HTTP headers (Host and Scheme) to find the currently used domain (I don't know if it would work with Docker, I don't know Caddy which is the suggested proxy).

Originally created by @ldidry on GitHub (Feb 8, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/388 The [line 72 of the .env.template file](https://github.com/dani-garcia/bitwarden_rs/blob/master/.env.template#L72) says that there is no need to set `DOMAIN` "Unless you are using U2F, or having problems with attachments not downloading" but without setting up `DOMAIN`, the invite link in mails uses `http://localhost` as domain. This could be fixed either by updating the documentation or using the HTTP headers (Host and Scheme) to find the currently used domain (I don't know if it would work with Docker, I don't know Caddy which is the [suggested proxy](https://github.com/dani-garcia/bitwarden_rs/wiki/Using-Docker-Compose)).
kerem closed this issue 2026-03-03 01:26:55 +03:00
Author
Owner

@mprasil commented on GitHub (Feb 8, 2019):

See documentation for other proxies. As far as I remember you only need to forward the Host header and it should work fine.

<!-- gh-comment-id:461736873 --> @mprasil commented on GitHub (Feb 8, 2019): See documentation for [other proxies](https://github.com/dani-garcia/bitwarden_rs/wiki/Proxy-examples). As far as I remember you only need to forward the `Host` header and it should work fine.
Author
Owner

@ldidry commented on GitHub (Feb 8, 2019):

It didn't work for me with Nginx.

<!-- gh-comment-id:461812415 --> @ldidry commented on GitHub (Feb 8, 2019): It didn't work for me with Nginx.
Author
Owner

@dani-garcia commented on GitHub (Feb 8, 2019):

At the moment we only guess the domain for the attachments, the emails require the DOMAIN variable to be set, the .env file wasn't updated apparently.

We should update the documentation accordingly, and we could also consider using the same domain-guessing for email if possible (For u2f it might not be a good idea, as the authentication can break if the domain changes).

<!-- gh-comment-id:461814400 --> @dani-garcia commented on GitHub (Feb 8, 2019): At the moment we only guess the domain for the attachments, the emails require the `DOMAIN` variable to be set, the .env file wasn't updated apparently. We should update the documentation accordingly, and we could also consider using the same domain-guessing for email if possible (For u2f it might not be a good idea, as the authentication can break if the domain changes).
Author
Owner

@dani-garcia commented on GitHub (Feb 8, 2019):

I updated the env file to better reflect the current situation, and also added the domain guessing functionality to the feature requests issue, so I think this can be closed now. Thanks!

<!-- gh-comment-id:461900407 --> @dani-garcia commented on GitHub (Feb 8, 2019): I updated the env file to better reflect the current situation, and also added the domain guessing functionality to the feature requests issue, so I think this can be closed now. Thanks!
Author
Owner

@ldidry commented on GitHub (Feb 8, 2019):

Thx 👍

<!-- gh-comment-id:461903890 --> @ldidry commented on GitHub (Feb 8, 2019): Thx :+1:
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#224
No description provided.