Cloudflare argo tunnel gives bad gateway error

not for nginx DNS setup as nginx would be the origin. In Cloudflare Tunnel , cloudflared daemon would be the origin basically. Cloudflare Tunnel setups the cloudflared daemon basically becomes the origin that CF edge servers connect to first and it’s when the cloudflared daemon is down or unresponsive that 502 might occur. It doesn’t though rule out Nginx being down or unresponsive between cloudflared daemon and nginx origin locally.

As I said before, try disabling

warp-routing:
  enabled: true