Setup · 13 min read
How to host a Minecraft server
Host a Minecraft Java 26.3 server on your own PC: Java 25, server.jar, eula.txt, port 25565 and the new whitelist default, plus fixes for the usual errors.
Last checked
Short answer
server.jar from minecraft.net, run it once, change eula=false to eula=true in eula.txt, and run it again. Then forward TCP port 25565 on your router and add each friend with whitelist add <name>. If you can't change your router, use Realms, a free host or a rented server instead.The four ways compared
This page covers Java Edition first. Bedrock has its own section near the end.
| Way | What you need | Mods and plugins | The catch |
|---|---|---|---|
| Your own PC | What you needJava 25, Mojang's server.jar, a router you can sign in to | Mods and pluginsYes, with other server software | The catchYour PC stays on, and friends see your home IP address |
| Realms | What you needA monthly subscription from Mojang | Mods and pluginsNo, according to the Minecraft Wiki | The catchYou plus 10 players at once on Java Edition |
| A free host | What you needAn account with the host | Mods and pluginsCheck the host's own page | The catchThe server stops when the last player leaves, and starts can queue |
| A rented server | What you needA plan or pass from a hosting company | Mods and pluginsUsually; check which software is offered | The catchMost large hosts we checked bill by the month |
Mojang does not support the first way. Its own article says running a server at home “is not recommended unless you know what you are doing” and that “we can't offer support for home networks or privately made servers”.
If everyone is in the same house
You may not need a server at all. A world you are playing can be opened to the other players on your home network from the pause menu. In Minecraft 26.3 the setting is under World Options, in the Multiplayer section: set it to LAN (“Players on the same network can join”) and pick a port if you want one. Older versions have a button called Open to LAN in the same place, so the label depends on your version.
Only people on your network can join this way, there are no router changes to make, and the world closes when you leave it.
What your PC needs
| Requirement | For Minecraft Java Edition 26.3 |
|---|---|
| Java | For Minecraft Java Edition 26.3Java 25. Older Java will not run 26.x |
| Memory | For Minecraft Java Edition 26.3At least 2 GB for the server. The Minecraft Wiki says 2 GB is plenty for a home server with 5 players and that larger servers may need 4 GB |
| Disk | For Minecraft Java Edition 26.3At least 5 GB free |
| Processor | For Minecraft Java Edition 26.3The server mostly uses one core, so a fast core matters more than many |
| Network | For Minecraft Java Edition 26.3A wired connection. The wiki advises against Wi-Fi |
| Router | For Minecraft Java Edition 26.3One you can sign in to and change |
| Operating system | For Minecraft Java Edition 26.3Any that runs Java 25: Windows, macOS or Linux |
| Server software | For Minecraft Java Edition 26.3server.jar, free from Mojang |
Guides that tell you to install Java 17 or Java 21 were written for older versions. Since 26.1, Minecraft needs Java 25. The “26” is the year: 26.3 came out on 15 September 2026.
If you play on the same PC that runs the server, the game needs memory too, so count both. For more than five players, our guide to server RAM has estimates by group size.
Check your connection before you start
Some internet providers share one public IP address between many customers. This is called carrier-grade NAT, or CGNAT. If yours does, a port forwarded on your router never reaches you, and friends outside your house cannot join however carefully you follow the steps.
Sign in to your router and find its internet (WAN) address. Then open a “what is my IP” site and compare.
- If the router's address starts with anything from
100.64to100.127, you are behind CGNAT. That range is reserved for it. - If the two addresses differ, something between you and the internet is translating your address, and forwarding on your router alone will not work.
- If they match, forwarding should work.
This test is our reading of the standards that define CGNAT (RFC 6598 and RFC 6888); neither Mojang nor the Minecraft Wiki mentions it. Behind CGNAT, ask your provider whether it can give you an address of your own; otherwise use one of the other three ways.
Set up the server, step by step
- Install Java 25. Then open a command line and type
java -version: the first line should show 25. Mojang's advice is to make sure you can runjavafrom the command line first; on Windows that can mean adding Java to the PATH variable. - Download the server from Mojang's page, “Download the Minecraft: Java Edition server”, at
minecraft.net/download/server. Downloading it means agreeing to the Minecraft End User License Agreement. - Make a new, empty folder, for example
minecraft-server, and put the file in it. The server fills the folder with its own files and the world. - Open a command line in that folder and run Mojang's command:
java -Xmx4G -Xms4G -jar server.jar noguiUse the file's real name if yours is not
server.jar; Mojang's page shows it asminecraft_server.26.3.jar.4Gis Mojang's memory figure, and the wiki's2Gis enough for five players. Leave offnoguiif you want a window. - The first run stops straight away with “You need to agree to the EULA in order to run the server” and leaves a file called
eula.txt. Open it, changeeula=falsetoeula=trueand save. - Run the same command again. The first start makes the world, which takes a while. The server is ready when the console shows a line ending
For help, type "help". - Add each friend to the whitelist. In the server console, type:
whitelist add <name>Use their Minecraft name, not their Microsoft account email. The console answers
Added <name> to the whitelist. - To shut down, type
stopin the console, so the server saves the world and closes cleanly.
A start file, so you don't type the command each time
On Windows, make a text file called start.bat in the server folder with these two lines, then double-click it. pause keeps the window open so you can read any error.
java -Xms2G -Xmx2G -jar server.jar nogui
pauseOn macOS or Linux, make start.sh, run chmod +x start.sh once, then start it with ./start.sh:
#!/bin/sh
cd "$(dirname "$0")"
exec java -Xms2G -Xmx2G -jar server.jar nogui-Xms is the memory Java starts with and -Xmx the most it may use. Change 2G in both to give the server more.
Ports to open
| Port | Protocol | Used for | Forward it? |
|---|---|---|---|
| 25565 | ProtocolTCP | Used forThe game | Forward it?Yes |
| 25565 | ProtocolUDP | Used forQuery, which is off by default (enable-query=false) | Forward it?Only if you turn query on |
- Give the server PC a fixed internal IP address in your router's settings (often called a DHCP reservation). Otherwise the router can hand it a new one and the rule stops working.
- Add a port forwarding rule: external port 25565, internal port 25565, to the server PC's internal address. If the router asks for a type, TCP is the one the game needs.
- On Windows, allow “OpenJDK Platform binary” when the firewall prompt appears.
- With the server running, test the port with a port-checker site. Test from outside your network.
If your router sits behind a second router, forward the port on that one too.
Settings a first-timer should know
The settings are in server.properties, in the server's folder. The server reads the file when it starts, so stop it, edit, and start it again.
| Setting | Default | What it does |
|---|---|---|
white-list | Defaulttrue | What it doesOnly players on the whitelist can join |
online-mode | Defaulttrue | What it doesChecks each player's account. The whitelist only works with this on |
max-players | Default20 | What it doesThe most players at once |
server-port | Default25565 | What it doesThe port the server listens on |
motd | DefaultA Minecraft Server | What it doesThe line under the server's name in the list |
view-distance | Default10 | What it doesHow far players see, in chunks. The biggest lever on memory |
pause-when-empty-seconds | Default60 | What it doesPauses the world this long after the last player leaves |
The whitelist default is new. Mojang's 26.3 notes say “The white-list property is now true by default”, and the Minecraft Wiki's tutorial still says it is off. So a fresh 26.3 server turns everyone away until you add them.
server.properties explained covers the rest of the file, and the server.properties generator builds one for you.
How friends join
Each player opens Minecraft, chooses Multiplayer, then Add Server, and types the server address.
- On the PC that runs the server, the address is
localhost. - Players on your home network use the server PC's internal address, for example
192.168.0.168:25565. They don't need the forwarded port. - Players elsewhere use your public IP address, the one a “what is my IP” site shows. If you changed the port, they add it after a colon.
Their game has to be on the same version as the server. When Minecraft updates, copy your world folder somewhere safe, then download the new server file.
When it doesn't work
The messages below are the exact ones Minecraft 26.3 and Java print, so search this page for the one you see.
| You see | What it means | The fix |
|---|---|---|
'java' is not recognized as an internal or external command | What it meansWindows can't find Java | The fixInstall Java 25, then open a new command window. If it still fails, add Java to the PATH variable |
Error: Unable to access jarfile server.jar | What it meansThe file name or folder is wrong | The fixRun the command in the server's folder, and use the jar's real name, such as minecraft_server.26.3.jar |
UnsupportedClassVersionError ... class file version 69.0 | What it meansYour Java is older than 25 (69 is Java 25's number) | The fixInstall Java 25. If java -version still shows the old one, the old Java comes first on your PATH |
You need to agree to the EULA in order to run the server | What it meanseula.txt still says false | The fixSet eula=true in eula.txt, save, start again |
**** FAILED TO BIND TO PORT! | What it meansSomething already uses the port, often a second copy of the server | The fixClose the other copy, or change server-port and forward that port instead |
You are not white-listed on this server! | What it meansThe whitelist is on and the player isn't on it | The fixType whitelist add <name> in the console |
Incompatible client! Please use 26.3 | What it meansThe player's game and the server are different versions | The fixPick the server's version in the player's launcher, or update the server |
Failed to verify username! | What it meansMinecraft couldn't check the player's account | The fixOften a stale sign-in: the player restarts the game and the launcher. Don't turn online-mode off to get round it |
| Can't connect to server, Connection refused or Timed out | What it meansThe game can't reach the server | The fixCheck the server is running and the address is right. Works at home but not outside: check the port rule and firewall, then CGNAT |
Can't keep up! Is the server overloaded? | What it meansGame ticks are taking too long | The fixUsually CPU, a busy farm or too many mobs. Lower view-distance; see the RAM guide |
More messages and the full set of checks: can't connect to your Minecraft server.
The traps
Your public IP address is your home's address on the internet, and everyone you invite sees it. The Minecraft Wiki warns that griefers scan for servers by public IP address. Leave the whitelist and online-mode on, keep the server updated, and close the port when you stop hosting. The wiki also suggests a port other than 25565 and setting enable-status=false, which makes the server look offline to scanners and to the server list.
Most providers change your public address from time to time, typically every few days to few weeks according to the wiki. When it changes, the address your friends saved stops working. Dynamic DNS, or a static address from your provider, fixes that.
Be careful with operator status (op <name>). An operator can run any command, including stopping your server.
Realms
Realms is Mojang's own hosted service, sold as a monthly subscription. On Java Edition a Realm holds you plus 10 players at once. Friends you invite don't need a subscription of their own. You get three world slots, one playable at a time, and backups.
If you stop subscribing, Mojang says you have 18 months to download your worlds.
The Minecraft Wiki says mods and plugins cannot be installed on a Realm and that a Realm always runs the latest version of the game.
Bedrock Edition has three Realms tiers: Core for 2 players, Plus for 10 and Pro for 50.
A free host
A free host runs the server on its machines and charges nothing. We read the pages of several on 11 November 2026, and their own words set out the limits:
- The server stops or sleeps when the last player leaves, and someone has to start or wake it again.
- At busy times a start can wait in a queue.
- Memory is small: 1 GB on two of the hosts we read.
- Adverts fund the service on two of them.
One host says you can download your world, and that keeping it saved is your job.
A rented server
Renting means a company runs the server on its machines. Your PC can be off, your router is not involved, and players never see your home address.
The Minecraft Wiki's checklist for choosing a host is a fair one: which server software and versions it supports, whether you get file and console access, backups, and the refund terms. Check the billing period too. On the pricing pages we checked on 11 November 2026, a month was the shortest paid period at most of the large hosts.
Where our servers fit
We rent Minecraft Java servers. They differ from the home setup above in a few ways:
- They run Paper (plugins) or Fabric (light mods), not Mojang's plain
server.jar. NeoForge and Forge packs are a separate product. - No port forwarding: players type the address the panel shows. You accept Mojang's EULA in the panel.
- A world from your own PC comes in through the panel's Files page: pack the world folder into one .zip and use Bring in a world. It is checked before it replaces anything, and Undo puts the old world back; uploading a world covers the folder and version checks.
- Plugins and mods go in over SFTP.
- A pass lasts a day, a week or a month, paid up front.
- A server stops itself after 15 minutes with nobody online. The pass keeps counting.
- Keep your own copy: download your files from the panel's Files page, as one .zip or over SFTP.
- The whitelist starts on, as on any 26.3 server.
Sizes are on the pricing page, and the RAM calculator estimates one for your group. For a party or a single weekend, see a temporary Minecraft server.
Bedrock Edition
Bedrock is the edition on phones, consoles and Windows. It can't join a Java server.
Mojang publishes a free Bedrock Dedicated Server for Windows and for Ubuntu 22.04 or later. The default port is 19132. Since version 26.50 it uses a connection called NetherNet by default: a player's game makes a TCP handshake on the server's port, then plays over UDP. Mojang's stock file starts with the allow list on. Guides that say to open only UDP 19132 and 19133 were written before NetherNet.
On consoles the sources disagree. Mojang's download page says Xbox, PlayStation and Nintendo Switch players “can connect using the same server IP address and port”. The Minecraft Wiki says consoles cannot connect to external servers.
For a world with friends and no server, Bedrock has Invite to Game in the pause menu.
Questions people ask
Is it free to host a Minecraft server?
On your own PC, yes: Mojang's server software costs nothing. Each player still needs their own copy of Minecraft: Java Edition, and the server only lets in accounts it can check while online-mode is on.
How many players can a home server take?
The setting allows 20 by default (max-players). The real limit is your PC and upload speed: the wiki puts 2 GB of memory at about five players. The RAM guide goes further.
Does the PC have to stay on?
Yes. The world only exists while the server runs, so friends can't play when the PC is off or asleep. That is the main reason people move to Realms or a rented server.
Can I play on the same PC as the server?
Yes. Start the server first, then the game, and add localhost as the address. Both need memory, so count the game's share as well as the server's.
Can Bedrock players join my Java server?
Not on a plain Java server. The two editions use different servers. A Bedrock group needs Bedrock Dedicated Server or a Bedrock Realm.
Game facts checked on 11 November 2026 against Minecraft Java Edition 26.3 and Bedrock Dedicated Server 1.26.63.1.