How to play minecraft two player

The simple yet limitless game of Minecraft has millions of players, so it's easy to find friends to play with. However, it's not always clear how to play multiplayer with your friends.

How you play multiplayer Minecraft will vary depending on whether you have the newer, console-friendly Bedrock edition, or the classic Java edition. Whichever edition you have, you can only play with friends who have the same version.

If that version is Java, there are few different ways to go about playing with your friends.

Whether you feel up to the task of joining a public server or creating your own server (which is less scary than it sounds), want to host a local LAN server, or would prefer to use the paid "Realms" server-hosting option, hosting a multiplayer Minecraft game should only take a short time.

Here's what you need to know.

Quick tip: In order to play with others, you must all be playing the same version of Minecraft.

How to play with friends on Minecraft: Java

Servers are the basic building block of Minecraft's multiplayer mode. Anyone playing together will need to be on the same server.

There are thousands of Minecraft servers already out there, which you and your friends can join to play together in moments — see the section below on how to join a friend's or a public server for more details. The only downside there is that you'll be sharing these servers with lots of other people you don't know.

Minecraft servers can be massive. Jerma985/Twitch.tv

If you and your friends want to have a private game, you can create a Minecraft server for free. Just know that it takes some work, and whoever makes the server will need to have a good computer with a fast internet connection. If that doesn't fit your bill, check out one of the other options.

Here's the steps you'll need to follow to either join an existing Minecraft: Java Edition server, or create your own multiplayer server.

Join a server

1. Launch Minecraft and select Multiplayer.

Open the multiplayer menu. William Antonelli/Insider

2. Click Add Server.

3. In the Server Address box, enter the host server's address and click Done. This might be an IP address, or a URL.

The server address might just be a website name. William Antonelli/Insider

4. Wait for the server to connect, and when it appears in the list, select it and click Join Server.

The server you connected to will appear at the top of the list. William Antonelli/Insider

Create and join your own server

The steps below describe how to set up a server on a Windows 10 PC. However, the steps should be similar, if not largely the same, for both Mac and Linux computers as well.

1. Launch a web browser of your choice and navigate to minecraft.net/download. Scroll down and click Java Edition Server.

Click the link beside the word "download." Kyle Wilson/Insider

2. On the next page, find and download the Minecraft server software, putting it somewhere that you'll be able to find it. The file will have a .jar extension.

Click the link beside the word “download”. Kyle Wilson/Insider

3. Create a new folder on your computer and name it whatever you like, then place the .jar file you downloaded inside of it. This is where you'll keep all your server files.

Make a folder to organize your server files. Emma Witman/Insider

4. Next, you'll need to create a plain text document. Right-click in the folder and select New, then Text Document. Name the text document "start.txt."

Make sure you select "Text Document," and not "Rich Text Format." Emma Witman/Insider

Quick tip: On a Mac, you can make a .txt document using the TextEdit application. In Linux, you can use the "cat" command in the terminal.

5. Navigate back to the Minecraft server download webpage. Copy the command text, which reads:

java -Xmx1024M -Xms1024M -jar minecraft_server.1.18.2.jar nogui

Note that the numbers near the end will differ based on the most current version of Minecraft.

Paste the string of command text into your start.txt document. Kyle Wilson/Insider

6. Paste the string of command text into your start.txt document.

7. Within the string of command text, you'll see the words "minecraft_server.1.18.2.jar." You'll need to rename that portion of the text "server.jar." That means that the new line of code will now read:

java -Xmx1024M -Xms1024M -jar server.jar nogui

8. You can also change the RAM allocation for your server in this line of code. The more RAM you give it, the smoother your server can run, but the more stress it'll put on the computer.

9. The RAM is determined by the first two numbers in the line of code, which are amounts of RAM in megabytes (MB). By default, it's set to 1024MB of RAM, or one gigabyte (GB).

A five or more player server should have at least 2GB of RAM allocated, for example, which you can set by changing the code to:

java -Xmx2048M -Xms2048M -jar server.jar nogui

Quick tip: Unlike with storage space, when it comes to RAM, one gigabyte equals 1,024 megabytes – not 1,000. As such, set the RAM amount in multiples of 1,024 megabytes.

10. Click File, then "Save As…" and where you can select "Save as type" from a drop-down menu, select "All Files (*.*) and name the file "start.bat."

You can change the format of a file using the "Save As…" command. Emma Witman/Insider

11. Delete the "start.txt" file.

12. Double click the "start.bat" file to run it, opening a black command prompt window that will close automatically when the .bat file is complete.

13. You'll see some new items in the server folder, including a "eula.txt" document, short for "End User License Agreement." Open the document, and change the line of code that says "eula=false" to read "eula=true."

You can't proceed with your server until you've "signed" the end user license agreement by setting it to "true." Emma Witman/Insider

14. Run the start.bat file again. The wait will be longer than before, as your server's world is being generated this time.

Be patient, as depending on your computer, creating your server may take several minutes. Emma Witman/Insider

Technically, your server is ready to fire up now, and you'll also see a few new files in your server folder, including the "server.properties" file where you can customize your game. 

However, right now your server is only accessible to devices using the same internet connection as you. You'll have to set up port forwarding to open up your Minecraft server to users outside your local network.

There's a few different ways to set up port forwarding, and instructions you'll need specific to your router can be found here. Once you've set it up, give your friends your IP address, and they'll be able to join.

In the meantime, however, here's how you can start exploring your new server.

1. Launch Minecraft while your server is open and running, and select Multiplayer.

2. Select Add Server in the bottom-right corner.

3. In the Server Address field, simply put the number "0" or the word "localhost".

You can access your own server at any time. Emma Witman/Insider

Use a LAN server

This method is perfect if you're trying to play with siblings, roommates, or just friends at the same house. LAN servers, also called local multiplayer servers, let you play together with anyone on the same Wi-Fi or ethernet network.

Here's how to launch and join a local multiplayer game: 

1. One of the players should launch a solo game world and enter the pause menu, where they'll select Open to LAN.

You'll need to open up LAN connections. Emma Witman/Insider

2. In the menu that opens, select the game mode and whether to allow cheats, then click Start LAN World.

Enable LAN and start hosting a local world. Emma Witman/Insider

3. The menu will then close, and the player will be shown a five-digit "port" number. Mark this number down. If it's disappeared, press T to open the chat box and find it again.

Note the port number, as it disappears moments after appearing. Emma Witman/Insider

4. The other player or players on the same network should launch their Minecraft, but rather than jump into a world, click the Multiplayer option from the main menu.

5. Minecraft will automatically start scanning for games on the shared local network. Click Join Server when the right world appears.

6. If it doesn't find the server, the players should click Direct Connection. In this menu, under Server Address, enter the IP address of the computer hosting the server, followed by a colon (:) and the five-digit port number.

So for example, it might look like:

168.212.226.204:58728

7. Click Join Server.

If your game can't find the server, try a direct connection. Emma Witman/Insider