Anonymous
FREEOP
a year ago
Hi. I'm trying to connect backend to database using private/internal Railway networking.
DATABASE_URL="${{db.DATABASE_URL}}"
Can't reach database server at `db.railway.internal:5432``Added a new database service, tried to connect it - still the same issue:
DATABASE_URL="${{Postgres-oOgJ.DATABASE_URL}}"
Can't reach database server at `postgres-oogj.railway.internal:5432`Region: EU West, Amsterdam (Metal)
Project id: f4aa0f17-22c4-4248-8604-1876649a9647
I would be thankful for any ideas!
1 Replies
Hey Dan, I think I'd check the actual connection string. You'll want to format it as follows:
postgresql://:@:/?schema=For example:
postgresql://postgres:PNMEWMpxgXBNMDpbAaadkSxizXyYjkFw@postgres-bcqu.railway.internal:5432/railwayCan you try doing it by hand first before using a reference variable in order to debug? Then maybe you can get some better insight into what is going on.
You may also want to check your logs to see if you can get a richer error message to point you in the right direction.
@Dan