Error: P1001: Can't reach database server at
postgres.railway.internal:5432
lukkyz
PROOP

9 months ago

I'm using Railway with SvelteKit to deploy an app, and I got this error during build time : Error: P1001: Can't reach database server at postgres.railway.internal:5432

Please make sure your database server is running at postgres.railway.internal:5432

The database is running successfully.

I've read on this thread : https://station.railway.com/questions/can-t-reach-database-server-at-postgres-153e5903 that the private network is not available during build time, but I can't run the database migration & generation in pre-deploy because the build command depend on it, Is there a solution?

$10 Bounty

3 Replies

Railway
BOT

9 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


clashing
FREE

9 months ago

You have to use the DATABASE_URL of the deployed PG instance so that the correct internal URI could be used by your server/file!

Attachments


clashing

![](https://station-server.railway.com/attachments/att_01k32k7159enaar232htc8qta3) You have to use the **DATABASE\_URL** of the deployed PG instance so that the correct internal URI could be used by your server/file!

clashing
FREE

9 months ago

lukkyz, any update?

If that hepled, do mark that reply as the solution


Welcome!

Sign in to your Railway account to join the conversation.

Loading...