BTCPay app with reverse proxy to Tor failing error 400

Hello, I’m still trying to get to work my BTCPay Server app under Umbrel with clearnet access for e-commerce websites.

Someone from support send me this guide on how to create the reverse proxy to Tor, listed under te BTCPay Server docs: https://docs.btcpayserver.org/ReverseProxyToTor/
This works using a scout service that will proxy the requests directly to the app under the Umbrel node.

I have already managed to create the reverse proxy in a DigitalOcean droplet and when I visit the domain I can see the BTCPay login screen. The problem is that when I send the form I get an error 400 and a blank screen.

After some testing I have found that if I comment the next line I manage to login into the BTCPay Server app directly from my domain:

# Proxy requests to the socat service
location / {
    proxy_pass http://127.0.0.1:9081/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
    proxy_set_header Upgrade $http_upgrade;
    #proxy_set_header Connection "upgrade";
    proxy_http_version 1.1;
}

But commenting that will make the websockets not to work.
On the JS console I see:

WebSocket connection to 'wss://pay.xxx.es/Notifications/SubscribeUpdates' failed: Unexpected response code: 400
Error while connecting to websocket for notifications (callback)

Any ideas or workaround? Anyone has tested this setup?
Thanks

Did you find a solution to this issue? I’m following the Reverse Proxy to Tor guide. I’m running into an issue. When I visit my domain, I get a 502 Bad Gateway. When I check the socat logs I get

E socks: connect request rejected or failed

When I configured my REMOTE_HOST, I visited my umbrel home page through Tor and then opened the BTCPay Server app to get the onion address. I kept the REMOTE_PORT=80.

Any ideas what my issue could be?

Hello, after creating this topic I have pushed some updates to the Reverse proxy to Tor guide in BTCPay Server docs. At this time, if I follow the guide I can get it to work with all the default options but your own onion address. Please go after all steps again, maybe you find the solution there.

I must have made an error following the steps. I deleted it and rebuilt the project this evening. Everything is working as expected. Thanks for putting the guide together!

Hey, I’m very happy to hear that :hugs: