How to set up a Minecraft Java server in 26.2: the complete guide
Running your own 26.2 Java server takes 10 minutes. Port forwarding is the step most guides skip. This is everything from the server jar to the settings that actually affect player experience.
David Riperson7 min read
Running a Minecraft Java 26.2 server for friends takes about ten minutes if you follow the steps in order. The part most guides skip is port forwarding, and that's the step that determines whether anyone outside your local network can actually connect.
This guide covers everything: the server jar, the startup script, the settings that matter, port forwarding, and when it makes more sense to use a dedicated host instead.
What you need
A PC running Windows, macOS, or Linux
Java 25: required for Minecraft 26.2 and later (1.21.x ran on Java 21). Download from Adoptium if you don't have it. Verify with java -version in a terminal.
A stable internet connection (upload speed matters; 1 Mbps per player minimum, 2+ recommended)
About 4-8 GB of free RAM for the server process
For more than 5 players, or for modded packs, you should use a dedicated server host. See the hosting comparison guide for options. Self-hosting is practical for 2-5 friends on a vanilla or lightly modded setup.
On Linux/macOS, make it executable: chmod +x start.sh
RAM allocation guide:
Players
Setup
-Xmx value
2-4
Vanilla
2G-3G
2-5
Vanilla + a few mods
3G-4G
5-10
Vanilla or light mods
4G-6G
10+
Vanilla
6G-8G
Any
Large modpack
6G-12G
The JVM flags after -Xmx are Aikar's tuned GC settings; they significantly reduce freeze-stutters from garbage collection. Use them as-is.
Step 4: Configure server.properties
After the first successful launch (which generates the world and all config files), open server.properties. The settings that meaningfully affect player experience:
view-distance: how many chunks the server sends to each client. Default 10. Lower = better TPS, worse visual distance. For 1-5 players you can run 12-16 comfortably. For 10+ players on shared hardware, drop to 8-10.
simulation-distance: how many chunks around each player actively tick. Default 10. This is the main TPS lever. Dropping from 10 to 8 reduces active chunks by ~36%. Keep it high enough to cover player activity (farms, builds) but no higher.
online-mode=true: requires players to have a purchased Minecraft account. Set to false only if you're using a proxy or running a local LAN server with players on the same network. Never set to false on a public server.
spawn-protection: radius around spawn that only ops can modify. Set to 0 if you want players to build freely near spawn.
Step 5: Port forwarding
This is where most self-hosting setups fail. Port forwarding tells your router to send incoming Minecraft connections (port 25565) to your server PC.
Step by step:
Find your router's admin page (usually 192.168.1.1 or 192.168.0.1 in a browser)
Log in (check the sticker on your router for default credentials)
Find the section called "Port Forwarding", "Virtual Server", or "NAT"
Create a new rule:
External Port: 25565
Internal Port: 25565
Protocol: TCP (some routers let you choose TCP+UDP; that's fine too)
Internal IP: your server PC's local IP (find it with ipconfig on Windows or ifconfig on macOS/Linux; look for IPv4 Address starting with 192.168.x.x)
Save and apply
Finding your public IP (what friends connect to): go to whatismyip.com from any browser on your network. Share this address with your friends.
Your public IP may change when your router restarts (most home connections use dynamic IPs). If friends can't connect after your router rebooted, check if your IP changed. A free service like No-IP provides a hostname that tracks your changing IP, which is more reliable for regular sessions.
If you're on a university network, corporate network, or strict ISP: port forwarding may not be possible. In that case, use Playit.gg (free tunnel for Minecraft) or a dedicated host.
Step 6: Add yourself as operator
In the server console (not in-game), type:
op YourMinecraftUsername
Operators can use cheats, run commands, bypass spawn protection, and manage the server while connected as a player.
Step 7: Performance mods for servers
The vanilla server jar is unoptimized. Install Paper or add Fabric + performance mods to meaningfully improve TPS.
Option A: Switch to Paper (easiest)
Paper is a drop-in replacement for the vanilla server jar. It improves multi-threaded chunk handling, entity activation, and includes hundreds of optimizations by default. Download from papermc.io, rename to server.jar, restart.
Paper is compatible with most vanilla plugins but not Fabric mods.
Option B: Fabric + mods (for mod support)
If you want Fabric mod support, install the Fabric server jar instead of vanilla, then add:
Testing a modpack before committing to a paid host
When you're always running the server PC anyway
Consider a dedicated host when:
More than 5 regular players
You want 24/7 uptime without leaving your PC on
Your home internet upload is below 10 Mbps
You want automated backups and a control panel
The SyntaxMine hosting comparison covers BisectHosting, Apex Hosting, Shockbyte, and ScalaCube with pricing, performance, and mod support details.
Basic management commands
Once the server is running, manage it from the console or in-game as an operator:
stop # graceful shutdown
save-all # force world save
whitelist on # enable whitelist (only listed players can join)
whitelist add PlayerName # add to whitelist
ban PlayerName # ban a player
kick PlayerName # kick without ban
gamemode survival PlayerName # change a player's gamemode
tp PlayerName1 PlayerName2 # teleport
It depends on player count and mods: 2G-3G for 2-4 vanilla players, 3G-4G for 2-5 players with a few mods, 4G-6G for 5-10 players, and 6G-12G for a large modpack. Set -Xmx and -Xms to the same value in your start script rather than assuming more is always better.
How do I set up port forwarding for a Minecraft server?
Log into your router's admin page, find the Port Forwarding (or Virtual Server / NAT) section, and forward external port 25565 to your server PC's local IP on internal port 25565, TCP. If your network won't allow port forwarding, such as on a university or corporate connection, use Playit.gg as a free tunnel instead.
Should I run vanilla or Paper?
Paper is a drop-in replacement for the vanilla server jar and is the easier route: it improves multi-threaded chunk handling and entity activation, and includes many optimizations by default without extra setup. The tradeoff is that Paper is compatible with vanilla plugins but not with Fabric mods, so choose Fabric plus performance mods instead if you need mod support.
Can I run a server on the same PC I play on?
Yes, this is the normal self-hosting setup for 2-5 friends on a vanilla or lightly modded server. Just be aware the server process competes with the game client for RAM and CPU on that machine, so budget both separately rather than treating them as one pool.
Comments
Loading...