R
Railway14mo ago
harshjv

Incorrect hostname with private networking

I've set mongo-2.railway.internal (or mongo-2) as the endpoint name for private networking on the UI, however, upon running hostname returns railway Service ID: 46c01986-5e99-4fd6-a662-f79de7b4dd67 Deployment ID: 1732be1e-b0c3-443f-a7cc-de8808e6cf43
4 Replies
Percy
Percy14mo ago
Project ID: 46c01986-5e99-4fd6-a662-f79de7b4dd67,1732be1e-b0c3-443f-a7cc-de8808e6cf43
Brody
Brody14mo ago
totally normal, you want to read from RAILWAY_PRIVATE_DOMAIN
harshjv
harshjv14mo ago
mongo relies on hostname to initiate replica setup.
Brody
Brody14mo ago
ah okay you didn't say it needed to be HOSTNAME just set a variable HOSTNAME=${{RAILWAY_PRIVATE_DOMAIN}} https://utilities.up.railway.app/env-vars?prefix=HOST
Want results from more Discord servers?
Add your server