How to Create a Minecraft Server

Minecraft 26.3

Set up your own server on your computer in ten minutes: Java, server.jar, eula.txt, and a launch file. Plus, a whitelist, port, and how to invite friends.

  • needed Java 25
  • voice port 25565
  • Verified in 26.3
My Game select version

Save your preferences in this browser and apply them to supported tools. Settings in a shared link take priority. Wiki version labels are not affected.

On this page 10 sections

At a glance

Java 25, server.jar, and eula=true are required.

  • Launch the server
    java -Xmx2G -Xms2G -jar server.jar nogui
  • Invite a friend
    whitelist add Steve

Place Java 25, download server.jar from minecraft.net, run it with the command above, change eula=false to eula=true in eula.txt and restart it again. The server is ready: access it at localhost, and add a friend to the whitelist — they are enabled by default.

Five steps

  1. Install Java 25, which Minecraft 26.3 servers require. For other Minecraft versions, see the Java compatibility table What Java version is needed.
  2. Download the server file from the official minecraft.net/download/server page and place it in an empty folder — all server files will appear next to it. The file is named server.jar.
  3. Launch the server with a command java -Xmx2G -Xms2G -jar server.jar nogui From this folder. It will create eula.txt and server.properties and it will stop immediately.
  4. Open eula.txt Replace eula=false to eula=true and save — this means you agree to the Minecraft license.
  5. Launch again. When the server creates the world, in the game click "Online Game" → "Add" and enter the server address in the "Server Address" field. localhost.

How to join a server by address and what the labels in the list mean — on the page? How to join a server.

Why did the server close immediately?

This is how it should be on first launch. The server creates eula.txt with a line eula=false, writes to console

You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

and stops. Until there is eula=true, the world is not generated. If the console window flickered and disappeared, and eula.txt didn't appear — the wrong Java version is running: check its version with the command java -version.

Launch file

The command is convenient to save in a file and run by double-clicking: on Windows — start.bat, on Linux and macOS — start.sh. In the command -Xmx2G — how much memory to give the server, nogui — do not open the server window with memory, players, and logs: all of this is available in the console.

Pre-made file tailored to your version, memory, and system will be assembled startup script generator — with flags that reduce garbage collection pauses and auto-restart. How much memory to give — on the page How to allocate memory.

Main settings in server.properties

LineBy default
server-port25565
online-modetrue
white-listtrue
max-players20
gamemodesurvival
difficultyeasy
motdA Minecraft Server
level-nameworld

What does each line mean — in server.properties reference, and a ready file with required settings will assemble Config generator. Changes take effect after the server is restarted.

White list and operator

On the new Minecraft 26.3 server, the whitelist is enabled: line white-list=true. Only players added can join; others see 'You are not on this server's whitelist!'. Commands are typed in the server console without a forward slash, and in the game chat with one.

  • Make yourself an operator
    op Steve
  • Invite a friend with a white list
    whitelist add Steve
  • Turn off whitelist
    whitelist off
  • Stop the server and save the world
    stop

Instead of Steve — the player's username. The operator can enter commands and change rules; what operator levels provide — on the page "Operator levels".

How to call friends

Where your friend isWhat address should be given to him?
On the same computerlocalhost
In the same network (one router)The local IP address of a computer with a server — in the form of 192.168.1.5. It displays ipconfig on Windows.
Through the internetYour network's external IP. On your router, open port 25565 and direct it to the computer running the server; if your provider doesn't provide an external IP, hosting remains the option.

Without license on a server with online-mode=true: the server checks each player's account with Mojang. You can play with another player offline in a normal world — "How to Play with a Friend". To connect a friend from their phone to a Java server, use the Geyser plugin — it will collect the config.yml lines from it. Geyser and Floodgate generator.

Custom computer or hosting

Running a server on your own computer is free, but it only works while the computer is on, and shares memory and processor resources with the game. Hosting costs money, but the server runs 24/7 and has its own address. The free option is — Aternos: the server runs as long as players are on it. Starting is easier at home, and moving means transferring the entire server folder: the world lies within it, in the folder level-name.

When the server starts, it can be add to JuxMC monitoring — players will find them there, and you will see online status by day. Discord channel online status will show server status in Discord.

Frequently asked questions

How to create your own free Minecraft server?

Download server.jar from minecraft.net, install Java 25, run the server with the command java -Xmx2G -Xms2G -jar server.jar nogui, change eula=false to eula=true in the eula.txt file, and restart. A server on your computer is worthless — you only pay for hosting if you don't want to keep the computer running.

Why does the server shut down immediately after starting?

On first startup, the server creates eula.txt with eula=false and shuts down: it will not run without agreeing to the EULA. Open eula.txt, set eula=true, and start the server again. If the window disappears instantly, it is likely that you are using the wrong Java: the 26.3 server requires Java 25.

Why can't my friend join my server?

In Minecraft 26.3, the whitelist is enabled by default (white-list=true). Add a friend using the command whitelist add and their username. A friend from another network requires your external IP and open port 25565; without a license, access is denied while online-mode=true.

More in the wiki

Minecraft 26.3 data: menu captions — from game localization, numbers, and rules — from client and server code; each command has been verified by the game.