[GH-ISSUE #719] [Raspberry] Setting host-port with "docker-run -p" does not work (defaults to 80) #485

Closed
opened 2026-03-03 01:29:48 +03:00 by kerem · 4 comments
Owner

Originally created by @Timeeee on GitHub (Nov 13, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/719

I'm using the raspberry-image.

Using the docker-run command from the wiki doesn't set the containers host port correctly.

running

docker run -d --name bitwarden -v /bw-data/:/data/ -p 8080:8080 bitwardenrs/server:raspberry

adds the container with exposed port 8080, but the host port is set to 80. This leads to issues as I have another service running with host-port 80.

I didn't try using a fixed IP with port, as this is not possible in my environment.

Originally created by @Timeeee on GitHub (Nov 13, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/719 I'm using the raspberry-image. Using the docker-run command from the wiki doesn't set the containers host port correctly. running > docker run -d --name bitwarden -v /bw-data/:/data/ -p 8080:8080 bitwardenrs/server:raspberry adds the container with exposed port 8080, but the host port is set to 80. This leads to issues as I have another service running with host-port 80. I didn't try using a fixed IP with port, as this is not possible in my environment.
kerem closed this issue 2026-03-03 01:29:49 +03:00
Author
Owner

@mprasil commented on GitHub (Nov 13, 2019):

-p sets the port forwarding. So if you want to expose port 80 in the container as 8080 on the host you need to do -p 8080:80.

<!-- gh-comment-id:553309493 --> @mprasil commented on GitHub (Nov 13, 2019): `-p` sets the port forwarding. So if you want to expose port `80` in the container as `8080` on the host you need to do `-p 8080:80`.
Author
Owner

@Timeeee commented on GitHub (Nov 13, 2019):

I assumed there is a way to change the host port itself (not the forwarding) with -p as well. So there is no way to change the host port, which is in this case fixed to 80, right?

edit: I will play around some more with the settings, looks like I might have messed up something. Will give feedback once I did that. Sorry for creating the issue in the first place @mprasil !

Fantastic work btw :)

<!-- gh-comment-id:553311716 --> @Timeeee commented on GitHub (Nov 13, 2019): I assumed there is a way to change the host port itself (not the forwarding) with `-p` as well. So there is no way to change the host port, which is in this case fixed to `80`, right? edit: I will play around some more with the settings, looks like I might have messed up something. Will give feedback once I did that. Sorry for creating the issue in the first place @mprasil ! Fantastic work btw :)
Author
Owner

@mprasil commented on GitHub (Nov 13, 2019):

Well you were asking about the host side port as that's where the conflict is. I assume that bitwarden_rs will never conflict with the default port 80 inside the container as it's the only thing running inside the container.

If for some reason you really want to change the port where bitwarden_rs listens inside the container, you can do that by setting the ROCKET_PORT variable. But you'd have adapt the port forward as well: -e ROCKET_PORT=2345 -p 8080:2345

<!-- gh-comment-id:553488900 --> @mprasil commented on GitHub (Nov 13, 2019): Well you were asking about the host side port as that's where the conflict is. I assume that `bitwarden_rs` will never conflict with the default port `80` inside the container as it's the only thing running inside the container. If for some reason you _really_ want to change the port where `bitwarden_rs` listens inside the container, you can do that by setting the `ROCKET_PORT` variable. But you'd have adapt the port forward as well: `-e ROCKET_PORT=2345 -p 8080:2345`
Author
Owner

@Timeeee commented on GitHub (Nov 13, 2019):

Thank you very much, I finally got it running!

<!-- gh-comment-id:553499932 --> @Timeeee commented on GitHub (Nov 13, 2019): Thank you very much, I finally got it running!
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#485
No description provided.