BitWarden - self hosted password manager using vaultwarden/server image

Docker BitWarden - self hosted password manager using vaultwarden/server image

are there firewall rules other than the http & websocket ports to be added to allow BW_RS to send mails ?
No, I have none of them. What comes to mind is that you might have a problem with your LAN devices using the FQDN name of your BW setup while inside your LAN. What I mean is, are you sure that you can access your BW public URL from within your LAN? If this is not working it might explain the error. Still not sure what the lookup address this error is referring to.
 
This could also be a DNS problem as well that your BW container has problem resolving gmail smtp.

Open up a bash command line inside your BW container and try and ping smtp.gmail.com do you get any response? Errors?

In case there is no ping command in BW container, install it via bash 1st:

Code:
apt-get update
apt-get install iputils-ping
 
Last edited:
What comes to mind is that you might have a problem with your LAN devices using the FQDN name of your BW setup while inside your LAN. What I mean is, are you sure that you can access your BW public URL from within your LAN
You are right, I use the public fqdn:bw_port to access BW within my LAN (and also from outside) and it works

Open up a bash command line inside your BW container and try and ping smtp.gmail.com do you get any response
Well I was able to open bash command line but today, it drops and error stating "socket closed" and I don't know why. But from what I can remember when I tried to ping I had an error telling that ping (or even nslookup) command is not recognized

EDIT : Searching for the "Socket closed" error while trying to open the terminal of a docker container I found a reddit post which makes me think that my RP configuration might not be right. I don't have access to my NAS in SSH right now so can't check but I will check when I'm home
 
Docker mounts (or copies?) the resolv.conf from the host into the container.
That's what I assumed so I changed it directly in my host and the modification was also effective inside my container after a restart.
 
If that is the case you will have to see what dns settings your docker is using and by that I mean your NAS. If BW has dns problem, it could be very well that all your other containers have the same.

In that case, docker will relay on your NAS DNS settings.
 
it could be very well that all your other containers have the same
BW is my only container, that's my 1st experience with docker also.
I think that's why I struggle :)
And just for reference, there seems to be no DNS issue with my NAS since it's able to send mails, access the synology repos for package updates, update my DDNS with my IP etc ... So that's why I was wondering why my container seems to not be able to resolve smtp.gmail.com
 
There is a way to "hook into" another contains namespace and share its network interface. Quite helpfull if a troubled container does not provide any tools for troubleshooting...

docker run -it --rm --network container:<container_name> nicolaka/netshoot
Just make sure to replace <container_name> with the id or name of your bw container.
 
BW is my only container, that's my 1st experience with docker also.
I think that's why I struggle :)
And just for reference, there seems to be no DNS issue with my NAS since it's able to send mails, access the synology repos for package updates, update my DDNS with my IP etc ... So that's why I was wondering why my container seems to not be able to resolve smtp.gmail.com
Fair point, but still your NAS layer and Docker layer could be out of sync so to speak. You should really try and get into your bw container, install ping if it missing and give it a go. Or use the method that King mentioned.
 
Code:
root@bitwardenrs:/# ping smtp.gmail.com                                                                                             
bash: ping: command not found                                                                                                       
root@bitwardenrs:/# apt-get update                                                                                                   
Err:1 http://security.debian.org/debian-security buster/updates InRelease                                                           
  Temporary failure resolving 'security.debian.org'                                                                                 
Err:2 http://deb.debian.org/debian buster InRelease                                                                                 
  Temporary failure resolving 'deb.debian.org'                                                                                       
Err:3 http://deb.debian.org/debian buster-updates InRelease                                                                         
  Temporary failure resolving 'deb.debian.org'                                                                                       
Reading package lists... Done                                                                                                       
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'deb.debian.org'                 
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease  Temporary failure resolving 'security.d
ebian.org'                                                                                                                           
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'deb.debian.org'         
W: Some index files failed to download. They have been ignored, or old ones used instead.

I definitely have name resolution issues with the container ...
 
Last edited:
docker run -it --rm --network container:<container_name> nicolaka/netshoot
Since I'm very new to docker, I would like to understand exactly what this command will do

EDIT : ok, a quick search and I understand it will launch a netshoot container but I'm not sure what to do after
 
Code:
root@bitwardenrs:/# ping smtp.gmail.com                                                                                            
bash: ping: command not found                                                                                                      
root@bitwardenrs:/# apt-get update                                                                                                  
Err:1 http://security.debian.org/debian-security buster/updates InRelease                                                          
  Temporary failure resolving 'security.debian.org'                                                                                
Err:2 http://deb.debian.org/debian buster InRelease                                                                                
  Temporary failure resolving 'deb.debian.org'                                                                                      
Err:3 http://deb.debian.org/debian buster-updates InRelease                                                                        
  Temporary failure resolving 'deb.debian.org'                                                                                      
Reading package lists... Done                                                                                                      
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'deb.debian.org'                
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease  Temporary failure resolving 'security.d
ebian.org'                                                                                                                          
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'deb.debian.org'        
W: Some index files failed to download. They have been ignored, or old ones used instead.

I definitely have name resolution issues with the container ...
Regarding the need to resolve gmail smtp you could mitigate it by adding the ip address instead of smtp.gmail.com as the value for the variable.

Still this will solve the email docker problem for BW container but you need to look into this problem or you will have the same problem for any other container that needs web access. Open up a separate topic on the matter and we can troubleshoot it there considering it’s unrelated to BW in general.
 
Regarding the need to resolve gmail smtp you could mitigate it by adding the ip address instead of smtp.gmail.com as the value for the variable.
I have tried this already but did not seem to work when I tried. That was before I started all over from scratch...
I'm gonna give it a try.
For the separate topic I thought of it a few hours ago since I feel like I'm hijacking this one with my issue :s
 
All commands Rusty asked you to run in the bitwarden container can be run in the netshoot container. Since they use the same network interface, the result will be identical to what you would get in the bitwarden container (if the tools would exist there).
 
Problem solved,
Turns out I had one firewall rule missing :
screenshot-2019-12-04-at-21-37-11-png.722

@Rusty , you might want to add this in the tutorial so docker noobs like myself won't be lost

Thank you all
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top