Direct connection works when both computers are on the same WiFi or ethernet network

A LAN (Local Area Network) connection in Minecraft lets you play together on computers in the same room or building without going through the internet. One player hosts the world from their computer, and others join by entering that computer's local IP address. This is faster than online servers and works even if your internet is down, as long as the computers can see each other on the network.

The process differs slightly depending on whether you're using Minecraft Java Edition or Bedrock Edition, and whether you're on Windows, Mac, or Linux. The core steps are the same: one person opens their world to LAN, finds their local IP address, and shares it with others who type it into the server address field.

Key Takeaways

  • The host player opens their Minecraft world to LAN through the pause menu, which generates a port number you'll need to share.
  • Find your computer's local IP address using Command Prompt on Windows or Terminal on Mac, then give that address plus the port to other players.
  • Other players enter the IP address and port in the "Add Server" field as a single line: for example, 192.168.1.5:25565.
  • All computers must be connected to the same WiFi network or ethernet switch for the connection to work.
  • If the connection fails, check that Windows Firewall or your Mac's firewall isn't blocking Minecraft, and restart the game if needed.

Opening your world to LAN in Java Edition

Start Minecraft Java Edition and load the world you want to share. Once you're in the game, press Escape to open the pause menu. Look for the button labeled "Open to LAN" — it's usually in the upper left area of the pause screen. Click it.

A window will pop up showing a port number (usually something like 25565 or 25566). Write down this number. You can also choose a game mode for other players (Survival, Creative, or Adventure) and toggle PvP on or off. Once you've set these options, click "Start LAN World." The world is now open, and other players can join.

Opening your world to LAN in Bedrock Edition

Bedrock Edition (the version on Windows 10/11, Xbox, Nintendo Switch, and mobile) handles LAN differently. Load your world, then press Escape to pause. Look for "Invite to Game" or a similar option in the pause menu. Select it, then choose "Local Network" as the invitation type.

Bedrock will broadcast your world on the local network automatically. Other players on the same WiFi will see your world appear in their "Friends" tab or server list within a few seconds. They can click on it and join without needing an IP address or port number. If they don't see it, make sure they're on the exact same WiFi network and restart their game.

Finding your computer's local IP address

Other players need your computer's local IP address to join in Java Edition. This is different from your internet IP address — it's the address your computer uses only within your home or office network. It usually starts with 192.168 or 10.0.

On Windows: Press the Windows key and type "cmd" to open Command Prompt. Type ipconfig and press Enter. Look for "IPv4 Address" under your active network connection. It will look like 192.168.1.5 or similar. Copy this number.

On Mac: Open System Preferences, then click "Network." Select your WiFi or ethernet connection from the left side. Your local IP address appears on the right side, labeled "IP Address." It starts with 192.168 or 10.0.

On Linux: Open Terminal and type hostname -I, then press Enter. Your local IP address will appear in the output.

Giving other players the connection information

Once you have your IP address and port number, combine them into a single line with a colon between them. For example, if your IP is 192.168.1.5 and your port is 25565, you would give other players: 192.168.1.5:25565. Text this to them, write it down, or say it out loud.

The other players open Minecraft Java Edition, click "Multiplayer," then click "Add Server." In the "Server Address" field, they paste or type the IP and port exactly as you gave it. They can name the server anything they want in the "Server Name" field. Once they click "Done," the server appears in their list, and they can click it to join.

Checking firewall settings if the connection fails

If other players can't see or connect to your world, your firewall may be blocking Minecraft. On Windows: Open Windows Defender Firewall (search for it in the Start menu). Click "Allow an app through firewall." Look for Minecraft Java Edition or javaw.exe in the list. If it's there but unchecked, check both the "Private" and "Public" boxes. If it's not in the list, click "Allow another app," find Minecraft's installation folder, and select javaw.exe.

On Mac: Open System Preferences, then click "Security & Privacy." Go to the "Firewall Options" tab. Click the lock icon to make changes, then add Minecraft to the list of allowed apps. You may need to restart Minecraft after making this change.

After adjusting firewall settings, close and reopen Minecraft completely. Have the host click "Open to LAN" again, and other players should be able to join.

Troubleshooting common connection problems

If players are on the same network but still can't connect, restart both the host computer and the joining player's computer. Sometimes the network needs a moment to recognize new connections. Have the host close the world and open it to LAN again, which generates a fresh port number.

If only some players can join while others can't, the problem is usually on the joining player's end — their firewall, their game version, or their network connection. Ask them to check that Minecraft is allowed through their firewall and that they're typing the IP address and port correctly (no spaces, no extra characters).

If you're using a guest network or a network that isolates devices from each other, LAN connections won't work. Switch to your main WiFi network. Some school and office networks also block LAN connections for security reasons — in those cases, you'll need to use an online server instead.

Frequently Asked Questions

Do I need to port forward to use LAN?

No. Port forwarding is only needed if you want people outside your home network to join. LAN connections stay within your local network and don't need any router changes.

Can I use LAN on different Minecraft versions?

Java Edition players can only join other Java Edition worlds. Bedrock Edition players can only join other Bedrock worlds. You cannot mix Java and Bedrock on the same LAN world. Make sure everyone is using the same version.

What if the host computer goes to sleep?

The LAN world closes when ready when the host computer sleeps or shuts down. All other players will be disconnected. The host needs to stay awake and running Minecraft for others to stay connected.

Can I use LAN with a wired ethernet connection instead of WiFi?

Yes. As long as all computers are connected to the same network — whether through WiFi or ethernet cables plugged into the same router or switch — LAN will work the same way.

Why does my port number change every time I open to LAN?

Minecraft assigns a new port number each time you open a world to LAN. This is normal. Just give the new port number to other players, and they can join using the updated address.