Service domains and port configuration are being automatically reverted to incorrect values after each deployment
maciek-dwarf
HOBBYOP

22 days ago

Service ID: 63cb0e3b-9ac1-4a03-8c93-0b42a2574d4c
Service name: web-k005
Environment: production


Evidence:
- Port configuration keeps reverting from 8080 to 80 after deployment
- Custom domain (www.mindprobe.net) keeps disappearing from serviceDomains after each deployment
- Multiple conflicting Railway domains appearing (web-k005-production.up.railway.app, web-k005-production-5b2d.up.railway.app, web-k005-production-8cd0.up.railway.app)
- No Railway config files in repo that could cause this
- App starts successfully (gunicorn listens on 0.0.0.0:8080) but requests fail with "Application failed to respond"

Repository: maciek-dwarf/iq-website (branch: main, root directory: docs)
$10 Bounty

7 Replies

Status changed to Open Railway 22 days ago


maciek-dwarf
HOBBYOP

22 days ago

on claudflare i have dns

Attachments


imsushant2005
FREE

22 days ago

Solution:

Set the app to listen on Railway’s provided port, not a hardcoded 8080.

Use this start command:

gunicorn api_app:app --bind 0.0.0.0:$PORT

Do not bind only to 8080.

Then in Railway:

  1. Remove old/custom public networking entries.
  2. Delete the duplicate Railway domains.
  3. Re-add the custom domain www.mindprobe.net.
  4. Redeploy from main, root directory docs.
  5. Confirm the health check uses the same exposed port.

Root cause:

Railway is routing traffic to the service’s configured public port, but the app is listening on a different port. Because of that mismatch, the container starts, but Railway cannot reach it, so it shows:

Application failed to respond

The permanent fix is to make the app respect $PORT and let Railway inject the correct value during deployment.


maciek-dwarf
HOBBYOP

22 days ago

Service ID: 63cb0e3b-9ac1-4a03-8c93-0b42a2574d4c
Service name: web-k005

Issue: Service domains cannot be removed or added due to domain limit being hit. Old domains (web-k005-production.up.railway.app, web-k005-production-5b2d.up.railway.app, web-k005-production-8cd0.up.railway.app, web-k005-production-8078.up.railway.app) persist in the config even after attempting to remove them via API.

Request: Please manually clear all old service domains from the backend and reset the domain counter so we can add www.mindprobe.net fresh.

maciek-dwarf

on claudflare i have dns![](https://station-server.railway.com/attachments/att_01kqeyrem8fqbag7en8vfpyebs)

ember-circle-coin
HOBBY

22 days ago

The domain limit issue can be cleared using the Railway API directly.

Run this for each duplicate domain you want to remove:

curl -X POST https://backboard.railway.app/graphql/v2 \

-H "Authorization: Bearer YOUR_RAILWAY_TOKEN" \

-H "Content-Type: application/json" \

-d '{"query": "mutation { serviceDomainDelete(id: \"DOMAIN_ID\") }" }'

To get your Railway token: railway.com/account → API Tokens → Create Token

To find domain IDs run:

curl -X POST https://backboard.railway.app/graphql/v2 \

-H "Authorization: Bearer YOUR_RAILWAY_TOKEN" \

-H "Content-Type: application/json" \

-d '{"query": "{ service(id: \"63cb0e3b-9ac1-4a03-8c93-0b42a2574d4c\") { domains { serviceDomains { id domain } } } }"}'

Delete all old domains one by one, then add www.mindprobe.net fresh.

Also add a railway.toml to your repo root to lock the port and prevent it reverting:

[deploy]

startCommand = "gunicorn api_app:app --bind 0.0.0.0:$PORT"

healthcheckPath = "/"

This stops Railway overriding your port config on every deploy.


maciek-dwarf
HOBBYOP

22 days ago

Now I have :

  • Service ID: 63cb0e3b-9ac1-4a03-8c93-0b42a2574d4c
  • Domain: www.mindprobe.net
  • Error: "The train has not arrived at the station"
  • DNS is resolving correctly but edge layer isn't recognizing the domain

The Railway domain (web-k005-production.up.railway.app) works fine, so your app is healthy. This is purely a custom domain provisioning issue on Railway's side.


maciek-dwarf
HOBBYOP

22 days ago

In claudflare i have FieldCurrent ValueYour RequestTypeCNAMECNAMENamewwwwwwTargetweb-k005-production.up.railway.appweb-k005-production.up.railway.appProxyDNS only (not proxied)DNS only (not proxied)


Status changed to Open brody 21 days ago


ember-circle-coin

The domain limit issue can be cleared using the Railway API directly. Run this for each duplicate domain you want to remove: curl -X POST <https://backboard.railway.app/graphql/v2> \\ \-H "Authorization: Bearer YOUR\_RAILWAY\_TOKEN" \\ \-H "Content-Type: application/json" \\ \-d '{"query": "mutation { serviceDomainDelete(id: \\"DOMAIN\_ID\\") }" }' To get your Railway token: [railway.com/account](http://railway.com/account) → API Tokens → Create Token To find domain IDs run: curl -X POST <https://backboard.railway.app/graphql/v2> \\ \-H "Authorization: Bearer YOUR\_RAILWAY\_TOKEN" \\ \-H "Content-Type: application/json" \\ \-d '{"query": "{ service(id: \\"63cb0e3b-9ac1-4a03-8c93-0b42a2574d4c\\") { domains { serviceDomains { id domain } } } }"}' Delete all old domains one by one, then add [www.mindprobe.net](http://www.mindprobe.net) fresh. Also add a railway.toml to your repo root to lock the port and prevent it reverting: \[deploy\] startCommand = "gunicorn api\_app:app --bind 0.0.0.0:$PORT" healthcheckPath = "/" This stops Railway overriding your port config on every deploy.

maciek-dwarf
HOBBYOP

21 days ago

Could you help me out?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...