My url is not accessible
rakesh2574
HOBBYOP

4 hours ago

Seems like my app urls are not available when accessed.

It shows online , and being properly deployed

But not online

$10 Bounty

3 Replies

Status changed to Open Railway about 4 hours ago


Make sure the port your URL is mapped to is the same port your application is listening to. Also, ensure that the application is listening to 0.0.0.0 and not :: or localhost.


asepsaputra
HOBBYTop 5% Contributor

3 hours ago

Hi,

If the service shows as deployed/online but the URL is not accessible, please check the port configuration.

The port your app listens to in the code must match the port exposed/mapped in Railway Networking.

For example, if Railway exposes port 3000, your app must listen on 3000. If your app uses Railway’s $PORT, then make sure Railway Networking is also pointing to the same app port.

Also make sure the app binds to 0.0.0.0, not localhost or 127.0.0.1. So the main things to check are:

  • app listen port
  • Railway exposed/mapped port
  • host binding: 0.0.0.0

If those do not match, the service can look online but the public URL will not work.


sheeki03
FREETop 5% Contributor

17 minutes ago

I would check the app binding first. A Railway deployment can show as online while the public URL still fails if the process is only listening on localhost, 127.0.0.1, or a hardcoded port.

The service should listen on the port Railway provides and bind to all interfaces:

host: 0.0.0.0
port: process.env.PORT

For common setups, that usually means one of these patterns:

Express:
const port = process.env.PORT || 3000;
app.listen(port, "0.0.0.0");

Next.js custom start:
next start -H 0.0.0.0 -p $PORT

Vite preview:
vite preview --host 0.0.0.0 --port $PORT

After changing that, redeploy and check the runtime log line that says what host and port the app is listening on. If it says localhost, 127.0.0.1, or a port that is not $PORT, the Railway proxy will not be able to reach it even though the deployment itself is running.

Also confirm the service has a public domain attached under the service networking settings. If the app only has a private/internal address, it can be online inside Railway but still not reachable from a browser.

My order of checks would be:

1. Service has a public Railway domain or custom domain attached.
2. App start command uses $PORT, not a fixed port.
3. App binds to 0.0.0.0, not localhost.
4. Runtime logs show the app listening after deploy.
5. Any healthcheck path configured in Railway actually returns 200.

Most cases with this symptom come down to the app listening on the wrong host or port, especially when the deploy is marked online but the URL itself does not load.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...