Nov 15, 2026
To host a Minecraft server on your PC, download the server jar from the official Minecraft website or Paper, install Java, start it with a short command, accept the EULA and start it again. Friends on the same Wi-Fi join with your local IP address. Friends elsewhere need port 25565 forwarded on your router or a tunnelling service. The whole setup takes about 15 minutes.
What you need
- A computer with Windows, macOS or Linux and at least 4 GB of RAM to spare for the server.
- Java. Minecraft 1.20.5 and newer need Java 21, and the newest releases may need a newer version still. The server says so in its console if your Java is too old.
- A stable internet connection with decent upload speed if friends from outside your home will join.
- Minecraft Java Edition to test the server yourself.
Step 1 Download the server software
You have two good choices:
- Vanilla. The official server file, server.jar, from the Minecraft website, on the page Download Minecraft Server. No changes to the game.
- Paper. A faster version of the server that supports plugins, from papermc.io. It is the usual choice for servers with more than a few players.
Download the file for the same version your friends play. For modded servers, see our guide on modded servers, the setup differs.
Step 2 Install Java
Download a current Java version, for example the free Eclipse Temurin build from adoptium.net, and install it. Then open a terminal, called Command Prompt on Windows, and type:
java -version
If it shows the version number, Java is ready.
Step 3 Create a folder and a start script
Create an empty folder, for example MinecraftServer, and move the jar into it. Then create a start script in the same folder.
On Windows, create a text file, paste these two lines and save it as start.bat:
java -Xms2G -Xmx4G -jar server.jar nogui
pause
On macOS and Linux, create start.sh with the same java line, and make it runnable with chmod +x start.sh.
The value after -Xmx is the maximum memory for the server, here 4 GB. Change the file name if your jar is called differently, for example paper.jar.
Step 4 Accept the EULA
Double click start.bat, or run ./start.sh. The server stops almost immediately and creates several files. Open eula.txt, read the Minecraft EULA linked inside, and change the last line to:
eula=true
Start the script again. This time the server generates the world. When the console shows Done, the server is running.
Step 5 Adjust server.properties
Stop the server with the stop command and open server.properties in a text editor. The most useful lines are:
motdis the description players see in their server list.max-playersis the player limit.difficultyandgamemodeset the default difficulty and mode.online-mode=truechecks that players own the game. Keep it on.white-list=truelets only players you add join. Recommended for a private server.view-distanceandsimulation-distanceaffect performance. Lower values reduce lag.server-portis 25565 by default.
The commands to manage players, such as whitelist add and op, are in our list of Minecraft commands.
Step 6 Join your own server
In Minecraft, open Multiplayer, then Add Server, and enter localhost as the address. You join the server running on your own PC.
Friends on the same network use your local IP address. On Windows, type ipconfig in Command Prompt and look for IPv4 Address, which usually starts with 192.168. On macOS you find it in the network settings. When Windows asks whether Java may communicate on networks, allow private networks.
Step 7 Let friends from outside join
For players outside your home, you have two options:
- Port forwarding. In your router settings you forward TCP port 25565 to your PC's local IP. Friends then join with your public IP address. This exposes your public IP, so keep the whitelist on.
- A tunnel. A free service such as playit.gg gives your server a public address without opening a port. It also works when your internet provider does not give you a public IP.
Bedrock players
For a pure Bedrock server, download Bedrock Dedicated Server from the Minecraft website. It runs on Windows and Ubuntu and uses UDP port 19132. If your friends play both editions, keep the Java server and add Geyser, as described in our guide to Minecraft crossplay.
Keeping it running
- Back up the world folder. Run
save-allfirst, or copy the folder while the server is stopped. - Update carefully. Back up before switching to a new Minecraft version.
- Keep the PC awake. Turn off sleep mode while friends play, because the server stops when the computer sleeps.
When a host is easier
If the server should be online while your PC is off, or you do not want to touch router settings, rent a small server. You upload the same world and play on an address that works anywhere. Our guide how to choose Minecraft server hosting explains what to look for, and free options are compared in free Minecraft server hosting.
Frequently asked questions
Is it free to host a Minecraft server on my PC?
Yes. The server software and Java are free. You only pay for the electricity and use your own internet connection.
How many players can my PC handle?
For a few friends almost any recent PC is enough with 2 to 4 GB for the server. With more players, plugins or mods, the processor speed and upload speed become the limit sooner than RAM.
Can I play on the same PC that runs the server?
Yes. Make sure the computer has enough memory for both the game and the server, for example 4 GB for the server and the rest for the game and the system.
Is it safe?
It is safe enough if you keep online-mode and the whitelist on, give operator rights only to people you trust and keep the server updated. A tunnel keeps your home IP address private.
When your server is ready for more people, add it to MineList so players can find it.