The server software is free from Mojang for Java and Bedrock, so the real decision is where the server runs: your own computer, a paid host, or a free option with limits. This guide helps you choose, then sets up a Java Edition 26.3 server from the download to the first friend joining.

How to host a Minecraft server: where it runs

A server has to run on a computer that stays on while people play. That computer can be yours, a hosting company's, or Mojang's:

Ways to host a Minecraft server
OptionCostOnlineBest for
Your own PCFreeWhile your PC is on and running itFriends, learning, testing plugins and mods
Paid server hostMonthly planAlwaysA server you want to grow or list publicly
Free server host, such as AternosFreeStarted by hand, stops when emptyOccasional sessions with friends
e4mc on your single-player worldFreeWhile your game is openPlaying your own world with friends tonight
RealmsFrom $3.99 a month (Bedrock), $7.99 (Java)AlwaysSmall groups who want no setup

Your own PC costs nothing, and most modern computers can run a vanilla server for four to eight players. It needs no graphics card, but a wired connection is steadier than Wi-Fi. The server is only up while that computer runs it, and friends outside your home need a way in, either port forwarding or a tunnel. The steps below cover this option.

A paid host runs the server in a data centre, with an address that is always up and a control panel that installs Paper, Fabric or a modpack for you. Once a server has regular players, it is usually worth it. Compare hosts on single-core CPU speed, a location near your players, full file access and backups, rather than on the amount of RAM alone.

Realms is Mojang's own hosting. Java Realms costs $7.99 a month for you and up to 10 players at once, and cannot run mods or plugins. Bedrock Realms starts at $3.99 a month for you and 2 friends. There is nothing to set up; the trade-off is far less control than your own server.

Can you make a Minecraft server for free?

Yes. Mojang's server software is free for both editions, and running it on your own computer costs nothing but electricity. Free hosting exists too, with limits worth knowing before you build a world on it:

  • Free hosts such as Aternos give you a real server at no cost. To share their hardware, they queue you at busy times and stop a server once nobody is on it, so someone has to start it from the website before each session.
  • e4mc skips the server: it gives your single-player world a public address while you play, and friends need nothing installed. See how to play with friends without a server.
  • Cloud free tiers can run a small Java server around the clock. Oracle Cloud's Always Free tier, for example, includes an Arm virtual machine with 2 OCPUs and 12 GB of memory. You set up Linux yourself, free capacity is not always available, and Oracle can reclaim instances it considers idle.

Step 1: Install Java 25

A Java Edition server runs on Java, and Minecraft 26.1 and newer needs Java 25. The Java built into the Minecraft Launcher only runs the game, so install your own. Older Minecraft versions need older Java:

Java version each Minecraft server version needs
Minecraft versionJava version
26.1 and newerJava 25
1.20.5 to 1.21.11Java 21
1.18 to 1.20.4Java 17
1.17 and 1.17.1Java 16
1.12 to 1.16.5Java 8
  • Windows: download the Java 25 installer from Adoptium (Eclipse Temurin) or the Microsoft Build of OpenJDK.
  • macOS: use the Temurin 25 installer from Adoptium, or Homebrew.
  • Linux: install OpenJDK 25 from your package manager.
Or install Java 25 from a terminal
# Windows (winget)
winget install EclipseAdoptium.Temurin.25.JRE

# macOS (Homebrew)
brew install --cask temurin@25

# Ubuntu and Debian
sudo apt install openjdk-25-jdk-headless

# Fedora
sudo dnf install java-25-openjdk-headless

Then open a new terminal and run java -version. It should report version 25. If it shows an older number, an older Java comes first on your PATH: uninstall it, or reinstall Java 25 with the option to add it to PATH.

