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?

3 Answers 3


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.

  • After some poking about, you're right. GameSpy4 is indeed UDP, and UDP and TCP naturally use the same port numbers without conflicting. Feb 5, 2013 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.

  • 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, 2012 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. Oct 19, 2012 at 1:31
  • I was right about it using the GameSpy4 protocol, but wrong about needing its own port. See the other answer. Feb 5, 2013 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .