Part of Hosting by frameworkHosting · Networking

“ENOTFOUND railway.internal” and other private networking errors: causes, fixes, and a version with no DNS to fail.

Private networking errors come from three places: a name that doesn’t resolve in the address family your client asks for, a service outside the network’s boundary (another project, region or workspace, or a free plan), or an app listening where the platform doesn’t connect. Here is each message on Railway, Render, Fly.io and Heroku, and how Canner avoids them.

Facts checked

The messages, and what causes them

Private addresses only resolve from inside the platform, so these errors show up in your app’s runtime logs, not on your laptop. Each row is one message or symptom, as the vendor documents it or users report it:

Provider and messageCauseFix
Railway: getaddrinfo ENOTFOUND redis.railway.internal† †The client looked up only an IPv4 address (ioredis does by default), but environments created before 16 October 2025 have an IPv6-only private network.Make the client ask for both: family: 0 in ioredis, or ?family=0 on the URL. New environments support IPv4 and IPv6.
Railway: ENOTFOUND or ECONNREFUSED between two services† †The services are in different projects or environments. The private network is scoped to one environment of a project.Put both in the same project and environment, or call the public address.
Railway: ECONNREFUSED after the name resolves† †Something resolved, but nothing answers on that address and port: an app bound to the wrong address in an IPv6-only environment, a renamed service whose old name is stale, or the wrong port. Users report all three.Bind to :: and the port the platform gives you, copy the hostname again from the service’s settings, and test from a second service.
Render: connection refused or timing out against a web service’s internal address† †Free web services can send private requests but can’t receive them. Static sites aren’t on the private network, and services must share a region and a workspace.Use a paid instance or a private service, and keep both ends in one region and workspace.
Render: the connection fails with a bare host:port† †The internal address can need a scheme and port, such as http://elastic-qeqj:10000.Use the full address from the Connect menu’s Internal tab.
Fly.io: <app>.internal returns no address† †AAAA lookups only return Machines that are running; autostopped Machines are left out. 6PN connects Machines directly and bypasses Fly Proxy, so autostop needs Flycast.Keep the Machine running, or use Flycast. Bind the service to fly-local-6pn.
Heroku: no internal URL for the app† †Internal routing is a Private Spaces feature. It can only be set when the app is created, not on an existing app.Create the app in a Private Space with internal routing, or call the public URL.

† Competitor details come from each vendor’s own published pages on the dates shown; prices and plans change, so check the vendor before you decide. Railway: `getaddrinfo ENOTFOUND redis.railway.internal`† (2026-11-18) · Railway: `ENOTFOUND` or `ECONNREFUSED` between two services† (2026-11-18) · Railway: `ECONNREFUSED` after the name resolves† (2026-11-18) · Render: connection refused or timing out against a web service’s internal address† (2026-11-18) · Render: the connection fails with a bare `host:port`† (2026-11-18) · Fly.io: `<app>.internal` returns no address† (2026-11-18) · Heroku: no internal URL for the app† (2026-11-18)

Why they keep happening

  • A name has to resolve first. A private hostname is a DNS name. If the client asks for IPv4 and the network is IPv6-only, or the Machine is stopped, there is nothing to find, and the error says so as ENOTFOUND.
  • The network has a boundary, and it differs by vendor. One environment, one region and workspace, a paid plan, a Private Space. Cross it and the name or the connection simply isn’t there.
  • The platform has to reach the app where it listens. Address family, port and scheme are all guesses until something answers, and ECONNREFUSED means nothing did.
  • Falling back to the public URL hides the mistake. It works, but the traffic leaves the platform and comes back, slower and counted as outbound bandwidth.

How Canner does it

Every project in an organization can call the others without leaving the server. Each deploy gets one variable per other project, CANNER_PRIVATE_URL_<PROJECT>, holding a full URL: http://127.0.0.1:3430. It is an IPv4 address and a port, so there is no name to resolve and no IPv6 lookup to get wrong (private connections).

  • On for every project and every plan, including apps that already exist: the variables appear at their next deploy. Turn it off for one project under Settings → Address.
  • The whole organization, not one project or environment. Another organization’s project is refused at the server. Pull-request previews don’t get the variables.
  • The URL is complete, with scheme, address and port, so you copy nothing from a dashboard and rename nothing by hand. A project added later shows up in the next deploy of the others.
  • It skips the public front door. The app sees no X-Forwarded-* or X-Canner-* headers, nothing is cached, and a Cloudflare-only rule doesn’t apply. Check a shared secret in the app, as in the code below.
  • The project has to be running. A free project that has gone to sleep doesn’t answer until its public address wakes it. Always-on projects are always there.
  • Databases need none of this: a project’s DATABASE_URL already points at the database on the same server (databases).
// In the "web" project, calling the "api" project of the same organization
const base = process.env.CANNER_PRIVATE_URL_API; // http://127.0.0.1:3430
const res = await fetch(`${base}/internal/orders`, {
  headers: { authorization: `Bearer ${process.env.INTERNAL_TOKEN}` },
  signal: AbortSignal.timeout(5000),
});

// In the "api" project: the call skips the public front door, so check who is asking
app.use("/internal", (req, res, next) =>
  req.get("authorization") === `Bearer ${process.env.INTERNAL_TOKEN}` ? next() : res.sendStatus(401));

Check it from the app

  • Log the variable at startup: console.log(process.env.CANNER_PRIVATE_URL_API). If it’s empty, the other project is in a different organization, has the setting off, or hasn’t been deployed since it was added.
  • Add a `/health` route to the target and call it from the caller with a short timeout, so a refusal shows up as an error in the logs within seconds.
  • Compare with the public URL. If the public address answers and the private one is refused, the target isn’t running or has private access turned off.

Questions

Why does redis.railway.internal give ENOTFOUND?

Usually the client only looked up an IPv4 address while the environment’s private network is IPv6-only (environments created before 16 October 2025). Make the client ask for both, for example family: 0 in ioredis. The other common cause is a service in a different project or environment.

What does ECONNREFUSED mean on a private address?

The name resolved but nothing answered on that address and port. Check that the app listens on the address and port the platform connects to, that the hostname is current after a rename, and that the target is running.

Can a free service on Render receive private requests?

No. Render’s free web services can send private requests but can’t receive them, and static sites aren’t on the private network.

Do I need a paid plan for private networking on Canner?

No. Private connections between the projects of one organization are on for every plan. Turn them off per project under Settings → Address.

Can another customer reach my project’s private URL on Canner?

No. Only projects of your own organization can connect. The server refuses a connection from a project of any other organization, and still check a shared secret in the app.

A private URL that is already in your environment.

Deploy two projects in one organization and each gets the other’s CANNER_PRIVATE_URL_<PROJECT>: a full URL, no DNS, no setup.