Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › home networking

How to Change the Port on a Minecraft Server (Java and Bedrock)

By Freedom251 Team · · 10 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To change a Minecraft server’s gameplay port, stop the server, edit the correct server.properties file, change the edition’s server-port value, save it, and restart. Internet players will not be able to connect until the same port is allowed through the host firewall and forwarded by the router to the server computer. Java Edition uses port 25565 by default; Bedrock Dedicated Server uses 19132 for IPv4 and 19133 for IPv6.

What changing the port actually does

A Minecraft server listens on a network port for incoming player connections. Changing that listener changes the number players must use when connecting, but it does not automatically change the router or firewall configuration around it.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For Java Edition, the gameplay listener is controlled by server-port in server.properties. The documented default is 25565. Paper’s property reference also distinguishes this setting from the optional query and RCON services.

For Bedrock Dedicated Server, the equivalent settings are server-port and server-portv6, with documented defaults of 19132 and 19133. The two values correspond to the IPv4 and IPv6 listeners.

#1 Best Overall
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code
  • DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

Changing only the text file is therefore sufficient for a local test on the server machine, but it is not sufficient for friends connecting over the internet. The operating-system firewall and router forwarding rule must be updated to match.

Before editing: choose a safe, unused port

  • Choose a port that is not already occupied by another service on the server computer. A nearby alternative such as 25566 is often easier to remember, but it is only valid if no other application is using it.
  • Keep the port number consistent across the server configuration, firewall rule, router forwarding rule, and the address given to players.
  • Avoid changing ports while the server is running. The server can overwrite or ignore edits made during operation, and a restart is required before the new listener is active.
  • Record the current setting before you begin so you can restore it if a later network change causes problems.
  • If you do not control the router or your internet connection cannot accept inbound connections, changing the server file will not make the server publicly reachable. A managed Minecraft server is an alternative in that situation.

Java Edition: change the gameplay port

1. Stop the server cleanly

In the server console, issue the normal stop command and wait until the process has finished saving the world and exited. If you launch the server from a script or a control panel, use its Stop control instead. Do not edit the file while Java is still running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Open the correct server.properties

Open the server.properties file in the folder used by the server process. If you have multiple worlds, test instances, or launch directories, confirm the path in the startup script or console output; editing a different copy has no effect.

Find the line:

server-port=25565

Replace only the number. For example:

server-port=25566

Leave the setting name, equals sign, and file format intact. Do not add a colon, quotation marks, or a second server-port entry.

Rank #2
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code
  • ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

3. Save the file and restart

Save the file as plain text in the same server directory, then start the server using the same command or launcher you normally use. Watch the startup log for the bind or listening message and confirm that it reports the port you selected. If the process fails to start because the address is already in use, stop the conflicting service or choose another unused port.

Java properties that do not move player traffic

Property Purpose Change it when moving the gameplay port?
server-port Normal Java player connections Yes
query.port Optional server query service No, unless you separately need to move query traffic
rcon.port Remote Console (RCON) service No, unless you separately need to move RCON
management-server-port Minecraft Server Management Protocol on recent Java releases No; it is not the gameplay listener

Changing query.port, rcon.port, or management-server-port will not make ordinary players connect on a different port. Keep those services separate when checking your configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Allow the new Java port through the host firewall

The computer running the server may reject the connection even when the Minecraft process is listening correctly. Create or update an inbound firewall rule for the selected Java gameplay port. Java Edition’s normal gameplay traffic should be allowed on the selected TCP port.

Windows

  1. Open Windows Security.
  2. Select Firewall & network protection, then Advanced settings.
  3. Open Inbound Rules and create a new port rule for the selected TCP port.
  4. Allow the connection for the network profiles that apply to the server computer, and give the rule a name that identifies the Minecraft port.
  5. Disable or revise an old rule if it allows only the previous port.

Third-party security suites can have their own network controls. If Windows shows an allow rule but the port remains unreachable, check those controls as well.

Rank #3
Minecraft | Standard Edition | XBOX Digital Code
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
  • SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
  • COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.

Linux, macOS, and other systems

