To play multiplayer in Minecraft Java Edition, open Multiplayer to join a LAN world or server, or open Minecraft Realms to join a Realm. To host your own world, use LAN for friends on the same local network, or choose a Realm, dedicated server, or supported hosting mod for online friends.
Every Java Edition player connecting to a Java server or LAN world needs a matching Java Edition version. The LAN hosting and Realm code steps below use Java Edition 26.3, including its updated hosting menus.
The short version
- Same network: Open your world, press Esc, then open World Options > Multiplayer and enable LAN.
- Server address: Open Multiplayer and choose Direct Connection or Add Server.
- Realms: Accept an invitation or enter the owner's code through Minecraft Realms > Join Realm.
- Hosting requirement: Keep your LAN world, mod-hosted world, or dedicated server running while friends play.
| Option | When to choose it | Main requirement |
|---|---|---|
| LAN world | Playing on the same local network | Host keeps the world running |
| Existing Java server | Joining a public or private server | Server address and matching version |
| Java Realm | Playing without the owner online | Owner's subscription and invitation or code |
| Hosted server | Managing a server through a provider | Provider setup and supported version |
| Self hosted server | Running dedicated server software yourself | Compatible Java runtime and reachable address |
| Essential | Inviting online friends into your world | Matching supported Essential installations |
| e4mc | Sharing a LAN world through an online address | Compatible mod installed by the host |
| playit.gg tunnel | Making a home server reachable without router forwarding | Running Minecraft server and tunnel agent |
| Geyser | Letting Bedrock friends join a Java server | Supported server and configured Geyser connection |
Get Java Edition ready
Open Minecraft Launcher, sign in with the Microsoft account entitled to Java Edition, and launch Minecraft: Java Edition. If you need the launcher, get it from Minecraft's official download page for your operating system. Java players on Windows, macOS, and Linux can play together using matching versions.
If you are joining a server, ask its owner which Java Edition version it uses before connecting. For LAN, everyone must share the host's local network. A Java Realm lets invited players join even when its owner is offline.
Host and join a LAN world
Open your single-player world and press Esc. Select World Options > Multiplayer, enable LAN, and choose Port. Configure Command Access and Force Game Mode as desired, then keep the world running while your friends play.
Each joining player should connect to your local network and launch Java Edition with a matching version. Open Multiplayer, select the host's LAN game when it appears, and choose Join Server. Windows, macOS, and Linux players can join the same LAN session.
The older Open to LAN menu was replaced by World Options in Java Edition 26.3. If the world does not appear for your friends, confirm that everyone shares the same local network and version, then check the host's firewall using the steps below.
Join a server using its address
Get the server address from its owner and confirm the required Java Edition version. From the main menu, select Multiplayer > Direct Connection, enter the address, and choose Join Server. This route works for public, private, rented, and self hosted Java servers.
For a server you plan to visit again, select Multiplayer > Add Server. Enter the server name and address, then select Done. Select the saved entry and choose Join Server; on later visits, select that existing entry.
To find a public server, follow the server-listing link on Minecraft's official server download page and choose a Java server. Get its address and connect through Direct Connection or Add Server. Individual servers set their supported client versions and membership rules, so check those if you cannot join.
Create or join a Java Realm
In Java Edition 26.3, open Minecraft Realms > Add Realm to begin the Java Realm subscription flow. You can also start from Minecraft's official Realms product page and choose the Java Edition offering. Use the Microsoft account that will own the Realm; a trial is offered only when your account is eligible.
Complete the applicable subscription flow and configure the Realm's world. Open Minecraft Realms, select your Realm, then open Configure > Players > Invite Player and add your friend's Java Profile Name. You can manage membership and player permissions in the Players tab.
As an invited player, accept the owner's invitation, open Minecraft Realms, and select the Realm from your available Realms. If the owner gives you a code instead, open Minecraft Realms > Join Realm, enter it in Join Code, and select Join Realm. You do not need your own Realms subscription, and the owner does not need to be online.
Set up a server through a hosting provider
A hosting provider gives you a server and controls for managing it through your browser. With Aternos, complete account setup, select Create a server, choose a Java Edition server rather than Bedrock, set its name, and select Create. Complete the provider's account-consent and EULA steps during setup.
Select Start and wait until the server is online. Give friends the supplied address, then connect through Minecraft's Multiplayer screen using Direct Connection or Add Server. Everyone needs the Java version supported by that server.
Paid hosting and VPS hosting are alternatives within the dedicated-server category, but their control panels differ. Follow your provider's controls for starting the server and obtaining its address. If friends cannot connect, confirm that the server is online and that its membership rules permit them to join.
Run a dedicated server on your computer
Download the software from the official Java server download page and place it in its own folder. Install a compatible Java runtime on the hosting computer. Your server and the players connecting to it must use matching Java Edition versions.
Run the following command from the server folder. Replace server.jar with the actual downloaded filename.
java -jar server.jarRead the linked EULA before continuing. If you agree, open eula.txt, change eula=false to eula=true, and save the file. Run the command again, then configure the server through server.properties.
For friends outside your home, your internet connection and router must permit inbound connections. Configure the host firewall and router to allow the server's listening port, then forward that port to the hosting computer. Minecraft documents port 25565 for Java; share the public server address with your friends.
Router menu labels depend on the router model, so use the controls for your particular router when configuring forwarding. Keep the server running while players connect through Multiplayer. If they cannot reach it, check the listening port, forwarding destination, and host firewall.
Alternatively, use a playit.gg tunnel to make your server reachable online. Get the agent from the provider's download page, run it on the hosting computer, connect it to your account, and route a Minecraft Java tunnel to the local server. Give guests the assigned public address, and keep both the server and agent running.
New Java Edition 26.3 dedicated servers enable the allowlist by default. In the live server console, enter the following command for each player, replacing PlayerName with their exact Java profile name.
whitelist add PlayerNameCheck membership with the command below. Confirm that each friend's exact profile name is included before asking them to reconnect.
whitelist listIf you are an authorized in-game operator, you can instead add a player with /whitelist add PlayerName. Replace PlayerName with that player's exact Java profile name.
For Bedrock players joining through Geyser and Floodgate, use Floodgate's /fwhitelist add <bedrock_username> command instead. It works only after that player has joined a Geyser server.
Host an online world with a mod
Essential lets you invite online friends into a world while your game stays running. Get a matching supported build from the Essential download page, choosing your Minecraft version and mod loader. Participants need matching supported Essential installations, and additional gameplay mods must be compatible across the group.
From the main menu, select Host in the Essential menu and choose a world, or open a world and select Host in the Essential menu from the pause menu. Select Start Hosting on the host panel, select the friends to invite, and confirm with Add Members. Keep your game running for the session.
After receiving an invitation, your friend can open Social > Chat, select you, and choose Join Game. Alternatively, they can open Multiplayer > Friends and select your world. That second route requires you to enable Display Current Server under Settings > Privacy.
For an option that requires the mod only on the host, open the e4mc download website and follow Get it on Modrinth or Get it on CurseForge. Install a build compatible with your Java version and mod loader, then open your world to LAN using the current controls. Share the generated domain with friends, who connect through Multiplayer > Direct Connection without needing e4mc themselves.
Let Bedrock friends join with Geyser
Geyser adds third-party crossplay to supported Java server configurations. Its supported versions include Java 26.3 and Bedrock 26.40 through 26.63. It does not turn a Java Realm into a cross-edition Realm.
For a supported Spigot/Paper host, get the matching build from Geyser's official download page. Install Geyser-Spigot.jar in plugins and restart the server. Configure plugins/Geyser-Spigot/config.yml using the provider-specific setup instructions, allocate the required network ports, and restart the server again.
Without Floodgate, Bedrock players need a paid Java Edition account to join. To admit Bedrock players who do not own Java Edition, download Floodgate-Spigot from Geyser's download page, place Floodgate-Spigot.jar in plugins, and restart the server. Change auth-type in Geyser's config to floodgate, then restart the server again.
Java players connect using the normal Java server address, while Bedrock players use the configured Geyser connection. If Bedrock friends cannot connect, check the supported versions and the network ports required by your provider's setup. Geyser's port, 19132 by default, must be forwarded for both TCP and UDP.
Check permissions when friends cannot connect
Start with the requirements for your chosen method: matching versions, a running host, and the correct network or server address. For a dedicated server, check the allowlist as well. If incoming connections are blocked on the host, allow the actual Java runtime or hosting application through its firewall.
On Windows 11 or Windows 10, open Windows Security > Firewall & network protection > Allow an app through firewall. Select Change settings, then Allow another app, and locate the actual Java runtime used by the game or server. Its displayed name and installation path vary, and administrator access may be required.
On macOS, open the Apple menu > System Settings > Network > Firewall > Options. Use the add button to add the relevant hosting application or service. Use its connection control to allow incoming connections.
If account permissions block multiplayer, sign in to Xbox account settings with the relevant adult account, or the family organizer's account for a child. Select the child's profile when applicable, open Online Safety, and under You can join multiplayer games, choose Allow. For Realms, also check You can create and join clubs, then save your changes using the portal's controls.
Frequently Asked Questions
Can you rejoin a server directly from Minecraft Launcher?
After playing the server or Realm normally, select its Quick Play tile in Minecraft Launcher. Quick Play is enabled by default for supported Java versions starting with 1.20. If you previously disabled it, open Settings > Quick Play in the launcher to access its controls.
Can you open a Java world to LAN with a command?
When commands are permitted in your single-player world, enter /publish to expose its integrated server to LAN players. In Java Edition 26.3, the command no longer accepts the older gamemode argument. It is not a dedicated-server setup command.
Can a Java Realm owner create more than one invitation code?
You can create and distribute up to five invitation codes through your Java Edition 26.3 Realm's invite-code management controls. Those controls also support expiration and deletion of codes.
Can you manage a Java Realm from your browser?
Yes. Sign in to your Minecraft profile at the top-right corner of Minecraft.net to manage your Realm from any browser. There you can invite friends, change permissions, and switch world slots.
Do snapshot tutorials for native online world invitations still apply?
You should not follow those snapshot steps for Java Edition 26.3. Mojang removed the experimental peer-to-peer hosting feature in 26.2 Pre-Release 1 because it was not ready for release.
Should you use the old Playit Companion mod tutorial?
Use the provider's agent instead of following the old Playit Companion instructions. The provider says the Companion mod is no longer maintained and recommends the agent.