You have three routes to play Minecraft Java multiplayer: join a LAN world on the same Wi-Fi, connect to a friend's public server through the multiplayer menu, or pay for a Minecraft Realm. The version matters more than people expect — Java Edition players can only join Java Edition servers, and cross-play with Bedrock needs specific plugins or a third-party service. Pick your route by how far apart you sit.
Java Edition's multiplayer is built into the game, but it doesn't hold your hand. The "Open to LAN" button hides in the pause menu, the direct-connect box accepts only a specific IP format, and Realms lives behind a separate subscription screen that the game itself never explains in detail. This guide walks through each path in real order, names the exact screens, and covers the failures you'll actually hit.
I've kept every version reference tied to a stable Minecraft Java Edition behavior and avoided circulating any subscription price, because those change and I can't verify the current number. Where a value changes over time, I name the authority that controls it: Mojang and your own Microsoft account dashboard.
Open a World to LAN and Connect on the Same Wi-Fi
LAN mode is the fastest route for two people in the same building. It takes under a minute and needs no account beyond what you already use to launch the game. The catch is that it only works on the same local network — same router, same subnet.
Start the world first. Load into any singleplayer world, press Escape to open the pause menu, then click Open to LAN. A small dialog appears with three settings: game mode (Survival, Creative, Adventure, Spectator), a "Allow Cheats" toggle, and a port number that Minecraft assigns automatically. Choose the game mode you want guests to spawn in, flip cheats on or off, and click Start LAN World.
The game then prints a line in chat: "Local game hosted on port XXXXX." That five-digit number and the host's local IPv4 address are what guests need. The host sees a chat message confirming the world is open. Guests do not need the host's permission beyond the open port — if they can reach the machine, they can join.
On the guest machine, click Multiplayer, then Direct Connection at the bottom of the server list, and type the host's address in the format 192.168.1.155:54321 — IP first, colon, port number. On most home networks the address starts with 192.168 or 10. If the guest is on a different Wi-Fi network, LAN will not work regardless of what you type.
Failure handling: A "Connection refused" or "Unknown host" error almost always means three things — the guest is on a different subnet, a Windows Firewall prompt was dismissed on the host, or the port was mistyped. On Windows, allow Java through the private network profile in Windows Defender Firewall settings. If the world was opened in Survival with cheats off, the guest cannot use /gamemode and will be stuck in whatever mode the host chose.
Join a Public Server Through the Multiplayer Menu
The multiplayer server list is the widest door into Java multiplayer. It's also where most first-time players get confused, because the list starts empty and the "Add Server" button doesn't explain what a valid address looks like.
Open Multiplayer from the main menu. You'll see a blank list with a Add Server button at the bottom. Click it and a dialog asks for a Server Name (anything you like, purely cosmetic) and a Server Address. The address is what matters: it's either a domain like play.example.com or an IP with an optional port, written 203.0.113.45:25565. Minecraft assumes port 25565 if you leave the port off, which is why most servers don't need one typed.
Add the server, then double-click it to connect. Minecraft will ping it first and show a green connection bar, player count, and version compatibility in the list. A red bar or "Can't connect to server" usually means the server is offline, the address is wrong, or the server runs a different Java Edition version than your client. Check the server's own documentation — most list the exact version they support.
If you're connecting to a friend's server, they need to have port-forwarded the port on their router or be running through a tunneling service. Mojang's own documentation notes that home routers block inbound connections by default. Without forwarding, the friend's public IP will time out even though the server is running.
Failure handling: "Outdated server" or "Outdated client" means version mismatch — match your launcher's Java Edition version to the server listing. "Failed to verify username" means your Microsoft account session expired; sign out and back in through the launcher.
Set Up a Minecraft Realm for Friends Who Aren't Local
A Realm is Mojang's paid hosted server, and it's the route that requires the least technical work from the person hosting. It also removes the port-forwarding problem entirely. The trade-off is a recurring subscription and a hard cap on concurrent players.
From the main menu, click Minecraft Realms. If you haven't subscribed, the screen offers a trial period — Mojang has historically offered a free 30-day trial for new subscribers, and the current terms should be confirmed on the Realms screen itself before you commit. Once subscribed, click Create a New World or Configure Realm to pick a world and settings. Then click Invite Player and enter your friend's Minecraft username (the Microsoft account gamertag, not an email).
Invited players see the Realm appear automatically under Multiplayer → Realms when they log in with the same Microsoft account. No IP address, no port, no router settings. That's the whole point — Mojang's servers sit between you and your friends. The owner can pause the subscription, download the world file, or replace it at any time from the same screen.
The concurrent-player limit for a standard Realm is 10, which is documented on Mojang's Realms page and hasn't moved in years. That's the ceiling for the base subscription; you can't buy more slots on a standard Realm. If you routinely want 20+ players, a self-hosted server is cheaper per player, though it costs you the setup time.
Failure handling: If an invite doesn't appear, the friend is probably logged into a different Microsoft account than the one you invited. Have them check the username in the launcher's account switcher. Realms also requires the owner's subscription to be active — paused Realms disappear from guests' lists.
Run Your Own Java Server and Forward the Port
Running a server yourself is the only route that gives you full control over mods, plugins, player limits, and world files. It's also the route that produces the most support threads, because the network part fails silently.
Download the server jar from Mojang's official Java Edition server download page. Create a folder, put the jar inside, and run it once — it will fail and generate a eula.txt file. Open that file, change eula=false to eula=true, and save. Run the jar again; it generates server.properties and a world folder. The default port is 25565. Launch command on most systems is java -Xmx4G -Xms2G -jar server.jar nogui — the -Xmx4G gives it 4 GB of RAM, which is a reasonable floor for a small vanilla server.
Inside server.properties, the key multiplayer settings are online-mode=true (forces Microsoft account verification — leave it on unless you know why you're turning it off), max-players (default 20), and server-port. Edit these before starting, not after.
For friends outside your network, forward port 25565 on your router to the host machine's local IP. Every router's admin page is different; the setting is usually called "Port Forwarding" or "Virtual Server." Then give friends your public IP, which you can find by searching "what is my IP" — but note that many residential ISPs rotate that IP, so it can change without warning. A dynamic DNS service solves that, but it's another moving part.
Failure handling: If LAN works but the public IP times out, port forwarding is broken or your ISP uses carrier-grade NAT that blocks inbound connections entirely. Test by having a friend connect while you watch the server console — if no connection attempt appears in the log, traffic isn't reaching you. Also confirm online-mode matches how your friends authenticate; a server with online-mode=true will reject cracked clients, which is intentional.
LAN, Realm, and Self-Hosted Server Compared
Here's the decision table most guides skip — the real trade-offs between the three routes, on the same dimensions.
| Dimension | LAN world | Minecraft Realm | Self-hosted server |
|---|---|---|---|
| Works across the internet | No — same network only | Yes | Yes, with port forwarding |
| Cost | Free | Paid subscription (check Realms screen for current price) | Free software; you pay for hardware and electricity |
| Player limit | No hard cap beyond what the host machine handles | 10 concurrent on standard Realm | Set by max-players (default 20) |
| Mods and plugins | Only mods already in the host's world | Limited to what Realms supports | Full control |
| Setup time | Under 1 minute | About 5 minutes including invite | 30–60 minutes including port forwarding |
| Owner needs router access | No | No | Yes, for outside players |
| World file ownership | Host's save folder | Owner can download anytime | Yours entirely |
The verdict depends on one question: are your friends in the same building? If yes, LAN wins on speed and cost. If they're remote and you want zero network work, a Realm is the cleanest path — but 10 players is a hard stop, and the recurring cost adds up for a long-term world. If you want a persistent server with mods and more than 10 slots, self-hosting pays for itself in flexibility, at the cost of an afternoon's setup.
The one drawback of the Realm recommendation: the world lives on Mojang's servers, and if the subscription lapses, guests lose access until it's reactivated. You can download the world file, but the live server pauses. For a group that plays in bursts, that's fine. For a group that wants a world that never goes dark, self-hosting is the honest answer.
Match Java and Bedrock Editions Before You Try to Connect
This is the most common wasted hour in Minecraft multiplayer. Java Edition and Bedrock Edition are separate games with separate multiplayer networks. A Java player cannot join a Bedrock server by typing its address, and a Bedrock player cannot join a Java server the same way. The version you own determines which doors open.
Check your edition first. In the launcher, Java Edition shows a version number like 1.21.x and lists "Java Edition" in the installation name. Bedrock on Windows shows as "Minecraft for Windows" in the Microsoft Store and uses a different launcher. On consoles and mobile, you're on Bedrock — Java doesn't run there at all. Mojang's own store pages distinguish the two clearly.
Bridging the editions is possible but not built in. Third-party projects like GeyserMC act as a translation layer, letting Bedrock clients connect to a Java server through the Geyser plugin. Setting it up means running a Java server with the plugin installed and pointing Bedrock players at the Geyser port, usually 19132. That's a server-admin task, not a click in the menu.
Version numbers within Java matter too. A Java 1.21.x client can't join a server running 1.20.x without the server updating or the client using an older installation. The launcher lets you pick an installation version from the dropdown next to Play, which is the fix when a server lists an older version than yours.
Failure handling: "Incompatible client" usually means a snapshot or pre-release. Snapshots are opt-in through the launcher's installation settings, so if you joined a snapshot by accident, switch back to the latest release. Servers running snapshots reject release clients and vice versa.
Fix the Four Errors That Block Most First Connections
Most multiplayer failures produce a specific error string, and each one points at a different layer. Learning the four common ones saves a support thread.
"Connection timed out" means the address is right but nothing answered. The server may be offline, the port may be closed, or your ISP may be blocking the traffic. Ping the address from a terminal first — if the ping succeeds but Minecraft times out, the port is the problem.
"Connection refused" means something answered and said no. The server is running but not accepting on that port, or the host machine's firewall is blocking it. On Windows, the first launch of a Minecraft server triggers a firewall prompt; if it was dismissed, re-allow Java through the private profile.
"Unknown host" is a DNS or typo problem. The domain doesn't resolve. Check the spelling and confirm the server exists by asking the owner for the exact address.
"Failed to verify username" is an authentication failure, not a network one. Your Microsoft session has expired or the launcher is running an offline profile. Sign out and back in.
Failure handling: If the server console shows nothing when a friend connects, traffic never reached the machine — that's port forwarding or ISP-level blocking, not a Minecraft setting. If the console shows a rejected login, it's authentication. The console log is the single best diagnostic, and most players never open it.
Get the Right Address Format and the Correct Port
Two details cause more failed joins than anything else: address format and port. Both look trivial and both have specific rules.
The format is host or host:port. For a LAN world, the host part is the local IPv4 address — 192.168.1.155 — and the port is the five-digit number Minecraft printed in chat. For a public server, the host is a domain or public IP, and the port defaults to 25565 if omitted. Typing play.example.com:25565 and play.example.com do the same thing, because 25565 is the default. Typing 192.168.1.155 without the port on a LAN world will not connect, because LAN uses a random high port.
Bedrock uses a different default port, 19132, which is one practical reason the editions don't mix. If you see 19132 in a server listing, that's a Bedrock server and a Java client cannot use it.
Watch for spaces. Minecraft's address box tolerates some whitespace but not all — a trailing space after the port breaks the connection with "Unknown host," which sends players down a DNS rabbit hole. Re-type the address cleanly rather than pasting it if the join fails for no obvious reason.
Failure handling: The best way to verify an address is to add the server to the Multiplayer list and watch the status indicator — green means reachable and version-compatible, red means something's wrong with the address or port. The list is a diagnostic tool before you even click join.
Troubleshoot Mods, Plugins, and Version Mismatches
Modded multiplayer adds a second layer of version matching. The client's mod set must match the server's, or the client will be rejected on join with a mod-list mismatch error. That's not a bug — it's how Forge and Fabric keep clients from desyncing.
For Fabric and Forge, the loader version, the mod versions, and the Minecraft version must all align. A client on Fabric 0.15.x connecting to a server on Fabric 0.14.x with the same mods may still fail if a mod has an internal version check. The server log names the mismatched mod directly.
For plugin servers (Paper, Spigot), clients don't need the plugins — those run server-side only. But the client's Minecraft version must match the server's supported version, and plugins sometimes lag behind the latest Minecraft release, so a plugin-heavy server may sit a version behind vanilla.
The launcher's installation dropdown is the fix for client version changes. To join a 1.20.4 plugin server from a 1.21 client, create a new installation set to 1.20.4, launch it, and join. Your worlds and settings stay separate per installation, which is actually convenient.
Failure handling: "Mod rejections" in the disconnect message is the server listing which mods don't match. Install identical versions on the client. Never connect a vanilla client to a modded server expecting it to work — it may partially load and then drop on first world interaction.
Answer Common Multiplayer Questions Before You Start
A handful of questions come up every time someone sets up Java multiplayer for the first time. Here are the ones worth answering directly, with facts the setup sections didn't cover.
Can I play Java multiplayer without paying anything?
Yes, if you stick to LAN worlds or join a public server. LAN is free because it runs on the host's own machine, and public servers are funded by their owners. A paid Realm is the first point where money enters, and it's optional.
Does Java multiplayer work cross-platform with console players?
Not directly. Consoles run Bedrock Edition, which doesn't publish or accept Java addresses. Cross-play requires a bridging layer like Geyser on a Java server, and the console player still needs to join through Bedrock's own server list with the Geyser port.
Why does my friend see "Connection timed out" on my LAN world?
The usual cause is that the friend is on a different network — a guest Wi-Fi, a mobile hotspot, or a different apartment's router. LAN traffic stays on one local network. Even if you're in the same building, separate networks won't see each other. Use a public server or Realm for those cases.
What happens if my Minecraft username changes?
Server whitelists and Realm invites are tied to the username you had when you set them up. Change the name through the Microsoft account page and the old entry stops matching. Re-invite yourself or have the server owner update the whitelist entry to the new name.
How many players can a Java server hold without lag?
That depends on the server's hardware, not a fixed number. The max-players setting defaults to 20 but is just a cap, not a performance guarantee. A modest home machine with 4 GB allocated usually handles 5–10 players comfortably on vanilla; plugin servers and large modpacks need more RAM and a faster CPU. Watch the tick rate (TPS) in the server console — falling below 20 TPS means the server is overloaded.
Is port forwarding required for a Realm?
No. Mojang's servers handle the connection, so the owner's home router is never involved. That's the practical reason Realms exist: they remove every router-level step. The trade-off is the concurrent-player cap and the subscription.
What's the difference between a whitelist and an invite?
A whitelist is a server-side file listing usernames allowed to join a self-hosted or public server; anyone not on it is rejected. A Realm invite is tied to a Microsoft account and adds the player to the Realm's member list. Both restrict access, but the whitelist lives on your machine and the Realm invite lives on Mojang's servers.
Can I move a LAN world to a server later?
Yes. The LAN world is a normal save folder. Copy it into the server's world directory, and the server will load it on next start. Do this while the LAN world is closed to avoid a partially-written save file, and back it up first — there's no undo.