NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

How to enable query on a Minecraft server

Turn on enable-query so server list sites and tools can read your Minecraft server's player list, plugins and version over UDP.

Updated · 2 min read

Query is an optional protocol that lets external tools read details about your server, such as the player list, map name and plugins. Turn it on with enable-query=true in server.properties and restart.

Do you need query?

Often not. There are two different ways tools get information from a Minecraft server:

MethodEnabled by defaultWhat it returns
Server list pingYes, always onMOTD, version, online and max players, a sample of player names, icon
Query (GameSpy4, UDP)NoFull player list, plugins, map name, game type and more

The multiplayer list, most status bots and many server list websites use the server list ping, which works without any setup. Enable query only if a site or tool specifically asks for it.

Enable query

  1. Stop the server.
  2. Edit server.properties:
enable-query=true
query.port=25565
  1. Save and start the server. The console shows a message that the query listener started.

Which port to use

Query runs over UDP, while the game uses TCP, so both can share the same port number. On Schokr, the server template sets query.port to your server's allocated port when the server starts, so you normally do not need to change it. Tools should query the same address and port that players connect to.

If you want query on a different port, you would need an extra allocation from your server's Network section, which costs 25 credits (unlimited with Schokr One). Using the game port is simpler.

Test it

From a computer with Python, the mcstatus package can query your server:

pip install mcstatus
mcstatus <server-address>:<port> query

Replace <server-address>:<port> with the address from the Schokr console.

What query exposes

With query on, anyone can see:

  • the full list of online player names,
  • your installed plugins and their versions (on Paper and other Bukkit-based servers),
  • the world name and server software.

Listing your plugins and versions can help attackers look for known vulnerable plugins. Keep plugins updated. On Paper, you can stop query from listing plugins in bukkit.yml:

settings:
  query-plugins: false

Query not responding?

  • Restart after changing server.properties.
  • Make sure the tool uses the game port, not 25565, unless that is your actual port.
  • Some networks block UDP. Try from a different connection.