Can't access VaultWarden from Nginx Proxy Manager on the same host

I have VaultWarden on the same host that Nginx Proxy Manager runs on.

CONTAINER ID   IMAGE                             COMMAND       CREATED          STATUS                    PORTS                                                                                  NAMES
5fe7c1058316   vaultwarden/server:latest         "/"   45 minutes ago   Up 44 minutes (healthy)>3012/tcp, :::3012->3012/tcp,>80/tcp, :::8080->80/tcp       vaultwarden
d7a7dc7a531d   jc21/nginx-proxy-manager:latest   "/init"       3 months ago     Up 9 days       >80-81/tcp, :::80-81->80-81/tcp,>443/tcp, :::443->443/tcp   root-app-1

I can access VaultWarden directly on port (8080) since NPM is using 80 already.

I tried using the host’s IP addr, hostname, localhost, and

What is interesting when I try using IP, Hostname it hangs for a bit (about 30 seconds) then gives me a 504 error.

when i use localhost or I immediately get 502 error.

Make sure the two containers are in the same network. Then you should be able to refer to the vaultwarden container by its name and you also don’t need to publish vaultwarden’s ports 80/3012 either as they can be accessed via the reverse proxy.