Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

There is a property in the Minecraft server.properties file allowing you to specify a query port for the server: query.port.

Can this be the same as the server's listening port?

If I have my Minecraft server listening on 25565, can the query port be the same or does it have to be different?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

Technically, I think the query port is UDP while the game port is TCP, so they should be able to share the same port number.

share|improve this answer
    
After some poking about, you're right. GameSpy4 is indeed UDP, and UDP and TCP naturally use the same port numbers without conflicting. –  SevenSidedDie Feb 5 '13 at 21:12

No it cannot, only one application can be bound to any one port, and Minecraft needs a separate port for queries and for listening. I'm not sure about what it does with them, but there's no way to use the same port for both.

Normally, you could not have two applications running through the same port. The difference in this scenario is that the Minecraft server uses a TCP port, while the query port uses a UDP port, so they can both run on the same number, but they're technically different ports.

share|improve this answer
    
I would say the query port allows the client to collect the info of the server (ping time, server name, MOTD, etc) leaving the other port strictly for connecting & playing –  Robotnik Oct 15 '12 at 22:40
2  
Yep. It implements the GameSpy4 protocol for querying the sort of server details you might be used to seeing in FPS multiplayer lobby screens: ping, connected/max player count, description string, server options enabled, etc. Definitely needs to be on its own port. –  SevenSidedDie Oct 19 '12 at 1:31
    
I was right about it using the GameSpy4 protocol, but wrong about needing its own port. See the other answer. –  SevenSidedDie Feb 5 '13 at 21:13

YES, they can share the same port number, as the game uses TCP and the query uses UDP. Just make sure that if you have this port forwarded that you forward both protocols.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.