EN
Add server

How to Host a Minecraft Server on Your PC

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

Step 1 Download the server software

You have two good choices:

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:

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:

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

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.