Docker container not accessible through Nginx Proxy Manager

Hey folks,

I’m struggling to set up my Docker container with Nginx Proxy Manager (NPM). Currently, my Vaultwarden is accessible at truenas:30032. I want to reach it through vault.mydomain.duckdns.org using a wildcard SSL cert.

Here’s what I’ve done in NPM:

  • Set up a Proxy Host for vault.mydomain.duckdns.org
  • Used HTTPS scheme
  • Set forward hostname to Docker’s hostname
  • Used 30032 as forward port
  • Turned off caching, exploit blocking, and WebSocket support
  • Applied the wildcard cert
  • Enabled only HTTP/S support

When I try to access vault.mydomain.duckdns.org, it takes me to the Docker host but doesn’t redirect to the right port.

What am I missing here? Any ideas on how to fix this? Thanks in advance for your help!

I’ve faced similar issues with Nginx Proxy Manager before. One thing that often gets overlooked is the Docker network configuration. Make sure your Vaultwarden container and NPM are on the same Docker network. You can create a custom bridge network and attach both containers to it.

Also, in your NPM proxy host settings, try using the container name instead of the Docker hostname for the forward hostname. So if your Vaultwarden container is named ‘vaultwarden’, use that.

Another thing to check is your Docker-compose file (if you’re using one). Ensure the ports are correctly mapped and the container name is defined.

If none of these work, you might want to check the NPM logs for any error messages. They can provide valuable insights into what’s going wrong with the proxy setup.

Remember, networking in Docker can be tricky. Don’t get discouraged if it takes a few attempts to get it right.

hey mia92, try confirm if the container’s port is exposed externally. check your docker network config and maybe use a custom network for npm and your container. hope that helps!

It sounds like you’re almost there, Mia92. The issue might be with how NPM is interpreting the forward hostname. Instead of using Docker’s hostname, try setting the forward hostname to the actual IP address of your Docker host. Also, ensure that the container’s internal port matches the one you’re forwarding to (30032). If that doesn’t work, double-check your Docker network settings and make sure the container is on the same network as NPM. Lastly, review your firewall settings to confirm that port 30032 is open and accessible. These steps should help troubleshoot the connection problem.