> Intel // field guide_

How to Make a Minecraft Server (Java Edition Guide)

By Matthew Zhao||Updated
MinecraftGuides

To make a Minecraft server for Java Edition, install Java 25, download the official server jar from minecraft.net, run it once, accept the EULA in eula.txt, and start it again. Then add your friends to the whitelist, forward port 25565 on your router so people outside your home can join, and set up backups before anyone builds anything they care about.

This guide walks through each step for the current Java Edition release, explains the settings worth changing, and covers when Paper, Fabric or a hosted server makes more sense. Bedrock players should skip to the Bedrock section near the end, because Bedrock uses different server software.

Which Minecraft version this guide covers

Mojang switched Java Edition to a new version format in 2026. Instead of 1.21.x, releases are now numbered year.drop.hotfix: Java Edition 26.1 was the first, released March 24, 2026, and hotfixes add a third number (26.1.1, 26.1.2). As of October 12, 2026, Mojang's official version manifest lists 26.3 as the latest release, with 26.4 in snapshots.

Your server version has to match the version your players run. Most of the steps below apply to any recent release, and the places where the version matters (Java, a few properties) are called out.

Step 1: Install the right Java version

The Minecraft launcher ships its own Java for the game, but the server needs Java installed on the machine that runs it. According to the Minecraft Wiki's server setup tutorial:

Minecraft version Java required
26.1 and later Java 25
1.20.5 to 1.21.11 Java 21
1.18 to 1.20.4 Java 17

Mojang's version data for 26.3 also lists Java 25 as the required major version, and the 26.1 changelog notes the bundled runtime is now the Microsoft Build of OpenJDK 25.

Any OpenJDK 25 build works. Two common free options are the Microsoft Build of OpenJDK and Eclipse Temurin. Install it, open a new terminal (Command Prompt or PowerShell on Windows, Terminal on macOS or Linux), and check:

java -version

The output should start with version 25. If it shows an older version, an older Java is earlier on your PATH. Uninstall it or point the start command at the Java 25 executable directly.

Step 2: Download the official server jar

Go to the Minecraft: Java Edition server download page and download the jar. The page labels it with the version number (for example minecraft_server.26.3.jar), and the file itself is often saved as server.jar. Either name works as long as your start command matches. This guide uses server.jar.

Create an empty folder just for the server, such as minecraft-server, and move the jar into it. The server writes all its files (world, configs, logs) into whatever folder you run it from, so keeping it separate saves a mess later.

Step 3: Run it once and accept the EULA

Open a terminal in that folder and run:

java -jar server.jar --nogui

The --nogui flag skips the small graphical window and keeps everything in the terminal. The wiki notes that plain nogui without dashes still works as a legacy alias.

On the first run the server creates a few files, including eula.txt and server.properties, and then stops. Open eula.txt in a text editor and change:

eula=false

to:

eula=true

That line confirms you have read and agree to the Minecraft End User License Agreement. If you skip it, the server shuts down every time you try to start it.

Step 4: Set memory with -Xmx and -Xms

Now make a start script so you don't retype the command. Two Java flags control memory:

  • -Xmx is the maximum memory the server may use.
  • -Xms is the memory it starts with. The wiki says this only affects startup performance.

How much to give it depends on your player count, view and simulation distance, and mods. There is no single official number. The official download page shows -Xmx4G -Xms4G in its example command, and the wiki's memory section says -Xmx2G is "more than enough for a home server with 5 players on default simulation distance," then tells you to scale up from your real settings.

A reasonable start for a small group is 4 GB. On Windows, save this as start.bat in the server folder:

java -Xms4G -Xmx4G -jar server.jar --nogui
pause

On macOS or Linux, save this as start.sh:

#!/bin/sh
java -Xms4G -Xmx4G -jar server.jar --nogui

Then make it executable with chmod +x start.sh and run ./start.sh.

Leave enough RAM for your operating system and anything else on the machine, including the Minecraft client if you play on the same PC. The wiki's tutorial also says modern Java versions handle defaults well, so you rarely need long lists of tuning flags on vanilla. If the server stutters once people join, our Minecraft server lag guide covers what to check first.