Use the host operating system’s firewall tool to allow the selected Java TCP port. The exact menu or command depends on the distribution and firewall in use. Confirm that the rule applies to the network interface on which the server is listening, then reload the firewall before testing. If your system has no active firewall, do not create a rule merely for appearance; first verify which security layer is actually filtering traffic.

Forward the port on your router

Port forwarding connects an internet-facing port on the router to the private address of the server computer. Mojang’s setup guidance says to forward the port listed in server.properties; when you choose a non-default Java port, the external and internal port should both use that selected value.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Give the server computer a stable private LAN address. A DHCP reservation on the router is preferable to relying on an address that may change after a reboot.
  2. Sign in to the router’s administration interface and open its Port Forwarding, NAT, or similarly named section.
  3. Create a rule targeting the server computer’s current private LAN IP address. Do not enter the public internet address in the destination field.
  4. Set the external port and internal port to the Java server-port value. Select the protocol required by the Java server, normally TCP.
  5. Save or apply the rule. Some routers restart networking briefly when a forwarding rule changes.
  6. Leave the Minecraft server running while you test from outside the home network.

A router with configurable port-forwarding controls is enough; buying new equipment is unnecessary if your existing router already supports this feature. Router menus differ by manufacturer, so use the labels in your own interface.

Give players the right address

Players outside your home network need the public IP address or a DNS name that points to it. When the Java port is not 25565, append a colon and the port number:

Rank #4
Minecraft
  • Skins! We have biome settlers, city folk, town folk, and more!
  • The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
  • Cross platform play for up to five players between Pocket Edition and Windows 10
  • Revamped touch controls, controller support, and a controller mapping screen
  • Enhanced Weather effects! Accumulating snow and more
203.0.113.25:25566

Replace the example address with your actual public address. Players on the same LAN may instead use the server computer’s private address and the selected port, for example 192.168.1.40:25566. Do not give internet players the private address; it is not routable from the public internet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you use a DNS name, update it whenever your public IP changes. A name does not bypass the router or firewall; it only provides a stable way to find the public address.

Bedrock Dedicated Server: use its separate settings

Bedrock Dedicated Server does not use Java’s default port. Microsoft documents these settings in the Bedrock server’s server.properties:

Setting Documented default Use
server-port 19132 Bedrock IPv4 listener
server-portv6 19133 Bedrock IPv6 listener

Change the Bedrock port

  1. Stop Bedrock Dedicated Server and wait for the process to exit.
  2. Open the Bedrock server’s own server.properties, not a Java server’s file.
  3. Change server-port for IPv4, server-portv6 for IPv6, or both if you provide both address families.
  4. Save the file and restart the server.
  5. Confirm in the startup output that the server bound to the intended port or ports.
  6. Allow the configured Bedrock ports in the host firewall according to the Bedrock documentation and your operating system.
  7. Update router forwarding so each configured external port reaches the Bedrock host’s private LAN address.

Use the IPv4 port when players connect through an IPv4 public address and the IPv6 port when they use IPv6. If you change only one setting, do not advertise the other address family as available.

Best Value
Minecraft - Bedrock Edition PS4
  • Play and share with friends on console, mobile and Windows 10
  • discover community creations in the new in-game store
  • access new mini games and game modes through servers
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test from outside your network

Testing from the server computer proves only that the process is running locally. Testing from another device on the same home network can also be misleading because some routers do not support NAT loopback, sometimes called hairpin NAT.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Start the server and confirm the log shows the selected listener.
  2. Check the host firewall rule and router forwarding rule against the same port number.
  3. Use a device on a different connection, such as a phone using cellular data, or ask a friend outside your LAN to connect.
  4. Give the tester the public IP or DNS name plus the non-default port.
  5. Keep the server running for the entire test; a closed port is expected when no process is listening.

Do not rely on a generic online port checker as the only proof. Some checkers probe only one protocol, cache results, or report a port as closed while the server is stopped. A real connection attempt from an external network is the meaningful test.

Troubleshooting: why friends still cannot connect

