itzg/minecraft-server unable to connect
morgandri1
HOBBYOP

4 months ago

Hello!
I'm trying to deploy an instance of the itzg/minecraft-server image, and am unable to connect to it for some reason. When i deploy the template, the TCP address automatically points to 25565, so i know it's not a mismatched port or anything

$10 Bounty

4 Replies

You are connecting to the Railway provided port, right?


Railway proxies abc.rlwy.net:???? to abc.railway.internal:25565
You have to use the first port to connect


debearr
HOBBY

4 months ago

Hi,

👋🏽 people_hugging emoji

Just a heads up, the reason you can’t connect is because Railway doesn’t expose port 25565 directly. That port only exists inside the container. Railway assigns a random public port on every deploy and then proxies traffic from that public port to 25565 internally.

To fix it, go to your service in Railway → Deployments → Networking tab. Look for the “TCP Public Port.” That’s the port you actually need to use.

Instead of connecting to abc.rlwy.net:25565, you need to connect to abc.rlwy.net:<the-public-port-they-give-you>. It’ll be something like 34829 or 51244 depending on the deploy.

As long as your container is listening on 25565 inside, you just connect using the Railway-assigned port outside and it’ll work.


morgandri1
HOBBYOP

4 months ago

I’m aware, I’m trying to connect to the auto-generated port which points to 25565 in railways network.


Loading...