This server.properties setting controls query port. Edit it in a stopped server, retain a backup, and restart only after checking that the value is valid for your server build.
Quick answer
Copy the example only after checking every target, coordinate, item ID, and setting. Java, Bedrock, older releases, and custom servers can differ.
Copyable example
These examples come from the source page. A command typed in player chat begins with /; a server console may use a different entry format.
query.port=25565Use it safely
- Confirm your game edition, release, and the command or server permission level.
- Replace example targets and coordinates with real values; use a backup world for changes that remove blocks or entities.
- Run the smallest possible test and check the response or server log.
- If the command fails, inspect the argument at the error marker and compare syntax with the current official reference.
For server.properties, stop the server before editing the file, keep a copy of the previous line, and restart to apply a saved change.
Official sources and version scope
Examples are based on the original BlockGuide research snapshot dated 2026-10-12. Check the current edition and release before changing a live world.