4 days ago
Description:
-
Service: illustrious-tranquility (diacora-api)
-
Railway Domain: ✅ WORKING
https://illustrious-tranquility-production-33d7.up.railway.app/health
Response: {"status":"ok","database":"configured"}
-
Custom Domain: ❌ 502 BAD GATEWAY
https://api.diacorahealth.com/health
Error: Application failed to respond
-
Port: 8080 (correct)
-
Healthcheck: /health (200 OK)
-
Database: Configured ✅
-
Region: sfo (1 replica)
Problem:
When custom domain is added, it returns 502 Bad Gateway.
Railway domain works perfectly but custom domain fails.
This happens consistently - not a temporary issue.
Steps to Reproduce:
- Add custom domain api.diacorahealth.com:8080
- Try to access https://api.diacorahealth.com/health
- Get 502 error
Expected:
Custom domain should work like Railway domain.
Actual:
502 Bad Gateway error every time.
3 Replies
4 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 4 days ago
4 days ago
Try to set PORT=8080 in your service variables, and make your app listen on it, instead of hardcoding it.
darseen
Try to set `PORT=8080` in your service variables, and make your app listen on it, instead of hardcoding it.
4 days ago
olmadı
karasli-git
olmadı
4 days ago
Can you provide a screenshot of your domain's target port, and the port your app is listening on?