Railway CLI tunnel-only flag not working on Windows - Unable to connect to private database locally
alsytimestech
PROOP

a day ago

I have a PostgreSQL database on Railway with public TCP proxy disabled for security reasons. I'm trying to connect to it locally from my Windows machine using the Railway CLI without exposing the database publicly.

When I run:

railway connect Postgres --tunnel-only

I get the error:

Connection URL should point to the Railway TCP proxy

According to the Railway documentation (https://docs.railway.com/cli/connect), the --tunnel-only flag should create a local SSH tunnel without requiring a public TCP proxy. However, this flag doesn't seem to be working on my version of the Railway CLI.

My setup:

  • OS: Windows 11
  • Railway CLI version: v5.57.12+ (latest)
  • Database: PostgreSQL (private, no public TCP proxy)

What I've tried:

  • railway connect Postgres → requires public TCP proxy

  • railway connect Postgres --tunnel-only → "Connection URL should point to the Railway TCP proxy"

  • Updated to latest CLI version

What I need:

A way to create a local tunnel to my private database using the Railway CLI without enabling public TCP proxy, ideally for use with DBeaver or other database clients.

Is there an alternative command or solution available?

$20 Bounty

6 Replies

Status changed to Awaiting Railway Response Railway about 23 hours ago


Railway
BOT

a day ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway about 22 hours ago


j53466946-boop
FREE

14 hours ago

check your coding well


j53466946-boop

check your coding well

alsytimestech
PROOP

14 hours ago

Did you read my question?


14 hours ago

I can't reproduce the problem, Tested on Windows, CLI v5.58.0 (latest)

What happen when you run the command?

image.png

Attachments


mayori

I can't reproduce the problem, Tested on Windows, CLI v5.58.0 (latest) What happen when you run the command? ![image.png](https://station-server.railway.com/attachments/att_01m2yywnjyfk7vbew24dgwaahz)

alsytimestech
PROOP

14 hours ago

I receive just this

image.png

Attachments


alsytimestech

I receive just this ![image.png](https://station-server.railway.com/attachments/att_01m2yz2507enc8eeb0qmh9jp2a)

11 hours ago

Try add the --ssh flag explicitly in the command


mayori

Try add the `--ssh` flag explicitly in the command

alsytimestech
PROOP

6 hours ago

Same error

image.png

Attachments


Welcome!

Sign in to your Railway account to join the conversation.

Loading...