How to play Minecraft with a friend on PC over Wi-Fi: a complete guide from setting up a network to launching a server

Minecraft It's not just a game, but a whole world that becomes even more exciting when you can explore it with friends. But what if you want to play with two people over a local network? without purchasing a reality server or using third-party platforms? In this article, we'll look at how to organize a co-op game Wi-Fi between two computers - from setting up a router to launching your own server and solving common connection problems.

Many people mistakenly think that a paid server is required for a multiplayer game or Minecraft RealmsIn fact, if both players are on the same local network (for example, connected to the same router), you can create a server directly on one of the PCs and connect to it via LANThis method works for both Java Edition, and for Bedrock Edition, but with some nuances. We will focus on Java versions, as it offers more options for local hosting.

Important: If you've never set up a network or server before, don't worry—the process is simpler than it seems. Just follow the instructions and double-check each step. And if something goes wrong, you'll find solutions to the most common errors at the end of the article.

1. Preparation: What you need to play over Wi-Fi

Before you begin setting up, make sure you have everything you need:

  • 🖥️ Two computers (or laptops) with the installed Minecraft Java Edition one version (for example, 1.20.4). Different versions of the game are incompatible!
  • 📶 One Wi-Fi router to which both devices are connected. A wired connection can also be used (Ethernet), but in this article we focus on wireless networking.
  • 🔌 A stable internet connection (not necessarily high-speed, but without frequent interruptions).
  • ⚙️ Administrator rights on the PC that will host the server (to configure the firewall and ports).

If you have Bedrock Edition (Windows 10/11 version from the Microsoft Store), the connection process will be simpler, but there are limitations: for example, you can't use mods. In this case, simply open the world for LAN in the pause menu (Esc → "Settings" → "Multiplayer" → "Local Network"). However, for full control over the server (mods, plugins, world settings) it is better to use Java version.

Advice: Before you begin, make sure that VPN and proxy are disabled on both PCs—they may be blocking the local connection. Also, temporarily disable your antivirus (for example, Avast or Kaspersky), as it may block the game's network traffic.

📊 What version of Minecraft are you using?
Java Edition
Bedrock Edition (Windows 10/11)
Console version
Don't know

2. Setting up a local network for Minecraft

