Duplicate production on Railway and you get a staging environment that really is separate where the data lives. It's still public where people knock. The diagram puts both facts side by side.

Reading the diagram
Top, red: anyone on the internet. Red means reachable by someone you didn't invite. Everything this box has an arrow to, a stranger can load.
Left: production. The thin arrow is the expected one. Your production app has a public domain because it's your product.
Right, the thick red edge: staging. Railway's isolation guide is blunt about it: "every service with a public domain is reachable from the internet regardless of environment." When you duplicate production, the staging copy inherits its service configuration, and Railway generates a fresh up.railway.app domain for it. It's the only emphasised edge because it's the one people assume isn't there. The word "staging" is a label in your dashboard. Nothing about the URL asks a visitor who they are.
The box itself says "often" for a reason. That's where controls get switched off while someone debugs: DEBUG=true, relaxed CORS, a seeded admin account. Railway doesn't do any of that. People do, on the environment they think nobody else can see.
Bottom, green: the two databases. This is the part Railway does isolate. Each environment gets its own Postgres service, its own credentials and its own private network, so postgres.railway.internal in staging resolves to staging's database. The duplicate comes up empty because sync copies configuration, not rows.
The dotted edge: the wall that holds. Staging has no private route to production's database. The same guide says it directly: "Nothing in staging can reach production over the private network." That's the guarantee Railway gives you for free. It stops being true in two ways you'd have to cause yourself: turning on public access for the production database, or restoring a production dump into staging's.
Removing staging's generated domain is the single highest-value fix here, and it takes one click. If staging has to be public, put basic auth, an IP allowlist or a shared token header in front of it.
What to do with it
Open every non-production URL in your project in a private window. If it loads your app without asking who you are, it does that for everyone. The full audit, including what duplication copies and what sealed variables leave behind, is in Railway Environments: What Is Isolated and What Is Not.
The Mermaid source
Copy this and swap in your own domains.
---
title: "Staging is walled off, except its front door"
---
flowchart TB
A["Anyone on the internet"]
P["Production app<br/><code>your-app.up.railway.app</code>"]
S["Staging app, duplicated from production<br/><code>your-app-staging.up.railway.app</code><br/>often: debug on, a test admin login"]
PD["Production database<br/>real customer rows"]
SD["Staging database<br/>its own copy, empty at first"]
A -->|"public domain"| P
A ==>|"<b>public domain too, no login</b>"| S
P -->|"private network"| PD
S -->|"its own private network"| SD
S -.-x|"no private route to it"| PD
classDef public fill:#fef2f2,stroke:#ef4444,stroke-width:2px,color:#1c1917
classDef private fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#1c1917
class A,P,S public
class PD,SD private
linkStyle 1 stroke:#ef4444,stroke-width:4px
Is a Railway staging environment private?
Its data and internal traffic are. Its public domain is not. Railway's isolation guide lists public networking as one of two things shared across environments: every service with a public domain is reachable from the internet regardless of environment.
Does duplicating production give staging a public URL?
Yes, if the production service has one. The duplicate inherits the service configuration, and Railway generates a new up.railway.app domain for the copy. Nothing in that domain tells a visitor or a scanner that it is staging.
Can my staging app read the production database on Railway?
Not over the private network. Each environment gets its own private network, so postgres.railway.internal in staging resolves to staging's database. The exception is a production database with public access turned on, which anything on the internet can reach with the credentials, staging included.
How do I make a Railway staging environment private?
Remove its generated public domain and reach it over the private network or the Railway CLI. If it has to be public, put basic auth, an allowlist or a shared token header in front of it.
Found a staging URL you forgot about?
Point a free CheckYourVibe scan at it. The scanner reads it the way a stranger would, headers and all.