The ports Minecraft uses by default
The game port is the only one every server needs. Everything else is optional and only opens if you enable the feature that uses it.
- 25565 TCP, Java Edition game connections (server-port)
- 19132, the default port for Geyser crossplay; Geyser now uses it over both TCP and UDP, so it cannot match the Java server port
- 25575 TCP, RCON remote console, only when enable-rcon is true
- The query port (query.port), UDP, used by server lists for detailed status when enable-query is true
- 24454 UDP, Simple Voice Chat by default
- 8100 for BlueMap and 8123 for Dynmap web maps, both TCP
Changing the port a server listens on
The Java game port is set by server-port in server.properties. Stop the server, change the number, and start it again. On a hosted server, the port is assigned by the host and changing it in the file without a matching allocation will stop players connecting, so use the port the panel gives you.
When the port is anything other than 25565, players must add it to the address after a colon, as in play.example.com:25570. An SRV record on your domain hides it, so players can type just the domain.
Running more than one server on one machine
Two servers cannot listen on the same port on the same IP address. If you run a lobby and a survival server side by side, give each its own port, for example 25565 and 25566. Behind a proxy such as Velocity, only the proxy port needs to be reachable from the internet and the backend servers can sit on ports that players never see.
Sharing one port between TCP and UDP
TCP and UDP are separate, so a TCP game port and a UDP feature can use the same number. That is useful on hosts that give you a single port: Simple Voice Chat can be pointed at the same number as the Java server, because Java uses TCP and it uses UDP. Geyser is different: it now uses its port over both TCP and UDP, so it needs a number of its own that no other program uses on either protocol.