For computers to "see" each other on the network, you need to make sure they're on the same subnet and aren't blocked by a firewall. Here's what to do:

  1. Check the IP addresses of both PCs:
    • Click Win + R, enter cmd and run the command ipconfig.
    • Find the line IPv4 address - it must start with the same numbers (for example, 192.168.1.x). If the first three blocks are different (for example, 192.168.0.x And 192.168.1.x), this means that the PCs are connected to different networks.
  • Turn off Internet Connection Sharing (ICS):

    Sometimes Windows automatically enables ICS, which interferes with the local connection. To disable it:

    Control Panel → Network and Internet → Network and Sharing Center → Change adapter settings → Right-click on the active connection → Properties → Sharing tab → Uncheck "Allow other network users to connect to the network..."

  • Set up your firewall:

    Add Minecraft in Windows Firewall exceptions:

    Control Panel → Windows Firewall → Allow an application to interact with each other → Change settings → Find "Java(TM) Platform SE binary" and check the "Private" and "Public" boxes.

  • A critical detail: if you have a router with the "Client Isolation" feature, you need to disable it in the router settings. This feature blocks data exchange between devices on the same network.

    How to find router settings?

    The router's control panel address is usually located on a sticker on the back of the device (e.g., 192.168.0.1 or 192.168.1.1). The default login and password are also listed there (usually admin/admin).

    3. Creating a local Minecraft server

    The most reliable way to play over Wi-Fi is to run a server on one of the PCs. You don't need to download any separate software for this: Minecraft Java Edition There's a built-in feature for running a local server. Here's how:

    • 🎮 On the host PC (the one that will be the server):
      1. Launch Minecraft and create a new world in the mode Creative or Survival.
      2. Open the pause menu (Esc) and select Open for LAN.
      3. In the window that appears, select the game mode (Creative, Survival, Adventure) and enable cheats if needed.
      4. Click "Run the world on a local network"A message with the port will appear (for example, 192.168.1.100:54321).
  • 🖥️ On the second PC:
    1. Launch Minecraft and select Multiplayer game.
    2. Click Add Server and enter the IP address of the host PC (the one you saw in ipconfig) and the port from the message (for example, 192.168.1.100:54321).
    3. Save and connect.
    4. If everything is done correctly, the second player will see the created world and be able to connect to it. However, this method has a limitation: the server only runs while the host PC is running and the world is open. Closing the game on the host PC will disconnect the connection.

      Both PCs' IP addresses are on the same subnet|Firewall allows Minecraft|Client isolation is disabled on the router|Both PCs are connected to the same Wi-Fi|Minecraft versions are the same on both PCs-->

      4. Alternative method: manually launch the server via .jar

      If built-in LAN- the mode does not work or you need mods, you can start the server manually through the official .jar-file from Mojang. This gives more control, but requires additional steps.

      Steps:

      1. Download the server file from the official website Minecraft:
        • Go to server loading page (link is valid at the time of publication).
        • Download the file minecraft_server.{version}.jar (For example, minecraft_server.1.20.4.jar).
      2. Create a folder for the server (eg. C:\Minecraft_Server) and place the downloaded file there .jar.
      3. Start the server for the first time:
        • Create a text file in the folder start.bat with the following contents:
          java -Xmx1024M -Xms1024M -jar minecraft_server.1.20.4.jar nogui
          

          pause

          (replace 1.20.4 to your version).

        • Double click on start.batWhen you first start the server, it will create configuration files and stop—this is normal.
    5. Accept the license agreement:
      • Open the file eula.txt in the server folder and replace eula=false on eula=true.
  • Please start the server again via start.batNow it should work constantly.
  • To connect to such a server, the second player must enter the IP address of the host PC (for example, 192.168.1.100) without port (used by default) 25565).

    ⚠️ Attention: If you have a weak PC (less than 4 GB of RAM), reduce the settings -Xmx And -Xms V start.bat to 512M, otherwise the server may slow down.

    5. Configuring ports and forwarding on the router

    If you are using a manual server (.jar), port forwarding may be required (port forwarding) so that the second player can connect. This is relevant if:

    • You play through different networks (for example, one via Wi-Fi, the other via mobile Internet).
    • The router is blocking incoming connections to the port. 25565.

    How to set up port forwarding:

    1. Go to your router's control panel (usually at 192.168.0.1 or 192.168.1.1).
    2. Find the section Port forwarding (or "Port Forwarding", Virtual Servers).
    3. Add a new rule:
      • Name: Minecraft
      • Port: 25565 (or another one if you changed it in server.properties)
      • Protocol: TCP/UDP (or both)
      • IP Address: Enter the local IP of the host PC (e.g. 192.168.1.100)
  • Save the settings and reboot the router.
  • After this, the second player will be able to connect even from another network by entering external IP address your router (you can find it on the website whatismyipaddress.com). However, this method is less secure, as it allows access to your server from the Internet.

    ⚠️ Attention: If you are forwarding a port for access from the Internet, be sure to set up a password in server.properties (parameter enable-rcon=true And rcon.password=your_password) to prevent outsiders from connecting to your server.
    Parameter in server.properties Default value Recommended value Description
    server-port 25565 25565 The port the server runs on. There's no need to change it if it's not in use.
    max-players 20 2-4 Maximum number of players. For a two-player game, 2 is enough.
    gamemode survival creative or survival The default game mode for new players.
    enable-command-block false true Allows the use of command blocks (needed for some mods).
    pvp true false Enables or disables PvP (player to player damage).

    6. Solving common connection problems

    If the second player cannot connect to the server, please check the following:

    • 🔌 "Failed to connect to server":
      • Please make sure you have entered the IP address correctly (no typos).
      • Check that the server (built-in or via .jar).
      • Disable firewall and antivirus software on both PCs.
    • 🌐 "Server not responding" when connecting via external IP:
      • Check that the port 25565 forwarded on the router.
      • Make sure that your external IP has not changed (some providers have dynamic IP addresses).
      • Try connecting via local IP (if both are on the same network).
    • Lags and low FPS:
      • Reduce the number of mobs in server.properties (spawn-monsters=false).
      • Allocate less memory to the server start.bat (For example, -Xmx512M).
      • Close background programs that are consuming a lot of resources.

    If nothing helps, try using Hamachi or ZeroTier These programs create a virtual local area network (VLAN) over the internet. However, they can increase ping, so it's best to use them only if other methods fail.

    7. Server optimization for two-player games

    To ensure smooth gameplay, even on low-end PCs, you can optimize the server:

    • 📉 Reduce the draw distance:

      In the file server.properties install view-distance=4 (default 10). This will reduce the load on the processor.

    • Disable unnecessary mechanics:

      Add to server.properties:

      spawn-animals=false
      

      spawn-npcs=false

      spawn-monsters=false

      This will disable the spawning of animals, villagers and mobs.

    • 🔄 Use PaperMC:

      PaperMC — is an optimized version of the Minecraft server that runs faster than the standard version. Download it from official website and replace the standard one .jar.

    If you plan to play with mods, please install Forge or Fabric on both PCs and the server. Make sure the mod versions match, otherwise you'll get a connection error.

    FAQ: Frequently asked questions about playing over Wi-Fi

    Can I play over Wi-Fi if I have Bedrock Edition and my friend has Java?

    No, these versions are not compatible with each other. You must use the same edition of the game. However, you can play together using Minecraft Realms (paid) or services like GeyserMC, which convert connections between versions.

    Why does it say "Invalid server version" when connecting?

    This means the game versions on your PCs don't match the server version. Make sure:

    • Both PCs have the same version installed. Minecraft (for example, 1.20.4).
    • Server .jar-the file corresponds to this version.
    • IN server.properties parameter online-mode=true (If false, pirated clients can connect, but this is not recommended).
    How can I play via Wi-Fi if we have different routers (for example, I'm using Wi-Fi and my friend is using mobile internet)?

    In this case, a local network won't help. You need:

    1. Use port forwarding (as described in section 5) and connect via external IP.
    2. Or use programs like Hamachi, ZeroTier, Radmin VPN to create a virtual network.
    3. Or rent a server (for a fee) on a hosting like Aternos or Minehut.

    Please note that when connecting via mobile Internet, there may be a high ping.

    Is it possible to play a pirated version of Minecraft on Wi-Fi?

    Technically yes, but:

    • You will have to disable online verification on the server (online-mode=false V server.properties).
    • Official servers will be unavailable and Realms.
    • There is a risk of catching viruses from unofficial launchers.
    • Multiplayer may be unstable (crashes, bugs).

    We recommend using the licensed version for stable play.

    How can I make my progress persist between sessions?

    If you are using the built-in LAN-mode, the world is saved only on the host PC. To ensure both players have access to their progress:

    1. Copy the world folder (.minecraft/saves/world_name) on the second PC.
    2. Or use a manual server (.jar), where the world is stored in its folder and is not tied to a specific PC.
    3. Or upload the world to the cloud (for example, Google Drive) after each game.

    Now you know everything you need to know to play Minecraft Play with a friend on PC over Wi-Fi. If you have any questions or something isn't working, reread the troubleshooting section or double-check your settings. Happy gaming!