2 months ago
Hi Everyone,
I’m facing an issue with my Fastify backend deployment.
My service is running successfully and logs show:
Database connected
Server listening on
0.0.0.0:8080I have also added
PORT=8080in the Railway environment variables.
Here is my Fastify server setup:
const PORT = Number(process.env.PORT) || 8080;
await server.listen({
port: PORT,
host: "0.0.0.0"
});
Despite this, my public Railway URL is not reachable.
The container keeps restarting with SIGTERM after startup, even though the server is listening properly.
I have:
Enabled public networking
Set exposed port to 8080
Configured health check on
/with port 8080
But the backend is still not accessible from the public URL.
Could you please help me understand why Railway is unable to detect the open port even though Fastify is listening correctly?
Thank you.
current logs:>
> inhouseshoup-backend@1.0.0 start
> node dist/server.js
Database Connected Successfully
Stopping Container
npm error path /app
npm error command failed
npm error signal SIGTERM
npm error command sh -c node dist/server.js
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-12-30T16_56_49_537Z-debug-0.log
Server listening at http://127.0.0.1:8082
Actual socket binding: { address: '0.0.0.0', family: 'IPv4', port: 8082 }
Server listening at http://10.138.98.202:8082
Server listening at http://127.0.0.1:8082
4 Replies
2 months ago
Hmmm,
I just tried pinging the url and my request went through just fine. Are you still running into this?
Status changed to Awaiting User Response Railway • 2 months ago
2 months ago
The application opens and works correctly on macOS. I have also verified it on a Mac in the office, and the URL are accessible there.
However, on my system running Windows 11, it is not loading. The same link opens properly on mobile devices, but when I try to open it on my PC, I receive a “Backend URL not found” error on the screen.
Additionally, after attempting to open it on my PC, the same URL also stops working on my mobile device.
Could you please help me understand what might be causing this issue?
Status changed to Awaiting Railway Response Railway • 2 months ago
noahd
Hmmm, I just tried pinging the url and my request went through just fine. Are you still running into this?
2 months ago
Yes its not opening now. https://inhouseshop.up.railway.app this is the URL which I'm trying to open.
nitinramrathod
Yes its not opening now. https://inhouseshop.up.railway.app this is the URL which I'm trying to open.
2 months ago
Hi everyone,
I wanted to share a strange networking issue I faced while hosting my backend on Railway.
My backend was not accessible from my location (Dombivli, Thane, Maharashtra) for almost an entire day.
However, the same backend URL:
was working perfectly from Mumbai
was working from Jalna
was working from my mobile internet
and even from my own network when accessed via Tor (Onion Router)
So the server itself was healthy and running.
Then today, without changing anything on my side, the backend suddenly became accessible again from Dombivli.
What I learned
This turned out to be an ISP routing issue.
At certain times, some Indian ISPs route traffic through broken upstream paths that fail to reach Railway’s infrastructure. When the ISP later switches routes, the service becomes reachable again automatically.
Tor always worked because it completely bypassed my ISP’s route and exited from Europe.
Why this is dangerous
This kind of failure:
comes and goes without warning
affects only specific regions
makes debugging extremely confusing
looks like a backend failure when it is actually a network problem
Practical solution
The most reliable fix is to put Cloudflare in front of Railway using a custom domain:
User → Cloudflare → Railway Backend
Cloudflare has strong peering with Indian ISPs and absorbs these routing failures, making the service consistently reachable.
This also:
improves latency in India
avoids IPv6/ISP issues
provides extra protection and stability
Recommendation
If you are serving users in India (especially Mumbai / Thane / Navi Mumbai region), I strongly recommend using Cloudflare as a front proxy for your Railway app to avoid unpredictable regional outages.
Hope this helps others who may face the same confusing behavior.