Home › Minecraft › How to Make a Minecraft Server (Java Edition)
How to Make a Minecraft Server (Java Edition)
Public servers are fine, but they come with other people's rules, resets and queues. Running your own Minecraft server means your world, your seed, your difficulty, and a door that is only open to the people you invite. The official server software is free, and a PC that already runs Minecraft comfortably can host a small world for a handful of friends without much fuss. Here is the whole process, in the order that actually works.
What you need before you start
- A PC running a current version of Java, since the server software is a Java program; recent Minecraft versions need a recent Java release, so update it if the server refuses to start
- The free server.jar file from the official Minecraft website
- About 2 GB of free RAM or more for a small group, and a steady internet connection
- A dedicated folder for the server, because it generates a small crowd of files
Setting up the server
- Download the server file from the Minecraft server page on minecraft.net and move it into its own empty folder.
- Double-click the .jar file (or run it from a command line) and let it generate its files, then close it. Nothing is broken; it is waiting for permission.
- Open the newly created eula.txt and change eula=false to eula=true to accept Mojang's terms, then save.
- Run the server file again. This time it builds a world, which can take a couple of minutes, and finishes with a 'Done' message in the console. Your server is live.
Joining and taking control
On the same PC, open Minecraft, go to Multiplayer, choose Add Server, and enter the address localhost. You will spawn into the world your server just made. Friends on your home network can join the same way using your PC's local address. Now make yourself the operator: click into the server console window, type op followed by your Minecraft username, and press Enter. Operators can change game mode, adjust the time and weather, teleport players and use the rest of the command toolkit. While you are learning, remember the golden rule of server ownership: shut the server down by typing stop in the console, never by just closing the window, so the world saves properly.
Letting friends join from outside your home
For anyone beyond your own network, your router needs to point visitors at the server. Log into your router's settings and create a port forwarding rule for port 25565 (both TCP and UDP) aimed at your PC's local IP address. Then find your public IP by searching 'what is my IP' in a browser and give that number to your friends; they add it as the server address in the multiplayer menu. Exact router menus vary by brand, but the port and the destination PC are always the same two ingredients. If friends cannot connect, a firewall prompt on the host PC is the usual culprit, so allow Java through when Windows asks.
Worth tweaking: server.properties
The server.properties file is your control panel. In it you can set the game mode and difficulty, cap the player count, write the message players see in the server list, and turn PvP on or off. Change values, save, and restart the server to apply them. Start vanilla, learn the console, and only then think about plugins or mods; a small, stable server your friends can always reach beats an ambitious one that is forever down for repairs.
Frequently asked questions
Is it free to make a Minecraft server?
Yes. The official Java server software is a free download from Mojang, and hosting it on your own PC costs nothing beyond your normal power and internet. Paid hosting and Realms are optional conveniences, not requirements.
Why does my server close itself the first time I run it?
That is expected. The first run only generates the server's files, including eula.txt. Open that file, change eula=false to eula=true, save, and run the server again to actually start it.
What address do I use to join my own server?
Use localhost in the multiplayer menu when playing on the same PC that hosts the server. Players on your home network use the host PC's local IP, and everyone else uses your public IP once port 25565 is forwarded.
How do I shut the server down safely?
Type stop in the server console and press Enter. The server saves the world and closes cleanly. Closing the window directly risks corrupting chunks and losing recent progress.
Redstone Components in Minecraft: A Complete Guide
Respiration Enchantment in Minecraft: Breathe Longer Underwater
What Does Smite Do in Minecraft? Smite Enchantment Guide
What Do Horses Eat in Minecraft? Every Food and Its Effects
All Wolf Variants in Minecraft and Where to Find Them