Symptom Likely cause What to check
The server still accepts connections only on 25565 The wrong file was edited, or the server was not restarted Stop the process, verify the active server directory, inspect server-port, and restart
The server will not start after the change Another service already occupies the selected port Choose an unused port or stop the conflicting service, then check the startup log
Local players connect, internet players cannot Router forwarding or the public address is wrong Target the host’s private LAN IP, match external and internal ports, and test from outside the LAN
The router rule appears correct but the port is closed The host firewall is blocking it, or the server is not listening Allow the selected port in the host firewall and verify the bind message in the log
It worked until the computer restarted The server’s private LAN IP changed Create a DHCP reservation or update the forwarding destination
Same-house testing fails while a friend can connect The router lacks NAT loopback or hairpin support Use the private LAN address inside the home, or test with a genuinely external connection
Neither IPv4 nor IPv6 connections work from the internet The ISP may use carrier-grade NAT or block inbound connections Ask the ISP about inbound reachability and whether the connection has a public address
Players are using the right number but the wrong destination They were given the private IP, an old public IP, or an incomplete address Send the current public IP or DNS name and append :port for a non-default Java port

Carrier-grade NAT is especially important: the router may show a WAN address that is not directly reachable from the internet. In that case, normal port forwarding cannot expose the server. You need an ISP option that supplies inbound reachability, a network arrangement that provides it, or managed Minecraft hosting.

Self-hosting versus managed hosting

Changing a port is mainly a network-administration task. If you can configure the router and firewall, self-hosting gives you direct control. If you cannot receive inbound traffic or do not want to maintain the network, managed hosting removes much of that work.

Consideration Self-hosted server Managed Minecraft hosting
Configuration control Full control of the server files, ports, and operating system Control depends on the host’s panel and policies
Router and firewall work You configure forwarding, firewall rules, and address stability Usually handled by the provider’s infrastructure
Public reachability Requires a reachable public connection and an active server Designed to provide a public endpoint
Recurring cost Uses your existing computer and connection, with their electricity and bandwidth costs Requires a recurring hosting charge
Performance Depends on your hardware, upload capacity, and other home traffic Depends on the plan and provider hardware
Backups You must schedule and verify your own backups Backup tools and retention vary by provider
Support You diagnose the operating system and network Support scope varies and may not include custom server problems

Choose the managed option only because it solves a reachability or maintenance problem, not because a different Minecraft property is required. A hosted server still needs its own configured gameplay port, but you normally do not edit a residential router.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Operational and security checks after changing the port

  • Remove or disable forwarding for the old port if no other service uses it.
  • Keep the server software and operating system updated through your normal maintenance process.
  • Expose only the services you need. Do not forward query, RCON, or management ports just because they appear near server-port.
  • Use a strong administrator credential for any remote-management service and restrict access where your software supports it.
  • Watch server and firewall logs after the change for repeated connection attempts or unexpected services listening on the selected port.
  • Back up the world and configuration before making further network changes.

Final checklists

Java Edition

  • The server is stopped while server.properties is edited.
  • server-port contains an unused value, such as 25566.
  • The server log confirms that value after restart.
  • The host firewall allows the selected Java TCP port.
  • The router forwards the same external and internal port to the host’s private LAN IP.
  • Players receive the public address plus :port when the value is not 25565.
  • An external-network test succeeds while the server is running.

Bedrock Dedicated Server

  • The Bedrock server is stopped before editing its own properties file.
  • server-port and, when needed, server-portv6 contain the intended values.
  • The firewall allows the configured Bedrock ports.
  • Router forwarding targets the Bedrock host’s current private LAN IP.
  • Players use an address from the matching IPv4 or IPv6 family.
  • The test is performed from outside the home network.

The essential rule is simple: the port in the server configuration, the host firewall, the router forwarding rule, and the player’s address must all agree. Java’s normal default is 25565; Bedrock Dedicated Server’s documented defaults are 19132 and 19133.

Quick Recap

Bestseller No. 4
Minecraft
Minecraft
Skins! We have biome settlers, city folk, town folk, and more!; The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
$6.99
Bestseller No. 5
Minecraft - Bedrock Edition PS4
Minecraft - Bedrock Edition PS4
Play and share with friends on console, mobile and Windows 10; discover community creations in the new in-game store
$42.98

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

home networkingMinecraftMinecraft BedrockMinecraft Java Editionport forwardingserver administration

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.