Run the start script. The first full start generates the world, which takes a moment. When the console shows the server is done loading, connect from Minecraft on the same PC using localhost as the address.

Step 5: Change the important server.properties settings

Stop the server with the stop command before editing server.properties, then start it again to apply changes. These are the keys most groups change. Names and defaults are from the server.properties page on the Minecraft Wiki.

Key Default What it does
motd A Minecraft Server Text shown under the server name in the multiplayer list
difficulty easy peaceful, easy, normal or hard
gamemode survival survival, creative, adventure or spectator
max-players 20 Maximum players online at once
white-list true (since 26.3) Only players on the whitelist can join
online-mode true Checks every player against Minecraft's account servers
view-distance 10 Chunks sent to players (3 to 32)
simulation-distance 10 Chunks that are actively ticked around players (3 to 32)
spawn-protection 16 Radius around spawn that non-ops can't edit; 0 turns it off
level-seed blank Seed for a new world; blank means random
level-name world Name of the world folder
server-port 25565 Port the server listens on
hardcore false Hardcore mode

A few notes that trip people up:

  • Keep online-mode=true. The wiki warns that with it off, people can join with fake accounts.
  • PvP and command blocks are no longer properties. Since 1.21.9 (25w35a), pvp and enable-command-block were removed from server.properties and replaced with game rules. Set them in-game or from the console, for example gamerule pvp false or gamerule command_blocks_work false. Older guides that tell you to add pvp=false to the file are out of date.
  • Seeds and world names only matter for new worlds. Changing level-seed does nothing to a world that already exists. Change level-name to a new folder name (or delete the old world) to generate a fresh one.
  • Lower simulation-distance first if the server struggles. It reduces how much of the world the server has to tick, while view-distance mostly affects how far players can see.

Step 6: Set up the whitelist and ops

Commands typed into the server console don't need a leading slash. In-game, you add the slash.

As of 26.3, white-list defaults to true in a newly generated server.properties, so a new server turns away everyone who isn't on the list. That includes you. Add each player by their exact Java username:

whitelist add YourName
whitelist add FriendName

Other whitelist commands you will use: whitelist remove <name>, whitelist list, whitelist on, whitelist off, and whitelist reload if you edited whitelist.json by hand. If you also set enforce-whitelist=true, players removed from the list get kicked when the whitelist reloads.

To make someone an operator (admin), run:

op YourName

This adds them to ops.json at the level set by op-permission-level in server.properties (default 4, the highest). Ops can run commands like gamemode, kick, ban and whitelist in-game. Only op people you trust with your world.

Step 7: Open port 25565 and port forward

Players on your home network can join right away using your PC's local IP address (something like 192.168.0.168). Friends elsewhere need you to forward a port.

  1. Give the server PC a fixed local IP. Set a DHCP reservation in your router so the address doesn't change after a reboot.
  2. Allow Java through your firewall. On Windows, the first run usually pops up a prompt for "OpenJDK Platform binary." Allow it.
  3. Create a port forwarding rule. In your router's admin page, forward external port 25565 to internal port 25565 on the server PC's local IP. The wiki tutorial says to pick "TCP/UDP" or "Both," or create one rule for each protocol if your router doesn't offer that.
  4. Share your public IP. Friends connect with your public IP address, plus :port if you changed server-port from 25565.
  5. Test from outside. Use a port checker or have a friend try while the server is running.

Router menus differ a lot, and some home connections (CG-NAT, some mobile and fiber ISPs) can't accept incoming connections at all. Our Minecraft port forwarding guide goes through router-specific steps and those edge cases. If you plan to run the server on the same PC you play on, the PC hosting guide covers what that means for performance and uptime.

Step 8: Back up your world

Your world lives in the folder named by level-name (default world). Copy that folder somewhere else on a schedule, and keep server.properties, whitelist.json and ops.json with it so you can restore the whole server.

The safest way is to stop the server and copy the folder. If you want to back up while players are online, use the save commands from the console:

save-off
save-all flush

save-off stops the server writing world files so you can copy them cleanly, and save-all flush writes everything to disk immediately. Copy the world folder, then run:

