Minecraft — it's not just a game, but a whole world that becomes even more exciting when you have friends. But what if you want to play together over a local network and only have Wi-Fi routerConnecting to a server via a wireless network has its own nuances: from setting up the host to finding the IP address and resolving common errors like "Unable to connect to the server."
In this article we will look at all stages — from preparing the host computer to connecting players to Windows, macOS or LinuxYou will learn how to properly open a port in a firewall, why a server is sometimes not visible in the list, and how to reduce delays (ping) when playing over Wi-Fi. And if something goes wrong, there's a section at the end with solutions to the most common problems.
Spoiler: for a successful connection it is enough Correctly specify the host's local IP address in the Minecraft client and ensure that both devices are on the same networkBut the devil is in the details – let's get to the bottom of it.
1. Preparing the Host: Running a Minecraft Server
Before you connect, you need to create a server on one of the computers. This device will act as host — all other players will connect to it. There are several options for starting a server:
- 📦 Official server from Mojang - the most reliable method, but requires downloading
server.jarfrom the website minecraft.net. - 🎮 Local world in LAN mode — the easiest, but only suitable for temporary play (the server closes when you leave the world).
- ⚡ Third-party launchers (For example, Forge or Fabric) - if mods are needed.
Let's consider the most universal option - launching an official server:
- Download
server.jarWith official website (select the version that matches the players client). - Create a folder for the server (eg.
C:\Minecraft_Server) and place it thereserver.jar. - Run the file
server.jardouble click - it will generate configuration files (includingeula.txt). - Open
eula.txtand replaceeula=falseoneula=true, then save the file. - Restart the server. If everything is done correctly, the following line will appear in the console:
[Server thread/INFO]: Done!.
The server is now running, but you can't connect to it over the network yet. To do this, you need to allow incoming connections in the firewall and configure the local network.
2. Setting up a local network for Wi-Fi connection
In order for other players to connect to your server, both devices (host and client) must be in one local networkWhen connected via Wi-Fi, this means:
- 📶 Both computers are connected to the same router (it doesn’t matter whether via cable or Wi-Fi).
- 🔄 On the router client isolation mode is disabled (AP Isolation), if any.
- 🔒 Server and clients use single IP address range (usually
192.168.x.xor10.0.x.x).
It's easy to check that devices are on the same network:
- On the host (the computer running the server), click
Win + R, entercmdand run the command:
ipconfig
- Find the line
IPv4 address(For example,192.168.1.100). This is the local IP of the host. - On the client computer, run the same command and compare the first three numbers of the IP address (e.g.
192.168.1.x). They must match.
If the IP addresses do not match, check:
- Are both devices connected to the same router (sometimes Wi-Fi and Ethernet can be on different subnets).
- Is the router in the offline mode? Guest Network (guest network) - it isolates devices.
3. Allow connections in the Windows/macOS/Linux firewall
By default, the operating system blocks incoming connections to the server. In order for players to connect, they need to add an exception to the firewall for the port 25565 (standard Minecraft port).
For Windows:
- Open
Control Panel → Windows Firewall → Advanced settings. - Select
Inbound Rules → Create Rule. - Specify the rule type
For the port, protocolTCP, port25565. - Allow the connection and apply the rule to all profiles (domain, private, public).
For macOS:
- Open
System Preferences → Security & Privacy → Firewall. - Click
Firewall settingsand add Java to the list of allowed programs. - If you need to open a port manually, use Terminal:
sudo pfctl -esudo pfctl -F all
echo "pass in proto tcp from any to any port 25565" | sudo tee -a /etc/pf.conf
sudo pfctl -f /etc/pf.conf
For Linux (Ubuntu/Debian):
sudo ufw allow 25565/tcp
Minecraft server is up and running without errors|
Port 25565 is open in the firewall|
Local IP addresses of host and client on the same subnet|
AP Isolation is disabled on the router.
After configuring the firewall, restart the server. You can now connect to it using the local IP address.
4. Connecting to the server from another computer
Once the server is running and the network is configured, all that's left to do is connect. To do this:
- Launch Minecraft on the client computer.
- Select
Network Play → Direct Connection. - Enter the host's local IP address and port separated by a colon (e.g.
192.168.1.100:25565). - Click
Connect.
If everything is set up correctly, you will see a message Connecting to server..., and then you will find yourself in the world.
What should I do if the server is not visible in the list of LAN games?
By default, Minecraft only shows LAN servers running in LAN mode in the list. Open to local network (via the pause menu in single player). If you run server.jar, you need to connect through Direct connection, entering the IP manually.
If the connection fails, check:
- 🔌 Is the IP address entered correctly (no typos or extra characters).
- 🔥 Is your antivirus blocking the connection (for example, Avast or Kaspersky may close the port).
- 📡 Are there any problems with Wi-Fi (try connecting via cable for testing).
5. Optimizing Wi-Fi connection latency and stability
Playing on Wi-Fi may suffer from high ping or connection breaks. To improve stability:
| Problem | Cause | Solution |
|---|---|---|
| High ping (latency) | Wi-Fi interference, weak signal | Switch the router to a channel 5 GHz (less busy) or use a cable |
| Connection breaks | Saving energy on your Wi-Fi adapter | Disable power saving mode in the adapter settings (in Device Manager) |
| Lags when loading chunks | Low network bandwidth | Limit the number of devices simultaneously connected to your router |
| The server crashes | Insufficient RAM on the host | Allocate more RAM to the server via the parameter -Xmx in launch server.jar |
For maximum stability:
- 📡 Use Wi-Fi 5 (802.11ac) or Wi-Fi 6 - they are less susceptible to interference.
- 🔌 Connect the host via cable, and leave the clients on Wi-Fi (this will reduce the network load).
- ⚡ Enable it in your router settings
QoS(Quality of Service) and set the priority for the port25565.
6. Solving typical connection errors
Even with proper setup, errors can still occur. Here are the most common ones and how to fix them:
⚠️ Attention: If you use VPN or proxy on the host or client, disable them - they may block local connections.
| Error | Possible cause | Solution |
|---|---|---|
Failed to connect to the server |
Invalid IP address or port | Check the host IP with the command ipconfig and indicate it without errors |
Connection refused |
The server is not running or the port is closed. | Restart the server and check the firewall |
IO: Netty IOException |
Network problems (for example, a router is blocking traffic) | Reboot your router or turn it off SPI Firewall |
| The server is listed but won't connect. | Different versions of the game on the host and client | Make sure the versions are Minecraft match (for example, 1.20.4) |
If the error persists, try:
- Run the command on the host
netstat -aand check if the port is listening25565. - Disable it on the router
UPnP(if enabled) and manually forward the port25565to the host IP. - Temporarily disable antivirus software on both computers for testing.
7. Alternative connection methods (without a local network)
If you can't connect via Wi-Fi, there are alternatives:
- 🌍 Port forwarding on a router — allows you to play online, but requires a public IP (not available with all providers).
- 🔗 Services like Hamachi or ZeroTier — create a virtual local area network via the Internet.
- ☁️ Rented server (For example, Aternos or Minehut) - does not require configuration, but may lag.
To forward ports on a router:
- Go to your router's control panel (usually at
192.168.1.1). - Find the section
Port ForwardingorPort forwarding. - Add rule: external port
25565, internal IP (local IP of the host), internal port25565. - Save the settings and reboot the router.
⚠️ Attention: Port forwarding exposes your server to the internet, which can be unsafe. Use strong server passwords and update them regularly. Minecraft.
FAQ: Frequently asked questions about connecting to a Minecraft server
Is it possible to connect to the server from a phone or tablet?
Yes, but only if it is installed on your mobile device. Minecraft: Bedrock EditionTo connect:
- Make sure your phone is connected to the same Wi-Fi as the host.
- IN Minecraft BE select
Play → Servers → Add Server. - Enter the local host IP and port (e.g.
192.168.1.100, port19132for Bedrock).
Please note: Java Edition (for PC) and Bedrock Edition (for mobile devices) incompatible among themselves!
How do I play on a local network if I have a dynamic IP?
If your router uses dynamic IP addresses (DHCP), the local host address may change during a reboot. To avoid this:
- Go to your router settings and find the section
DHCP Reservation(DHCP Reservation). - Bind the host's MAC address to a fixed IP (e.g.
192.168.1.100). - Or configure a static IP on the host manually (in
Connection properties).
After this, the host IP will not change, and players will be able to connect to the same address.
Why does the server lag when I play on Wi-Fi, but everything is fine with a cable?
Wi-Fi connections are more susceptible to interference and latency, especially at frequencies 2.4 GHzPossible reasons:
- Weak signal (check the signal strength in Wi-Fi settings).
- Interference from other devices (microwaves, cordless phones).
- Channel congestion (many devices using the same frequency).
Solutions:
- Switch to frequency
5 GHz(less busy). - Reduce the distance between the router and the device.
- In the router settings, change the Wi-Fi channel to a less busy one (use utilities like Wi-Fi Analyzer for analysis).
Is it possible to connect to the server from another router (for example, through a neighbor)?
No, unless both routers are connected to the same network. Local play is only possible within the same subnet. Alternatives:
- Use Hamachi or similar tools for creating a virtual network.
- Forward ports on your router and play online (white IP required).
- Rent an external server (for example, on Aternos).
Connecting "through a neighbor" without additional settings is impossible—their router will block incoming connections from another network.
How do I find out what port my Minecraft server is using?
By default server Minecraft: Java Edition uses the port 25565. If you changed it in the file server.properties (line server-port=), specify the new port when connecting.
To check which port is listening:
- On the host, open a command prompt (
Win + R → cmd). - Run the command:
netstat -a | findstr "LISTENING"
In the output, find the line with 25565 (or your custom port). If it's not there, the server isn't running or the port is blocked.