Reverse proxy nginx 502 bad gateway

I’ve been looking for a solution to my problem for two days but unfortunately I can not find the solution anywhere I hope you can help me.
I am still a beginner please be nice :smiley:

I am using unraid and the NRP and Vaultwarden are running on a docker.
The NRP works I can reach rocketchat without problems but it won’t work on Vaultwarden.
these are my settings:
(unfortunately I can only upload one picture so it does not look so nice)

Advanced:

location /admin {
  return 404;
  }

  location / {
    proxy_pass http://192.168.2.13:4743;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }
  
  location /notifications/hub {
    proxy_pass http://192.168.2.13:3012;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }
  
  location /notifications/hub/negotiate {
    proxy_pass http://192.168.2.13:4743;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }

thank you for your help !!!

Was this ever figured out? I’m seeing the same issue. Unraid and Nginx.

The Nginx configuration for Vaultwarden you provided seems generally correct. However, please ensure that the internal IP addresses and the ports you specified are accurate and that the Vaultwarden server is indeed running on 192.168.2.13:4743.

In Vaultwarden, please check that the ROCKET_PORT environment variable matches the port in your Nginx configuration (4743 in your case). Also, the WEBSOCKET_ENABLED environment variable should be set to true if you want to use the /notifications/hub paths.

Furthermore, in the NRP settings, you might want to check that you’ve set the proxy_set_header to the correct address for Vaultwarden. If the Docker container is running in bridge mode, you’ll need to use the Docker IP (usually 172.17.0.1) instead of the host IP.

If after checking all these, you’re still encountering issues, I would need more specific details about the error messages or behavior you’re experiencing. Is there an error message when you try to reach Vaultwarden through NRP? What happens when you try to access it directly via its IP address and port? The more information you provide, the better I’ll be able to help you diagnose and solve the problem.

Let me know how it goes.