Database URL not work

I'm trying to connect my NextJs application to a Postgres database, but Private Networking isn't working. Using Public Networking works perfectly. Do I need to configure anything else?

Attachments

Solved$10 Bounty

Pinned Solution

clashing
HOBBY

6 months ago

https://docs.railway.com/reference/private-networking#caveats

It is not available during the build process. I hope that answers your query

Attachments

4 Replies

Railway
BOT

6 months ago


clashing
HOBBY

6 months ago

https://docs.railway.com/guides/private-networking#node--next

For the server to talk via private networking, it should listen on IPv6. Specifically, for your nextJS application, you can update your start command to bind to both IPv4 and IPv6. (as prescribed in the documentation):

next start --hostname :: --port ${PORT-3000}

Change the port according to your needs & refer to the linked documentation page to get a better understanding of what needs to be done.

If that helps to resolve your issue, do mark this as the solution v emoji


Unfortunately, the error persists. It seems I can't access the database via private network during the project's build phase.


fabriziofeitosa

Unfortunately, the error persists. It seems I can't access the database via private network during the project's build phase.

clashing
HOBBY

6 months ago

https://docs.railway.com/reference/private-networking#caveats

It is not available during the build process. I hope that answers your query

Attachments


Status changed to Solved christian 6 months ago


Loading...