mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 17:23:04 +03:00
Connection Refused (self-built binary) #2276
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @patoski on GitHub.
Hi, thanks for what looks to be a great project!
I followed the README instructions on how to build my own binary and web-vault which went great (Debian Stretch). When I start bitwarden_rs it seems happy saying "Rocket has launched from https://localhost:8000".
However, whenever I try to connect with "curl https://my.domain.com:8000" (or a web browser) I always get "connection refused" even if I'm on the server.
I'm sure I'm doing something incredibly silly but I can't seem to fix it. I know DNS and my SSL certs are fine because that's working with other things I have running. Below is the script I use to launch bitwarden_rs if that's helpful. Any help is really appreciated. Thanks!
export DOMAIN=https://my.domain.com:8000
export ROCKET_TLS='{certs="/etc/letsencrypt/live/my.domain.com/fullchain.pem",key="/etc/letsencrypt/live/my.domain.com/privkey.pem"}'
./bitwarden_rs
@RomanHargrave commented on GitHub:
I have not used the TLS support in rocket, and I understand that it's not exactly production ready (according to their own documentation, last I checked).
Have you thought of using a reverse proxy, like nginx? It has the added bonus of enabling websocket support when configured properly.
@mprasil commented on GitHub:
Yeah I'd suggest trying without the certs first and see if that works. Any errors in the logs?
@patoski commented on GitHub:
Thanks so much everyone for all the help! I really appreciate it! One interesting thing, launching bitwarden without any environment variables set, Rocket still wants to launch via https and won't accept http requests. When starting bitwarden it says "Rocket has launched from https://localhost:8000" and isn't accessible via http.
I was able to get connected using wget via https while ignoring the (obvious) certificate failure.
If I try to connect via http I get the following:
@dani-garcia commented on GitHub:
It would seem weird for the connection to be refused, even when TLS fails. I would try without TLS first.
Are you trying to access the server from another device? If so, you can't use localhost. You can try setting
ROCKET_ADDRESS=0.0.0.0.Otherwise it might be a firewall problem?
@mprasil commented on GitHub:
I'd also suggest trying with
127.0.0.1instead oflocalhosteven when you're trying to access it locally, just in case your hosts file is borked for some reason.@mprasil commented on GitHub:
You can reverse proxy to
httpsbackend if you want, Rocket/bitwarden_rs doesn't really care. However it should not defaut to TLS on by default. You probably have some extra configuration somewhere (.envfile maybe?) that sets theROCKET_TLSvariable.@patoski commented on GitHub:
Yep, it was a stray .env file. Thanks for all the support all. This app and the community is amazing!
@patoski commented on GitHub:
Ok, I was able to get a normal connection to TLS working with my domain. The entire issue was right in front of me the entire time:
export DOMAIN=https://my.domain.com:8000The mistake was, I should not have added a port number (makes sense in hindsight). For posterity, my entire launch script looks like:
One final question, can I leave things the way they are and still run a reverse proxy or does Rocket need to run as plain old http? If so, how do I do that? Rocket starts with TLS turned on by default for me.