Prerequisites
Enable external access
By default, Railway databases are only accessible from within your Railway project’s private network. To connect from VexiData, you must enable public networking.Enable TCP Proxy
- Log in to your Railway Dashboard
- Select your project
- Click on your database service (PostgreSQL or MySQL)
- Go to the Settings tab
- Under Networking, click Enable TCP Proxy
- Railway will assign a public domain and port
Get your connection details
After enabling the TCP Proxy:
- Go to the Connect tab on your database service
- Copy the public connection parameters (not the private/internal ones):
| Parameter | Example |
|---|---|
| Host | roundhouse.proxy.rlwy.net |
| Port | 43721 (randomly assigned) |
| Database | railway |
| Username | postgres (PostgreSQL) or root (MySQL) |
| Password | Your database password |
Railway assigns a random port for the TCP proxy — it won’t be the standard
5432 or 3306. Make sure you copy the public port, not the internal one.Add the connection in VexiData
- Go to Data Sources in VexiData
- Click PostgreSQL or MySQL depending on your database type
- Fill in the details:
| Field | Value |
|---|---|
| Display Name | A name to identify this connection (e.g., “Railway Production”) |
| Host | Your public proxy host (e.g., roundhouse.proxy.rlwy.net) |
| Port | Your assigned proxy port (e.g., 43721) |
| Database | railway (or your database name) |
| Schema | public (default — change if your tables are in a different schema) |
| Username | postgres |
| Password | Your database password |
| Field | Value |
|---|---|
| Display Name | A name to identify this connection (e.g., “Railway Production”) |
| Host | Your public proxy host (e.g., roundhouse.proxy.rlwy.net) |
| Port | Your assigned proxy port (e.g., 43721) |
| Database | railway (or your database name) |
| Username | root |
| Password | Your database password |
Troubleshooting
Connection timed out
Connection timed out
- Make sure you’ve enabled TCP Proxy in your database service settings. Without it, the database is only accessible from within Railway’s private network
- Verify you’re using the public host and port from the Connect tab, not the private/internal ones. Internal URLs ending in
.railway.internalwon’t work from outside Railway - Check that your Railway project is active and the database service is running
Wrong port
Wrong port
- Railway uses a randomly assigned port for the TCP proxy, not the standard
5432(PostgreSQL) or3306(MySQL). Copy the exact port shown in the Connect tab under the public connection details
Authentication failed
Authentication failed
- Double-check your username and password from the Railway Connect tab
- PostgreSQL defaults to
postgresas the username, MySQL defaults toroot - You can view or reset credentials in the database service’s Variables tab
No tables visible after connecting
No tables visible after connecting
- Confirm your tables are in the
publicschema (PostgreSQL). If they’re in a custom schema, update the Schema field in VexiData - Check that you’re connecting to the correct database name