Bad gateway: Error 502

You should check your cloudflared logs to see why it is a getting a 502 error.