Can the query.port setting be the same as the Minecraft server port?
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
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.
1No 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.
3YES, 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.