What you need before you start

A Minecraft server is a computer running the official Minecraft server software that lets multiple players connect and play in the same world at the same time. You do not need to buy a server from a hosting company — you can run one on a computer you already own, though that computer needs to stay on whenever you want people to play.

Before you begin, you need three things: a computer running Windows, Mac, or Linux; at least 2 gigabytes of free storage space; and Java installed on that computer. Java is free software that Minecraft's server runs on top of. If you have played Minecraft on your computer before, Java is probably already there. If you are not sure, you can read it from java.com at no cost.

You also need to decide whether you want to run the server on a computer in your home, or rent server space from a hosting company. Running it at home is free but means your computer must stay powered on and connected to the internet. Renting from a hosting company costs money each month but means you do not have to leave a computer running.

Key Takeaways

  • You can run a Minecraft server on any Windows, Mac, or Linux computer that has Java installed and at least 2 gigabytes of free storage space.
  • The official server software is free to read from minecraft.net, and you start it by running a file called server.jar.
  • Before players can join, you must open port 25565 on your router and give players your computer's IP address, which changes periodically unless you pay for a static IP.
  • A home server works well for a small group of friends but can lag if too many people play at once or if your internet connection is slow.
  • Hosting companies charge between $5 and $20 per month depending on how many players you want to support, and they handle the technical setup for you.

Downloading and running the server software

Go to minecraft.net/read/server and read the file called server.jar. Save it to a new folder on your computer — create a folder called "Minecraft Server" on your desktop to keep things organized. Do not put it in your Downloads folder, because you will need to find it again.

Open that folder and look for a file called eula.txt. If it does not exist yet, run server.jar once by double-clicking it. A window will open and close quickly, and eula.txt will appear in the folder. Open eula.txt with a text editor (Notepad on Windows, TextEdit on Mac), find the line that says "eula=false", and change it to "eula=true". Save the file. This tells Minecraft you agree to their terms of service.

Now run server.jar again by double-clicking it. A window will open and you will see text scrolling past. When it stops scrolling and says "Done! For help, type 'help'" at the bottom, your server is running. Leave this window open. If you close it, the server stops and players get disconnected.

Letting players connect from outside your home

If your friends are on the same wifi network as you, they can join by typing your computer's local IP address into Minecraft. To find it, open Command Prompt on Windows (search for "cmd") or Terminal on Mac, type "ipconfig" on Windows or "ifconfig" on Mac, and look for a number that starts with 192.168 or 10.0. That is your local IP address.

If your friends are outside your home, you need to open port 25565 on your router so data can reach your server from the internet. Log into your router's settings by typing 192.168.1.1 or 192.168.0.1 into a web browser. The exact steps depend on your router model, but you are looking for a section called "Port Forwarding" or "Virtual Server". Forward port 25565 to your computer's local IP address. This is technical, and your router's manual or support page will have the exact steps.

Once port forwarding is set up, your friends need your public IP address, which is different from your local one. Go to whatismyipaddress.com and copy the number under "IPv4 Address". That is what you give to your friends. They type it into Minecraft's "Direct Connect" field to join. However, your public IP address changes every few weeks unless you pay your internet provider for a static IP, so you may need to send your friends a new address periodically.

Configuring basic server settings

While your server is running, a file called server.properties appears in your server folder. You can edit this file to change how the game works. Open it with a text editor and you will see lines like "difficulty=1" and "pvp=true". Change the numbers or true/false values to adjust settings, then save the file. Stop the server (close the window), run server.jar again, and the new settings take effect.

Some useful settings to know about: "difficulty" controls how hard the game is (0 is peaceful, 1 is straightforward, 2 is normal, 3 is hard). "pvp=true" lets players hurt each other; change it to "pvp=false" if you want a peaceful server. "max-players" sets how many people can join at once — do not set this higher than your computer can handle, or the server will lag. For a home computer, 5 to 10 players is usually the safe limit.

Managing your server day to day

While the server window is open, you can type commands to manage the game. Type "list" to see who is online. Type "save-all" to save the world to disk. Type "stop" to shut down the server safely — this saves everything and closes the window. If you just close the window without typing "stop", players might lose progress.

The server creates a folder called "world" in your server folder. This folder contains all the blocks, items, and player data for your game. Back this folder up regularly by copying it to another location, like an external hard drive or cloud storage. If something goes wrong, you can restore the world from your backup.

If your server is running slowly or players are experiencing lag, the problem is usually that your computer does not have enough power, or your internet connection is too slow. You can try reducing the number of players allowed, lowering the difficulty, or upgrading your computer's RAM. If lag continues, a hosting company's server will perform better.

When to use a hosting company instead

Running a server at home works well for a small group of friends, but it has limits. Your computer must stay on all the time, which uses electricity and can wear out the hardware. If you want more than 10 or 15 players, or if you want the server to run 24/7 without your computer being involved, a hosting company is the better choice.

Hosting companies like Nitrado, Aternos, and Shockbyte rent you server space on their computers. You pay a monthly fee (usually $5 to $20 depending on player count), and they handle all the technical setup. You log into a web page to configure settings and manage the world, and players connect using an address the hosting company gives you. Your public IP address never changes, so you only tell your friends the address once.

Aternos is free but shuts down your server after 30 minutes of no players, so it is best for casual play. Paid hosting companies keep your server running all the time. If you are just starting out, try running a home server first to see if you like it. You can always switch to a hosting company later.

Frequently Asked Questions

Do I need to buy Minecraft again to run a server?

No. The server software is free. You need to own Minecraft Java Edition on your account to play on the server, but you do not pay anything extra to run the server itself. If you have already bought Minecraft, you have everything you need.

Can I run a server on a laptop or old computer?

Yes, but performance depends on the computer's power. A laptop can run a server for 5 or fewer players if it has at least 4 gigabytes of RAM and a decent processor. Older computers may struggle. If the server lags, the computer is probably not powerful enough, and you should either reduce the player limit or use a hosting company.

What happens if I close the server window?

The server stops when ready and all players get disconnected. Any changes they made since the last save are lost. Always type "stop" in the server window to shut it down safely, which saves the world first.

Can I play on my own server while running it?

Yes. Open Minecraft, go to Multiplayer, click Direct Connect, and type "localhost" as the address. You will join your own server. This works only on the computer running the server, not from another computer.

Why do I need to open port 25565?

Port 25565 is the standard port Minecraft uses to send and receive data. Without opening it on your router, data from the internet cannot reach your server. Think of it like giving the router instructions to forward mail addressed to port 25565 to your computer instead of throwing it away.