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?
6 Replies
Status changed to Awaiting Railway Response Railway • about 23 hours ago
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
check your coding well
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?
Attachments
mayori
I can't reproduce the problem, Tested on Windows, CLI v5.58.0 (latest) What happen when you run the command? 
14 hours ago
I receive just this
Attachments
alsytimestech
I receive just this 
11 hours ago
Try add the --ssh flag explicitly in the command
mayori
Try add the `--ssh` flag explicitly in the command
6 hours ago
Same error
Attachments
