Container changing port each restart (vaultwarden docker)

Post Reply
maido
New here
Posts: 2
Joined: Sun Jul 25, 2021 2:23 am

Container changing port each restart (vaultwarden docker)

Post by maido »

Hello, I have currently setup a vaultwarden container in container station (2.3.5.1708), in NAT mode with port 49188 of the NAS redirecting to port 80 of the container. However, every time I restart the container the source port (49188) changes to something else.
I found a similar problem in these forums, here: viewtopic.php?t=123453
However the solution seems rather radical.
Is there no way to keep the port constant at each restart? Sorry but I am kind of a noob when it comes to containers management.
Thanks and have a great weekend.
User avatar
oyvindo
Experience counts
Posts: 1399
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: Container changing port each restart (vaultwarden docker)

Post by oyvindo »

Running VaultWarden in ContainerStation (CS) on a QNAP NAS is very easy.
CS is designed to generate a new port each time you boot a container. To avoid that, assign your own preferred port numbers, like this:

Image

Accessing VaultVarden externally can be a bit tricky, but you can get good assistance from their forum: https://vaultwarden.discourse.group/
ImageImageImage
maido
New here
Posts: 2
Joined: Sun Jul 25, 2021 2:23 am

Re: Container changing port each restart (vaultwarden docker)

Post by maido »

Oh wow I never ever noticed you're supposed to add those ports when the container is actually stopped, I kept modifying them while it was running and didn't notice that, when it's Stopped, that configuration is blank, and I suppose it gets populated with random host ports at each reboot.
Thanks!
Post Reply

Return to “Container Station”