# cloudflared: Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared (502)

**Code:** `cloudflared Unable to reach the origin service` · **Category:** Cloudflare · **Seen on:** Cloudflare

The tunnel is connected, but cloudflared can’t reach your local service at the address in the ingress rule.

## Meaning

The ingress service URL (http://localhost:8080) is wrong, the app isn’t running, it listens on another interface, or HTTPS is used without the right origin certificate settings. Inside Docker, localhost refers to the cloudflared container.

## Common causes

- Local app not running or wrong port
- cloudflared in Docker using localhost instead of the service/container name
- HTTPS origin with self-signed cert (needs noTLSVerify or originServerName)
- App bound to 127.0.0.1 but cloudflared on another host

## Quick fix

1. curl the service URL from where cloudflared runs
2. Fix the ingress service address (use container name in Docker networks)
3. Set originRequest.noTLSVerify for self-signed origins

## Detailed fix by platform

### YAML

1. 

```bash
ingress:
  - hostname: app.example.com
    service: http://web:8080        # container name, not localhost, in Docker
    originRequest:
      noTLSVerify: true
  - service: http_status:404
```


## How to diagnose

1. **Service** — Reachable from the cloudflared host/container?
2. **Logs** — cloudflared error lines
3. **TLS** — HTTPS origin?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cloudflare/502-tunnel-origin-unreachable)
