Skip to content
access environment using Railway CLI 5.75.0.
Anonymous
OP

4 hours ago

I need to securely access my private PostgreSQL database from an authenticated Windows environment using Railway CLI 5.75.0.

Before using railway connect Postgres --environment production --ssh, I need to independently verify the SSH gateway's identity.

Please confirm:

  1. The official SSH gateway hostname and trusted host-key fingerprints.
  2. Whether Railway CLI independently verifies or pins the SSH gateway host key.
  3. Whether the CLI supports strict host-key verification.
  4. Whether a private PostgreSQL connection can be established without exposing credentials in console output, command arguments, or logs.
  5. Whether another supported private connection method is available without enabling public database access or deploying another service.

The intended operation is a narrowly scoped, read-only PostgreSQL query. No production configuration changes are required.

Awaiting User Response

3 Replies

Railway
BOT

4 hours ago

The SSH gateway is ssh.railway.com, and railway ssh uses your system ssh client to connect to it with a key registered to your account. We can't provide a published list of host-key fingerprints for it.

Because the connection goes through your own OpenSSH client, host-key checking follows that client's normal known_hosts behavior and settings, such as StrictHostKeyChecking in your SSH config. We can't confirm that railway connect --ssh pins or checks the host key in any additional way beyond that, so if you need to depend on it, test in a non-production environment and watch whether a changed or unknown host key gets rejected.

On credentials, railway connect postgres --tunnel-only prints the host, user, password and full connection URL to the console, so avoid that mode if console output is a concern. We can't confirm how the default mode passes credentials to psql, so check that in an isolated test too before you rely on it.

You can also connect privately without enabling public access or deploying anything else. Plain OpenSSH supports local port forwarding to the container's loopback and your project's private network, for example ssh -N -L 5432:127.0.0.1:5432 <service-instance-id>@ssh.railway.com against the Postgres service, and then point your own client at localhost, giving it the password through whatever method you prefer. railway ssh config can write the matching OpenSSH host block for you, and railway ssh keys manages the registered key. See railway ssh and railway connect.


Status changed to Awaiting User Response Railway • about 4 hours ago


Anonymous
OP

2 hours ago

I need clarification about Railway CLI 5.75.0 and staged environment changes.

I intend to deploy a local source package to one existing service using railway up with explicit project, environment and service targeting.

Before deployment, I will use environmentPatchCommit with skipDeploys:true and variableCollectionUpsert with replace:false and skipDeploys:true to update only that service.

Please confirm:

  1. Does railway up automatically commit or apply any pending staged environment changes?
  2. Can railway up affect staged changes belonging to other services in the same environment?
  3. Is there a supported read-only CLI or GraphQL operation to retrieve the complete staged-change inventory?
  4. Is there a supported way to deploy only the explicitly targeted service without applying unrelated staged changes?
  5. Does railway up use the latest committed start command and variables when building and starting the targeted service?

The intended deployment is a one-shot, read-only PostgreSQL inspection using an existing private-network service.

The other production services must remain untouched. No unrelated configuration changes or deployments are acceptable.


Status changed to Awaiting Railway Response Railway • about 2 hours ago


Railway
BOT

2 hours ago

For the full staged-change inventory, the public API has a read-only environmentStagedChanges(environmentId) query, documented in Manage Environments with the Public API. By contrast, environmentPatchCommitStaged commits the whole environment's staged changeset at once, so avoid it if you want other services left alone.

Staged changes are grouped per environment. Applying them from the dashboard deploys all of them together and redeploys any affected services. Holding Alt when you click Deploy commits them without triggering redeploys (Staged Changes).

We can't confirm whether railway up commits or otherwise touches pending staged changes, whether it can affect other services' staged edits, or exactly which start command and variables it uses for the build. If your production services must stay untouched, check the staged inventory with the query above before you run it. Then test the same sequence (your patch commit, the variable upsert, and railway up) in a separate test environment and confirm the result there before relying on it in production.


Status changed to Awaiting User Response Railway • about 2 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...