When https is enable port for rocket should be 443 #2316

Closed
opened 2025-10-09 17:58:51 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @ghost on GitHub.

Instead of

docker run -d --name bitwarden \
  -e ROCKET_TLS='{certs="/ssl/certs.pem",key="/ssl/key.pem"}' \
  -v /ssl/keys/:/ssl/ \
  -v /bw-data/:/data/ \
  -p 443:80 \
  mprasil/bitwarden:latest

Should be

docker run -d --name bitwarden \
  -e ROCKET_TLS='{certs="/ssl/certs.pem",key="/ssl/key.pem"}' \
  -v /ssl/keys/:/ssl/ \
  -v /bw-data/:/data/ \
  -p 443:433 \
  mprasil/bitwarden:latest

In current implementation I have to use port 80 for https connection when using mcvilan network in my bitwarden docker container.

https://192.168.0.10:80

Originally created by @ghost on GitHub. Instead of ``` docker run -d --name bitwarden \ -e ROCKET_TLS='{certs="/ssl/certs.pem",key="/ssl/key.pem"}' \ -v /ssl/keys/:/ssl/ \ -v /bw-data/:/data/ \ -p 443:80 \ mprasil/bitwarden:latest ``` Should be ``` docker run -d --name bitwarden \ -e ROCKET_TLS='{certs="/ssl/certs.pem",key="/ssl/key.pem"}' \ -v /ssl/keys/:/ssl/ \ -v /bw-data/:/data/ \ -p 443:433 \ mprasil/bitwarden:latest ``` In current implementation I have to use port 80 for https connection when using mcvilan network in my bitwarden docker container. https://192.168.0.10:80
Author
Owner

@ghost commented on GitHub:

That helps when connecting from desktop and google chrome but can't connect from ios (safari) and ios mobile bitwarden app:
https://github.com/dani-garcia/bitwarden_rs/issues/198

@ghost commented on GitHub: That helps when connecting from desktop and google chrome but can't connect from ios (safari) and ios mobile bitwarden app: https://github.com/dani-garcia/bitwarden_rs/issues/198
Author
Owner

@mprasil commented on GitHub:

I suspect there's some other issue there. I've closed this issue as this was related to setting the correct port with macvlan, we can troubleshoot the rest under #198.

@mprasil commented on GitHub: I suspect there's some other issue there. I've closed this issue as this was related to setting the correct port with macvlan, we can troubleshoot the rest under #198.
Author
Owner

@mprasil commented on GitHub:

Hi, the port does not change when you enable TLS, so the port forward in the example is correct - you need to forward internal port 80 to external (host) port 443. In your specific case with macvlan this obviously won't work as there is no port mapping used in that setup.

To resolve your problem, you can set ROCKET_PORT to 443 and that will let bitwarden listen on the required port in your configuration. You also need to remove the port mapping:

docker run -d --name bitwarden \
  -e ROCKET_TLS='{certs="/ssl/certs.pem",key="/ssl/key.pem"}' \
  -e ROCKET_PORT=443 \
  -v /ssl/keys/:/ssl/ \
  -v /bw-data/:/data/ \
  mprasil/bitwarden:latest

Hope that helps.

@mprasil commented on GitHub: Hi, the port does not change when you enable TLS, so the port forward in the example is correct - you need to forward internal port `80` to external (host) port `443`. In your specific case with macvlan this obviously won't work as there is no port mapping used in that setup. To resolve your problem, you can set `ROCKET_PORT` to `443` and that will let bitwarden listen on the required port in your configuration. You also need to remove the port mapping: ``` docker run -d --name bitwarden \ -e ROCKET_TLS='{certs="/ssl/certs.pem",key="/ssl/key.pem"}' \ -e ROCKET_PORT=443 \ -v /ssl/keys/:/ssl/ \ -v /bw-data/:/data/ \ mprasil/bitwarden:latest ``` Hope that helps.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2316