The guide shows us the following image
You can consult the network of private railway guides for more information. railway guide private network
SOLUTIONS
1. - Once you've finished creating your app, go to Settings, find Deploy, and type the commands you want to run into one of the two options, as shown in the image below.
2.- You could use the DATABASE_PUBLIC_URL credentials, where you have the data to connect outside the internal network.