What you need before you start

A Minecraft server on your PC lets you host a world that other players can join over the internet or your local network. You will need a Windows or Mac computer that stays on while people are playing, a copy of Minecraft Java Edition (not the Windows 10/11 Edition or Bedrock), and enough internet bandwidth to handle the number of players you want. Most home connections can handle 4 to 8 players without lag, but this depends on your upload speed — you can check yours at speedtest.net.

You also need to decide whether you want to run the server software on your own machine (which uses your computer's resources while people play) or rent space on a hosting company's server (which costs money but keeps your PC free). This guide covers running it yourself. If you rent instead, the hosting company provides the software and you just upload your world files.

Key Takeaways

  • You need Minecraft Java Edition, the free server software from Minecraft.net, and Java installed on your computer to run a server yourself.
  • The server software creates a new world by default, but you can replace it with an existing world folder from single-player mode.
  • Port forwarding in your router tells the internet where to send player connections, and you will need your router's admin password to set it up.
  • Your server's address is your public IP address plus the port number (like 192.168.1.5:25565), which you share with players who want to join.
  • The server runs in a command window on your PC and uses RAM and CPU while active, so a dedicated older computer works better than your main gaming machine.

read and install the server software

Go to minecraft.net/read/server and read the server.jar file. This is the official Minecraft server software, and it is free. Save it to a new folder on your computer — something like C:\MinecraftServer or /Users/YourName/MinecraftServer on Mac.

Before you run the server, you need Java installed. Most computers have it, but if you do not, read the latest version from java.com. On Windows, the installer will add Java to your system automatically. On Mac, you may need to open Terminal and run the installer from there.

Open the folder where you saved server.jar. On Windows, right-click in the empty space and select "Open PowerShell window here" (or "Command Prompt" on older Windows). On Mac, open Terminal and type cd /Users/YourName/MinecraftServer (replace YourName with your actual username), then press Enter.

Run the server for the first time

In the command window, type java -Xmx1024M -Xms1024M -jar server.jar nogui and press Enter. This starts the server and tells Java to use 1024 megabytes of RAM. If you have more than 4 gigabytes of RAM on your computer and want more players, you can change 1024 to 2048 or higher, but do not use more than half your computer's total RAM.

The server will run for a few seconds, then stop and create several new files in your folder, including eula.txt. Open eula.txt in Notepad (Windows) or TextEdit (Mac), find the line that says eula=false, and change it to eula=true. This confirms you agree to Minecraft's End User License Agreement. Save the file and close it.

Run the same command again: java -Xmx1024M -Xms1024M -jar server.jar nogui. This time the server will stay running and you will see messages like "Done! For help, type 'help'" in the command window. Your server is now live, but only you can join it yet because it is not accessible from outside your network.

Set up port forwarding in your router

Port forwarding tells your router to send incoming player connections to your computer. Open a web browser and go to 192.168.1.1 or 192.168.0.1 — one of these is usually your router's address. Log in with your router's admin username and password (check the sticker on the back of the router if you have not changed it).

Look for a section called "Port Forwarding", "Virtual Server", or "UPnP" in the router settings. The exact location varies by router brand. You will need to enter your computer's local IP address (find this by opening Command Prompt on Windows and typing ipconfig, then looking for "IPv4 Address"; on Mac, open System Preferences > Network and look at the IP address shown). Set the external port and internal port both to 25565, which is Minecraft's default port.

Save the settings and wait a few minutes for the router to explore them. If your router does not have a port forwarding menu, look for "UPnP" settings and enable them instead — this lets Minecraft handle port forwarding automatically, though it is less reliable.

Find your public IP address and share it with players

Your public IP address is how other players find your server on the internet. Go to whatismyipaddress.com or google "what is my IP" and write down the number you see. This is your public IP address.

Players join your server by opening Minecraft, clicking "Multiplayer", then "Add Server". They enter your public IP address followed by a colon and the port number — for example, 203.0.113.45:25565. They give the server a name (like "My Friend's World") and click "Done". When they click the server in their list, they will join your world.

Your public IP address can change if your internet provider assigns you a new one, which usually happens when you restart your modem. If players cannot connect after a restart, ask them to check the address again. To avoid this, you can set up a dynamic DNS service (like No-IP or DynDNS) that gives your server a permanent web address, but this is optional for small groups.

Load an existing world or customize your server

By default, the server creates a new world called "world". If you want to use a world you already built in single-player mode, find your world folder. On Windows, go to %appdata%\.minecraft\saves and find the folder with your world's name. On Mac, go to Library > process Support > minecraft > saves. Copy the entire folder.

Stop your server by typing stop in the command window and waiting for it to shut down. Delete the "world" folder in your server directory, then paste your world folder there and rename it to "world". Start the server again with the same command as before.

You can also edit server.properties in your server folder to change settings like difficulty, whether players can break blocks, and the spawn point. Open it in Notepad or TextEdit, change any values you want, save it, and restart the server for changes to take effect.

Keep your server running and manage player access

Your server runs in the command window and will stop if you close it or restart your computer. To keep it running all the time, you can use a batch file (Windows) or shell script (Mac) that starts the server automatically when your computer boots up. For most small groups, restarting the server when you want to play is simpler.

You can manage players by typing commands in the server window. Type op YourUsername to give yourself admin powers, then use commands like /ban PlayerName to ban someone or /kick PlayerName to remove them when ready. Type help to see all available commands.

If your server gets slow or crashes, it usually means you are running out of RAM or your computer's processor is overloaded. Close other programs while the server is running, or increase the RAM amount in the startup command (change 1024M to 2048M or higher). If problems continue, consider renting server space instead.

Frequently Asked Questions

Can I run a server on a Mac?

Yes. read server.jar the same way and run it from Terminal instead of PowerShell. The commands are identical. Mac servers work just as well as Windows servers, though older Macs with less RAM may struggle with more than 4 players.

What if players say they cannot connect?

First, make sure your server is running (you should see messages in the command window). Then check that port forwarding is set up correctly in your router — go back to the router settings and confirm the port 25565 is forwarded to your computer's local IP address. If the address is correct and port forwarding is on, restart your router and try again.

Do I need to keep my computer on all the time?

Only while players are online. If you turn off your computer, the server stops and players get disconnected. Many people run servers only during certain hours or days. If you want a server that runs 24/7, renting from a hosting company is more practical.

Can I use Minecraft Bedrock Edition instead of Java Edition?

No. Bedrock Edition (Windows 10/11, console, mobile) uses a different server system. You must use Minecraft Java Edition to run your own server. If you only own Bedrock, you will need to buy Java Edition separately.

What happens if my internet goes down?

Players will be disconnected when ready and cannot rejoin until your internet is back up. Your world is saved on your computer, so no progress is lost — players just have to wait for you to come back online.