save-on

Keep more than one copy, and keep at least one off the server machine. Always take a fresh backup before updating to a new Minecraft version, so you have a copy to fall back on if something goes wrong.

Paper and Fabric: alternatives to the vanilla jar

The official jar runs vanilla Minecraft. Two popular alternatives replace it:

Paper Fabric
What it adds Plugins (Bukkit/Spigot API) and performance changes Mods through the Fabric mod loader
Players need to install anything? No, plugins run only on the server Usually yes, matching mods on each client
Good for Vanilla-style servers with extras like land claims, economy, permissions Content mods, technical mods, modpacks
Download papermc.io/downloads/paper fabricmc.net/use/server

Paper's getting started guide lists Java 25 for 26.1 and later, and uses the same pattern as vanilla: java -Xms4G -Xmx4G -jar paper.jar --nogui. Fabric's download page offers a server launcher, and Fabric notes that most mods also need Fabric API in the mods folder. Forge and NeoForge are the other main mod loaders.

Always use a build of Paper or Fabric that matches the Minecraft version your players run. For a full walkthrough of modded setups, see how to make a modded Minecraft server.

If you play Bedrock Edition

Everything above is for Java Edition. The Java server jar doesn't accept Bedrock players (Windows, consoles, mobile). For Bedrock, Mojang offers the free Bedrock Dedicated Server download. The Minecraft Wiki lists support for Windows 10 or later and Ubuntu 22.04 or later, and default ports of 19132 (IPv4) and 19133 (IPv6) over UDP, not 25565. Its config file is also called server.properties, but the keys differ, and its whitelist command is allowlist.

Hosting your Minecraft server with EZ Game Host

Running the server at home is free, but it only stays online while your PC does, and you handle the port forwarding, updates and backups yourself. If you'd rather skip that, EZ Game Host's Minecraft server hosting gives you a server with full console access, Paper, Spigot, Forge and Fabric support, custom JAR uploads, 3 backup slots and a subdomain included, with 24/7 support and a 99.9% monthly uptime SLA.

Current plans, as advertised on October 12, 2026 (these are allocations, not performance guarantees):

Plan Price RAM CPU Players Storage
Basic $12/mo 4 GB 1 thread 10 40 GB NVMe
Standard $24/mo 8 GB 2 threads 30 40 GB NVMe
Pro $48/mo 16 GB 4 threads 100+ 80 GB NVMe

The Basic plan's 4 GB matches the memory in Mojang's own example command and is above the wiki's 2 GB figure for five players on vanilla. Modpacks and bigger groups usually need more, which is where Standard and Pro fit. Quarterly and annual billing are also available, and monthly plans can be cancelled any time. Compare them on the Minecraft plans page, or read how much a Minecraft server costs for the wider picture.

FAQ

Can I make a Minecraft server for free?

Yes. The official server jar is free from minecraft.net, and you can run it on your own PC. Your costs are the hardware, electricity and your internet connection, and the server is only online while that PC is on.

What Java version do I need for a Minecraft server?

For Minecraft 26.1 and later, you need Java 25. Versions 1.20.5 through 1.21.11 need Java 21, and 1.18 through 1.20.4 need Java 17. Check with java -version before starting the server.

Why can't my friends join my Minecraft server?

The usual causes are a missing or wrong port forward for 25565, a firewall blocking Java, a version mismatch between the server and their game, or the whitelist. Since 26.3 the whitelist is on by default, so add each player with whitelist add <name>.

How do I turn off PvP on a Minecraft server?

On current versions, PvP is a game rule rather than a server.properties setting. Run gamerule pvp false in the server console, or /gamerule pvp false in-game as an op.

How much RAM does a Minecraft server need?

There is no single official figure. The Minecraft Wiki says 2 GB is more than enough for five players on vanilla at default simulation distance, and Mojang's download page uses 4 GB in its example command. Modpacks and bigger groups usually need more, so watch actual usage and adjust -Xmx.

We use cookies for analytics, ad measurement and session recordings. Accept to allow them, or Decline to opt out of analytics and the sale or sharing of your personal information. Privacy Policy