Running Self-Hosted Bitwarden behind UFW

Hello all!

I am trying to run a self-hosted Bitwarden instance behind a UFW firewall. I have taken the proper steps to ensure that Docker does not bypass my firewall. I have opened port 443 to allow an HTTPS connection to the server, but then I get presented with a 502 error from nginx. I have tried opening numerous other ports that make sense, but nothing works. I am only able to access the vault if I completely disable my firewall. Someone please help!

I found that I needed to open port 53 for some sort of Docker internal IP address. You can find what the address may be in your case by running sudo dmesg | grep UFW.