Cloudflare subdomain not working with Railway
colinrlly
TRIALOP

a year ago

I am trying to set up a Cloudflare subdomain pointing to railway and am receiving a 502 Application failed to respond message from Railway. I put the correct CNAME record into Cloudflare that was provided to me by Railway. The application that is running on Railway works via the Railway url but not via the Cloudflare url. The public url I'm trying to get set up is newsletter.caveman.press.

The http logs for my Railway application are

```
requestId:"q5918bUtREO4aSfx1bKmig_603909319"

timestamp:"2025-01-05T19:23:00.151224344Z"

method:"GET"

path:"/"

host:"newsletter.caveman.press"

httpStatus:502

upstreamProto:"HTTP/1.1"

downstreamProto:"HTTP/1.1"

responseDetails:"failed to forward request to upstream: connection refused"

totalDuration:10616

upstreamAddress:"http://[fd12:d893:9dbc::54:c837:c315]:9000"

clientUa:"Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36"

upstreamRqDuration:10616

txBytes:119

rxBytes:341

srcIp:"35.89.164.223"

edgeRegion:"us-west1"

```

The Cloudflare DNS record is

CNAME, newsletter, uxbtrud3.up.railway.app, proxy off

I checked the port configured in Railway under the networking tab and I confirmed it is correct by looking at the deploy logs.

Solved

3 Replies

a year ago

Hello,

The domain works for me, is it not working for you still?


colinrlly
TRIALOP

a year ago

Hey Brody, thanks for the reply. Yes I got this working. The problem was Cloudflare only accepts IPV6 addresses and the Listmonk library I was using only exposes V4.


a year ago

Glad you got it working!


Status changed to Solved brody about 1 year ago


Loading...