5 hours ago
I‘m experiencing health check issues on my EU deployment.
Strangely this happened today out of nowhere. I didn‘t change anything related to the code or deployment script which would result into not reaching my server.
9 Replies
Status changed to Open Railway • about 5 hours ago
4 hours ago
Can you confirm that your PORT variable is set to the same port your app is listening on?
4 hours ago
to be honest. I never had this set. and it always worked without this env var. but this morning out of the blue the deployment didnt work anymore.
then I ran a diagnosis and it told me to set the PORT env. did it. but still am not able to successfully run the health check
4 hours ago
Hi bro,
Setting "PORT" manually may not be enough by itself.
For a Railway healthcheck to pass, your app must actually listen on the same port and bind to
"0.0.0.0", not"localhost".
Please check these things:
-
Your app should listen on Railway’s
"$PORT". -
Your server should bind to:
0.0.0.0
not:
localhost or 127.0.0.1
- Make sure the healthcheck path actually returns "200".
For example, if your healthcheck path is "/health", then this endpoint must respond successfully:
/health
- If you manually set
"PORT", make sure the port exposed in Railway Public Networking matches the same port your app is using.
For example, if you set:
PORT=8080
then your app should listen on "8080", and Railway Public Networking should also point to port "8080".
If those ports do not match, the service can look deployed but the healthcheck or public URL may still fail.
If it worked before and suddenly failed today, it may also be worth checking Railway status or trying another region temporarily. But first, confirm the app is listening on the correct host/port and that the healthcheck endpoint returns "200".
3 hours ago
here my current Dockerfile:
ENV PORT=8080
COPY --from=installer /app .
EXPOSE 8080
CMD ["node", "--import", "./apps/scraper/dist/instrument.js", "apps/scraper/dist/app.js", "--mode", "daemon"]
and here my application:
app.listen(port, "::", () => {
logger.info("Server listening", { port });
logger.info("Health check ready", {
url: `http://localhost:${port}/health`,
});
logger.info("Bull Board UI ready", {
url: `http://localhost:${port}/admin/queues`,
});
});
I do not have public routing enabled on this application/service.
3 hours ago
weird this happened out of the blue. I disabled the health check and everything seems to work properly. here the logs:
{
"message": "Server listening",
"severity": "info",
"attributes": {
"label": "scraper",
"level": "info",
"metadata": {
"port": 8080
}
},
"timestamp": "2026-05-25T14:21:45.456790796Z"
}
Status changed to Solved Railway • about 3 hours ago
2 hours ago
its not solved. I just disabled the health check for a brief moment to see if the application even runs
Status changed to Awaiting Railway Response Railway • about 2 hours ago
an hour ago
ENV PORT=8080
COPY --from=installer /app .
EXPOSE 8080
CMD ["node", "--import", "./apps/scraper/dist/instrument.js", "apps/scraper/dist/app.js", "--mode", "daemon"]
lucaarchidiacono
here my current Dockerfile: ``` ENV PORT=8080 COPY --from=installer /app . EXPOSE 8080 CMD ["node", "--import", "./apps/scraper/dist/instrument.js", "apps/scraper/dist/app.js", "--mode", "daemon"] ``` and here my application: ``` app.listen(port, "::", () => { logger.info("Server listening", { port }); logger.info("Health check ready", { url: `http://localhost:${port}/health`, }); logger.info("Bull Board UI ready", { url: `http://localhost:${port}/admin/queues`, }); }); ``` I do not have public routing enabled on this application/service.
an hour ago
Bro, the likely issue is this line:
app.listen(port, "::", () => {
You are binding the server to IPv6 only. For Railway healthchecks, I would suggest binding to "0.0.0.0" instead:
app.listen(port, "0.0.0.0", () => {
logger.info("Server listening", { port });
});
Also make sure "port" is coming from "process.env.PORT", with "8080" only as a fallback:
const port = process.env.PORT || 8080;
Since you do not have public routing enabled, the public networking port is not the main issue here. The important part is that the Railway healthcheck can reach the app inside the container.
So u should try:
- Change "::" to "0.0.0.0"
- Keep "PORT=8080"
- Make sure "/health" returns HTTP "200"
- Redeploy
Your Dockerfile part looks fine:
ENV PORT=8080
EXPOSE 8080
The main thing you should change first is the app bind host.