How to Make a Minecraft Java Server
By PickaxeKit Editorial Team · Updated 2026-11-08
Install Java 25, download the official server.jar, run it once, set eula=true in eula.txt, then run it again. Friends on your network join with your local IP; friends elsewhere need an open port 25565.
What you need
- Java 25 for Minecraft 26.3. Older Minecraft versions need older Java: see which Java Minecraft needs.
- The official server.jar for your version, from the Minecraft Java server download page on minecraft.net.
- A computer that stays on while people play, with a few GB of free RAM.
Set it up
- Make a new folder, for example MinecraftServer, and put server.jar inside.
- Open a terminal in that folder and start the server once (command below). It stops and creates eula.txt.
- Open eula.txt, read the Minecraft EULA, and change eula=false to eula=true if you agree.
- Start the server again. When the console says Done, it is running.
- In Minecraft, add a server with the address localhost to join from the same PC.
java -Xms2G -Xmx2G -jar server.jar nogui-Xmx2G gives the server 2 GB of memory. Raise it for more players or big worlds, but leave memory for your operating system.
Useful server.properties settings
| Setting | What it does |
|---|---|
| motd | The message shown in the server list |
| max-players | How many people can join at once |
| difficulty | peaceful, easy, normal or hard |
| gamemode | survival, creative, adventure or spectator for new players |
| white-list | true = only players on the whitelist can join |
| view-distance | How many chunks are sent to players; lower it if the server lags |
| server-port | 25565 by default |
Letting friends join
- Same network: friends join with your computer's local IP address (for example 192.168.1.20).
- Over the internet: forward TCP port 25565 on your router to your computer and share your public IP, or use a hosting service. Only share your address with people you trust.
- Turn on the whitelist (/whitelist on, then /whitelist add NAME) for private servers.
Tip: Getting a Java error when you start the server? See how to fix Minecraft Java errors.