Cannot change vaultwarden port

I tried docker run port 8080:80
It keeps running on port 80.
I don’t know why and i don’t know how to change it

What do you mean? Did you restart the container?

Inside the container it runs on port 80 because ROCKET_PORT=80 is set by default. If you want to change that you will have to set this environment variable yourself (and adapt any published ports accordingly).

How can i change it? Where is that file?

That depends on your deployment method. So you probably want to start with:

You might get a more helpful answer if you tell us what you want to achieve by changing the port.

There is no reason to change the port 80 to anything different INSIDE container unless you really want to activate TLS for Rocket webserver. I assume you just want to access Vaultwarden container on port 8080, so it does not matter for you what port is used INSIDE, but which port is exposed OUTSIDE.

Try this for test purpose only:

sudo docker run -d --name testwarden -v /tmp:/data -e WEBSOCKET_ENABLED=true -p 0.0.0.0:3012:3012 -p 0.0.0.0:7070:80 --restart always vaultwarden/server:latest

after running the container, issue the command below:

sudo netstat -tunlp

and paste here an output.

That was the missing piece that allowed me to change 80:80 to 7685:80

I doubt it, since that setting has nothing to do with the port settings for anything inside Vaultwarden