20 days ago
Project: heartfelt-growth
Service: Vanda
Custom domain: vanda.justicegrove.com
Target port: 8080
Summary: Every request to the custom domain returns 502 Bad Gateway / "Application failed to respond," even though the app itself starts cleanly, the domain shows fully verified, and the issue persists identically even after a complete reset of the domain and DNS records.
What's confirmed working:
Domain shows green checkmarks for both DNS records (CNAME + _railway-verify TXT) in Networking settings
SSL certificate issues correctly — no cert warnings, confirmed via browser and Invoke-WebRequest from an external machine (gets a real HTTP-level 502 response, not a TLS error)
Deploy logs show a clean startup every time: ✓ Ready in 47ms, listening correctly on port 8080 on both Local and Network (bound to all interfaces)
Network Flow logs show successful TCP connections (Status: OK) reaching the service on port 8080
No Healthcheck Path is configured; Serverless mode is off
Already tried (in order):
Removed and re-added the custom domain twice, updating the DNS CNAME each time to match the newly generated target
Discovered and added the _railway-verify TXT record after realizing it had been missing — domain then verified successfully
Triggered a manual redeploy after verification succeeded — no change
Full reset: deleted the custom domain on Railway AND both DNS records on Spaceship entirely, waited several minutes, then recreated everything from scratch with a brand-new target hostname (mbtvtmf1.up.railway.app) and fresh TXT value — domain verified again (green checkmarks), but the exact same 502 behavior persists
The problem: Every request — including via the fresh domain/target pair from the reset — returns 502 at the edge, with zero corresponding request entries in the app's own deploy logs, meaning traffic isn't reaching the container despite the app being confirmed healthy and reachable at the network layer.
Would appreciate help investigating the edge/routing configuration for this domain/service — everything on the application and DNS side appears correct, and a full teardown/rebuild of the domain didn't change the outcome.
Pinned Solution
20 days ago
Your DNS setup is correct, and most likely isn't the issue here. It's almost always a misconfigured port issue. If your app is listening on port 8080, and the domain's target port is set to the same port, yet the issue persists; try to change your app's port to an arbitrary port (like 3000), and map your domain to it as well.
2 Replies
20 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 20 days ago
20 days ago
Your DNS setup is correct, and most likely isn't the issue here. It's almost always a misconfigured port issue. If your app is listening on port 8080, and the domain's target port is set to the same port, yet the issue persists; try to change your app's port to an arbitrary port (like 3000), and map your domain to it as well.
20 days ago
Thank you for your reply! I hadn't noticed it while trying to troubleshoot on my own (with Claude Code, because I am not an engineer...), and came up with adding HOSTNAME = 0.0.0.0, which appears to have done the trick.
Status changed to Solved brody • 20 days ago