Step 2: Download and start the server

  1. Make a folder

    Create an empty folder for the server, such as minecraft-server in your Documents. Everything the server creates, including the world, goes in here.

  2. Download server.jar

    Get the server from Mojang's Java server download page and move it into the folder. If it saves as minecraft_server.26.3.jar, rename it to server.jar so the commands below match.

  3. Run it once

    Open a terminal in the folder (on Windows, type cmd in File Explorer's address bar and press Enter) and run java -Xms4G -Xmx4G -jar server.jar nogui. The first run creates eula.txt and server.properties, then stops.

  4. Accept the EULA

    Open eula.txt in a plain text editor, change eula=false to eula=true and save. That confirms you accept the Minecraft EULA; the server will not start until you do.

  5. Set up the world

    If you want a particular seed or game mode, edit server.properties now: the world is generated on the next start. The settings worth knowing are in the table below.

  6. Start it again

    Run the same command. When the console prints Done and suggests typing help, the server is up.

  7. Let yourself in

    New servers only admit players on the whitelist. Type op <your Minecraft name> in the console: operators always get in, and can use admin commands in game.

  8. Join it

    In Minecraft, choose Multiplayer, then Add Server, and use the address localhost.

  9. Stop it with the stop command

    Type stop in the console when you are done. It saves the world before shutting down; closing the window can lose recent changes.

The server.properties settings worth changing

Open server.properties in a plain text editor, change the value after the =, save, and restart the server. The defaults below are from Java Edition 26.3.

Key server.properties settings (Java Edition)
SettingDefaultWhat it does
motdA Minecraft ServerThe line under your server's name in the multiplayer list. Color codes work; the MOTD generator writes them for you.
white-listtrueOnly players on the whitelist, and operators, can join. Set it to false for an open server.
online-modetrueChecks that every player signs in with a real account. Leave it on: with false, anyone can join under any name, including yours.
max-players20How many players can be online at once.
difficultyeasypeaceful, easy, normal or hard.
gamemodesurvivalThe game mode new players start in.
level-seedBlank (random)The seed for the world. It only applies when a new world is generated.
view-distance10How many chunks around each player the server sends. Lowering it is the quickest way to save memory.
simulation-distance10How many chunks around each player keep running. Lower it if the server lags.
server-port25565The port players connect to. If you change it, forward the new number and add it to the address.
server-ipBlankLeave it blank so the server listens on every network address.
pause-when-empty-seconds60Pauses the world this many seconds after the last player leaves.

Keep inventory, the daylight cycle and other world rules are game rules, not properties: see keep inventory and other game rules in the server commands guide.

Make a start script and set the RAM

Save the start command as a script in the server folder so you do not have to type it every time:

start.bat (Windows)
@echo off
java -Xms4G -Xmx4G -jar server.jar nogui
pause
start.sh (macOS and Linux)
#!/bin/sh
cd "$(dirname "$0")"
exec java -Xms4G -Xmx4G -jar server.jar nogui

On Windows, double-click start.bat; pause keeps the window open so you can read any error. On macOS and Linux, run chmod +x start.sh once, then start the server with ./start.sh in a terminal.

-Xmx is the most memory the server may use and -Xms is what it starts with. Mojang's own example sets both to 4 GB, which suits around ten players on vanilla. For more players, plugins or mods, the server RAM calculator gives an estimate. Leave 1 to 1.5 GB of the computer's memory free for the system.

Want plugins? Switch to Paper

The official server runs vanilla Minecraft. To add plugins such as land claims, ranks or vote rewards, most servers use Paper: a faster drop-in replacement for the official server that runs Bukkit, Spigot and Paper plugins. Players still join with an unmodded game.

  1. Download Paper

    Get the build for your Minecraft version from papermc.io. Like the official server, it needs Java 25 for Minecraft 26.1 and newer. Builds for a brand-new release are labelled alpha or beta until Paper marks them stable.

  2. Swap the jar

    Stop the server, back up the folder, and put the Paper jar in it. In your start script, replace server.jar with the Paper file's name. Paper converts an existing vanilla world on its first start.

  3. Add plugins

    Put plugin .jar files in the new plugins folder and restart. Run plugins in the console to check them: green means loaded, red means it failed, and logs/latest.log says why.

Plugins are not mods. Mods that add new blocks, items or mobs need a mod loader and must be installed by every player: see how to make a modded Minecraft server.

Let friends join

Friends on your Wi-Fi can join straight away with the server computer's local IP address, such as 192.168.1.20. For anyone outside your home, pick one:

  • Forward a port. Point TCP port 25565 on your router at the server computer and give friends your public IP. How to port forward a Minecraft server covers the router, the firewall, CGNAT and the fixes when it will not work.
  • Skip the router. A tunnel service or private network app gives friends an address with no router changes, and works where port forwarding cannot. See hosting without port forwarding.

Then test it from outside with the Minecraft server status checker. It connects from our servers, not your network, so a green result means the internet can reach you.

Keep the server safe

  • Leave the whitelist on unless you mean to run a public server, and add friends with whitelist add. The whitelist guide covers every command.
  • Op only people you trust. Operators can change anything, stop the server and de-op you. The server commands guide covers permission levels, kicking and banning.
  • Keep online-mode=true. Offline mode lets anyone join under any name, which makes the whitelist useless.
  • Back up the world before updating the server or adding plugins: stop the server and copy the whole folder.
  • Keep the server updated, and download server software only from its official site.

Server will not start? Common errors

'java' is not recognized as an internal or external command

Windows cannot find Java. Install Java 25 as above, then open a new terminal window. If it still fails, Java is not on your PATH: reinstall it with the option to add it to PATH.

UnsupportedClassVersionError: … has been compiled by a more recent version of the Java Runtime

Your Java is older than this Minecraft version needs. "Class file version 69.0" in the message means Java 25 is required; 65.0 means Java 21. Install the right Java and check it with java -version.

You need to agree to the EULA in order to run the server

Open eula.txt in the server folder, change eula=false to eula=true, save, and start the server again.

FAILED TO BIND TO PORT!

Something is already using the port, usually a copy of the server you started earlier. Close it. If nothing else is running, check that server-ip in server.properties is blank. To run a second server, give it a different server-port.

You are not white-listed on this server!

New servers start with the whitelist on. Run whitelist add <name> in the console for each player, or whitelist off for an open server.

Incompatible client! Please use 26.3

The player's game is on a different version from the server. They pick the server's version in the Minecraft Launcher under Installations, then join again.

List your server so players can find it

Once the server stays up and you want players beyond your friends, make it public: set white-list=false, write a clear motd, and give it an icon with the server icon maker. Then put it where players look:

  1. Add it to NewMinecraftServers

    Add your server for free. We check it from our side the way the game does, so the listing shows its real status, version and player count, with player history on its stats page.

  2. Reward votes

    Players can vote for a server once a day. Connect Votifier and each vote gives a reward in game, which is what keeps players voting.

  3. Add the Companion plugin

    On Paper, the free Companion plugin claims your listing with one command and shows your peak players, uptime and busiest hours in game.

Making a Minecraft server: questions

Can I make a Minecraft server for free?

Yes. Mojang's server software is free for Java and Bedrock, and running it on your own computer costs nothing. Free hosts such as Aternos exist too, but they stop a server once it is empty and queue you at busy times.

How do I create a new Minecraft server?

Install Java 25, download server.jar from minecraft.net into an empty folder, run it once, set eula=true in eula.txt, and run it again. Friends on your network join with your local IP; others need port forwarding or a tunnel.

How do I make a 24/7 Minecraft server for free?

You need a computer that never switches off. Free hosts stop empty servers, so the realistic free options are a PC you leave running or a cloud free tier such as Oracle Cloud Always Free, which you set up yourself. For a dependable 24/7 server, use a paid host.

Can I self host a Minecraft server?

Yes. Most modern Windows, macOS or Linux computers can run a Java server for a few friends. It is only online while that computer runs it, and friends outside your home need port forwarding or a tunnel.

Which Java version does a Minecraft server need?

Java 25 for Minecraft 26.1 and newer, Java 21 for 1.20.5 to 1.21.11, and Java 17 for 1.18 to 1.20.4. The launcher's built-in Java only runs the game, so install Java separately for the server.

Do my friends need their own copy of Minecraft?

Yes. With online-mode on, which is the default and the safe setting, every player signs in with their own Java Edition account.

Should I use Paper or the official server?

Use the official server for pure vanilla with a few friends. Switch to Paper when you want plugins or better performance; it is a drop-in replacement and converts your world on first start.