Four ways to play together, and when each fits
Open to LAN is the zero-setup option. In Java Edition you open the pause menu, choose Open to LAN, pick the game mode and whether others may use commands, and click Start LAN World. Players on the same home network see it in their Multiplayer list automatically, and since 1.19.3 you can choose the port in the Port Number box. It is your single-player world opened to others, so it only exists while you have that world open, and it only reaches people on your network.
Realms is Mojang's own paid subscription, with a free trial. Mojang states that a Java Edition Realm lets you plus 10 other players play at the same time, that you can store up to 3 worlds, that the Realm is always online, and that Java players can only join a Realm with other Java players. You get no server files to manage, which is the whole appeal.
Self-hosting means running the free server software on a computer you own. It costs nothing but power and your upload bandwidth, and it gives you full control: plugins, mods, any setting. The price is port forwarding, a home IP address your friends connect to, and a machine that has to be on whenever anyone wants to play.
Renting a server gives you the same control without your home connection in the path. It is up while you sleep, your friends never learn your home IP, and backups do not depend on someone remembering to make them.
- Friends in the same house or on the same Wi-Fi, playing together: Open to LAN
- A small Java group who want no setup and no server files: Realms
- A group who want plugins, mods or full control, with a spare PC and a public IPv4: self-host
- Friends in other places, a world that stays up while you are offline, or a home line behind CGNAT: rent a server
Java or Bedrock, and letting Bedrock friends join
Java Edition and Bedrock Edition use different servers and cannot join each other's worlds on their own. Settle this first, because it decides the software.
If everyone plays Bedrock, on phones, tablets, Windows or consoles, the matching software is Bedrock Dedicated Server. The Minecraft Wiki lists its default ports as UDP 19132 for IPv4 and 19133 for IPv6, says it runs on Windows and Linux, and keeps its list of allowed players in allowlist.json. One catch: the wiki states that Xbox, PlayStation and Switch players cannot join through a standard server connection, only through a custom DNS or a LAN connection.
If the group is mixed, run a Java server and add Geyser and Floodgate. Geyser translates Bedrock clients onto your Java world, and Floodgate lets Bedrock players join with their own Bedrock accounts, without a paid Java Edition account. On Paper, GeyserMC's setup is: put Geyser-Spigot.jar in the plugins folder, put Floodgate-Spigot.jar next to it, restart, set auth-type to floodgate in Geyser's config, and restart again.
The port is where most setups go wrong. Geyser listens on its own port, 19132 by default, which cannot be the Java server's port. GeyserMC's guide says it must be forwarded for both TCP and UDP: current Bedrock versions use TCP to find your server and UDP to play on it, so with UDP alone the server will not show up. Check versions too. GeyserMC currently lists Bedrock 26.30 to 26.52 and Java 26.3 as supported. Geyser also runs on Fabric and NeoForge, but only with server-side mods.
- All Bedrock: Bedrock Dedicated Server, UDP 19132, allowlist.json
- All Java: the official server jar or Paper, TCP 25565
- Mixed: Paper plus Geyser and Floodgate, with the Geyser port forwarded for TCP and UDP
- Console players need a workaround to reach any third-party server; GeyserMC documents the options on its consoles page
Setting up the server: official jar or Paper, and Java 25
The current Java Edition release is 26.3, released on 15 September 2026, and its minimum Java version is Java 25. That requirement started with 26.1: the Minecraft Wiki says Minecraft 26.1 and later requires Java 25, and PaperMC says Paper requires at least Java 25, with Java 21 for its 1.20 to 1.21.11 builds. If the server refuses to start right after you install it, check which Java the command actually runs.
The official server is a single jar from Mojang's download page on minecraft.net. Make an empty folder for it, put the jar inside, and start it from a terminal. Mojang's page gives the command as java -Xmx4G -Xms4G -jar followed by the jar's file name and nogui, and leaving out nogui opens the server's own window. The two numbers are the memory the server may use. For a small group on a vanilla world or Paper with a few plugins, 2 GB is plenty, and the Minecraft RAM calculator on this site works out a figure from your player count and server software if you want one.
Paper is the common alternative. It takes over a vanilla world as it is, adds plugin support and performance changes, and Geyser installs into it as a plugin. Download a build from papermc.io and start it the same way: PaperMC's docs use java -Xms4G -Xmx4G -jar paper.jar --nogui. If you want mods rather than plugins, read our guide to Paper, Forge and Fabric before you generate a world.
The first start always stops early. The server writes eula.txt with eula=false and shuts down. Read Mojang's EULA, change the line to eula=true, and start again. PaperMC also documents a launch flag, -Dcom.mojang.eula.agree=true, that skips the file check.
- Install Java 25 for 26.1 and later, including the current 26.3
- Official jar: java -Xmx2G -Xms2G -jar server.jar nogui, with your jar's real file name
- Paper: java -Xms2G -Xmx2G -jar paper.jar --nogui
- First start writes eula.txt; set eula=true and start again
Port 25565, port forwarding and the CGNAT wall
A Java server listens on TCP port 25565 unless you change server-port in server.properties. Leave server-ip empty, which makes the server listen on every address the machine has; the wiki names a filled-in server-ip as the most common reason a server fails to bind to its port.
Friends on your own network need nothing more. For friends on the internet, follow the wiki's order: allow the port through the firewall on the computer running the server, then log in to your router and forward the port to that computer's internal IP address. Give the computer a fixed internal address first, or the rule breaks the next time the router hands it a different one. Then test the port with an online port checker while the server is running.
If the forward is correct and the checker still says closed, check for CGNAT. Some providers share one public IPv4 address between many customers, and then there is no port on your router that leads to you. Compare the WAN address your router shows with the address a what-is-my-IP site reports. If they differ, something upstream is translating addresses before traffic reaches your router, and if the router's address sits in 100.64.0.0/10, the range RFC 6598 reserves for carrier-grade NAT, port forwarding cannot work on that line.
You then have three ways out. Ask your provider for a public IPv4 address. Use a tunnelling service such as playit.gg, which GeyserMC's own guide suggests, accepting that traffic takes a detour through it. Or rent a server, which has a public address from the start.
- server-port defaults to 25565 and is a TCP port
- Open the port in the host's firewall before forwarding it on the router
- Forward to a fixed internal IP and test with a port checker while the server runs
- Router WAN address different from your public IP, or inside 100.64.0.0/10: you are behind CGNAT
Whitelist, operators and online-mode
A server for friends should only let your friends in, and Minecraft has that built in. The white-list setting in server.properties turns the whitelist on, and from 26.3 a freshly generated server.properties has white-list=true, where older versions defaulted to false. If your file came from an earlier version, check it.
Manage the list with commands rather than by editing the file. whitelist add followed by a name adds a player who does not need to be online, whitelist remove takes them off, and whitelist list shows everyone. If you do edit whitelist.json by hand, run whitelist reload afterwards. With enforce-whitelist=true, players already online who are not on the list are kicked when the list reloads.
Operators are players allowed to run commands. op followed by a name adds a player to ops.json at the level set by op-permission-level, and on Java Edition operators can always connect while the whitelist is on. Give that to yourself and to people you would trust with the world, nobody else.
Leave online-mode=true, which is the default. It makes the server check every player against Mojang's account service. With it off, anyone can join under any name, and turning it back on later changes every player's UUID, so inventories and permissions appear empty.
Bedrock players who join through Floodgate need one extra step. GeyserMC's FAQ gives two methods: /fwhitelist add followed by their Bedrock name, which works once they have joined any Geyser server, or the normal whitelist add with Floodgate's prefix in front of the name, a dot in GeyserMC's examples. The Minecraft server.properties generator on this site builds a file with the whitelist, game mode, difficulty and port already set.
- white-list=true, then whitelist add <name> for each friend
- whitelist reload after any hand edit of whitelist.json
- op <name> for yourself; operators bypass the whitelist on Java
- Keep online-mode=true
- Bedrock friends: /fwhitelist add <name>, or whitelist add with the Floodgate prefix
Inviting friends: the address to give them
Which address works depends on where your friend is. On the computer running the server, connect to localhost. On the same home network, friends use that computer's internal IP address. From the internet, friends use your external IP address, which only works once the port is forwarded. If you changed the port from 25565, they add a colon and the port after the address.
In the game they open Multiplayer, choose Add Server, and paste the address into Server Address, or use Direct Connection for a one-off join. Test it yourself before sending it out: a phone on mobile data, off your Wi-Fi, is a quick way to see what an outside player sees.
Two things make the address nicer to live with. Most home connections get a dynamic IP that can change, and the wiki suggests asking your provider for a static one; otherwise you resend the address every time it changes. And if you own a domain, an SRV record named _minecraft._tcp lets friends type a name without a port.
Bedrock friends joining through Geyser add a server in Bedrock with the same address and the Geyser port, 19132 unless you changed it.
- Same computer: localhost
- Same network: the host's internal IP, plus :port if it is not 25565
- Internet: your external IP, plus :port if it is not 25565
- Bedrock through Geyser: the same address with the Geyser port
Backups that actually save you
The world is a folder, and a backup is a copy of it kept somewhere else. The simplest safe method is to stop the server and copy the folder. Copying while the server runs can catch files half written.
If you need to back up without stopping, the server has commands for it. save-off stops the server writing to the world files so you can copy them, save-all flush writes everything to disk at once, briefly freezing the server, and save-on turns writing back on when the copy is done. save-off resets on restart, so a crash mid-backup does not leave saving switched off.
Copy more than the world. Keep server.properties, whitelist.json, ops.json and, on Paper, the plugins folder, so a restore brings back your settings and your friends' access as well as the terrain. On Paper before 26.1 the Nether and End live in separate world_nether and world_the_end folders, so copy those too.
Make one more backup before every version update. A world opened in a newer version is rewritten and will not load in the old one again, so the copy is your only way back. Keep backups off the machine that runs the server, because a dead disk takes both with it.
- Stop the server and copy the world folder, or use save-off, save-all flush, copy, save-on
- Include server.properties, whitelist.json, ops.json and plugins
- Back up before every Minecraft version update
- Store copies on a different machine or service