R
Railway•12mo ago
Sang Dang

About Private networking

Hi, I saw Railway has https://docs.railway.app/reference/private-networking Private network domain, do I understand correctly, that with this feature, I can use it to call between services as long as they are hosted on Railway? For example from the frontend service, I can call http://backend.railway.internal/api/posts to get the posts from backend?
Railway Docs
Private Networking | Railway Docs
Documentation for Railway
Solution:
I can call http://backend.railway.internal/api/posts to get the posts from backend
yes, only if this call is made from the sever side of for example a nextjs app...
Jump to solution
6 Replies
Percy
Percy•12mo ago
Project ID: N/A
Sang Dang
Sang Dang•12mo ago
N/A
Solution
Brody
Brody•12mo ago
I can call http://backend.railway.internal/api/posts to get the posts from backend
yes, only if this call is made from the sever side of for example a nextjs app
Brody
Brody•12mo ago
sidenote, you would need to set that backend to listen on a fixed port, and then use the port in the url when calling that internal domain
Sang Dang
Sang Dang•12mo ago
thanks @Brody , so it's similar to http://localhost:1337 😄 ?
Brody
Brody•12mo ago
very similar, just with friendly domain names