You know that feeling when you and your friends all want to play Minecraft together, but no one knows how to actually make it happen?
Maybe you’ve tried joining random public servers, or someone mentioned “port forwarding” and you immediately tuned out.
Good news: you don’t need to be a tech wizard to host your own Minecraft server for free.
All you need is your computer, a few free tools, and this guide.
Hosting a Minecraft server on your PC is perfect if you want a bit of technical challenge, want to learn how things work, or just want a private world that’s 100% yours.
In this step-by-step guide, you’ll learn how to set up your own Minecraft server safely, invite friends to join from anywhere, and keep things running smoothly — all without needing advanced skills or paid hosting.
Let’s get started.
Minecraft Server Requirements
Before jumping into server setup, there are a few important things you need to prepare. You should keep in mind that the performance of your Minecraft server depends on your computer's hardware, the software you use, and how well you understand basic network setup.
Minimum System Requirements

Hosting a Minecraft server can be demanding, especially if you decide to play on the same computer. At the very least, here are some basic Minecraft server requirements you need:
- CPU: Any modern CPU (Intel i5 8th-gen or newer / Ryzen 3 3000+). Most modern CPUs should suffice for small to medium servers.
- RAM: Allocate at least 4GB of RAM for things to run smoothly. But 8GB RAM is recommended if you'll also be playing on the same device.
- Storage: Reserve at least 10GB of disk space, as your world will grow over time.
- Network Connection: Ensure you're connected directly to your router via a wired LAN connection instead of Wi-Fi. This provides a stable and faster connection.
Software You'll Need

Minecraft servers also require software to run, more specifically, the Java Runtime Environment (JRE). If you download and install the Java Development Kit (JDK), you'll also get the JRE included.
Other than that, you'll just need to download the actual Minecraft server .jar file.
Basic Network Knowledge

You don't need to be an IT expert, just know the basics:
- Local vs. Public IP: Local is for your own network; public is what your friends will use to join.
- Port Forwarding: You'll need to open port 25565 (TCP) on your router.
- Firewall Settings: This allows your server to come through, so connections aren't blocked.
Step 1: Download the Official Minecraft Server File
Firstly, you need to head to the official Minecraft: Java Edition Server download page. You can find links to the wiki article guide for a more extensive tutorial and the download link for the actual Minecraft server.

Once you click on the download link for the server, this will automatically download the file onto your device. You can then navigate to the file on your PC's File Explorer in the Downloads folder. It's named "server.jar".

You can opt to move the file to another folder that's easier for you to find if you don't prefer it to stay within your Downloads folder.

Installing Java (Skip this if you already have Java)
Next, you can go to your folder's address bar and type in "cmd" and hit Enter.

This will open up the Command Prompt in the current folder. We'll be ensuring that Java is installed since you plan to run a Minecraft: Java Edition server.

With Command Prompt open, type in java -version and hit Enter on your keyboard. You might not find that you have Java installed, but that's not a problem since Java is easy to install.

To install Java on your device, copy and paste the command below into Command Prompt:
winget install Microsoft.OpenJDK.21
This uses the Windows Package Manager to install Java, which is Microsoft's version of the Java Development Kit, with version 21 being the latest version.

Once you've typed Y, Java will download and install on your device. After the download, Java should be successfully installed on your device, and you can now close Command Prompt.

Going back to the File Explorer, rerun the Command Prompt and check the successful installation of Java by running java -version again.

Step 2: Install and Launch the Minecraft Server on Your PC
With your files ready, it's time to get your server up and running. In this step, you'll install and launch the server for the first time.
2.1 Accepting the EULA Agreement to Start the Server
On the same opened Command Prompt, type the command java -jar server.jar --nogui , then hit Enter.

You'll find a huge wall of text that you might not understand. But when you scroll to the end, you should find an error message line that states, "You need to agree to the EULA in order to run the server."

To agree to the EULA, minimize the Command Prompt. In your folder with the Minecraft server, you'll find additional files that have been generated.

One of the files is labeled as EULA.txt. Open this file with Notepad so you can change the settings.

In the opened text file, you should find a property that says eula=false which you must change to eula=true .

Changing this signifies that you've read and understood the End User Agreement. Save the edits you've made to the text file and close it.

2.2 Running the Server for the First Time
Back on the Command Prompt window you've minimized earlier, type in the command java -jar server.jar and hit Enter.

A Windows Security message will then appear. Simply click Allow and you'll have your Minecraft server ready for launch.


You can then close your server and the Command Prompt for the meantime.
While you have learned how to set up and run your server, you might find it inconvenient to launch your server on the Command Prompt every time and to change your server's settings.
2.3 Creating a Batch File
Next, we'll be making a Batch File. This type of file simplifies your server's launch. You'll only have to click on one file, and it will automatically start your Minecraft server.
To continue, in the same directory, click on the View menu. It will display the Show option, and you can enable the File Name Extensions option so you can edit the file name extension later on.

After enabling that, Right-click on any space in the folder to open up a string of options, and you'll see an option for New .

Hover your mouse over that, and you'll see an option to Add a new Text Document . The Text Document will become a new file added to the folder.

While the file name is highlighted, replace the Text Document's name with start.bat which changes the file into a Batch File. Then hit Enter.

Yes.2.4 Editing the start.bat file
Go back to the start.bat file, Right-click on it, and select Edit with Notepad. The file will open in Notepad, then you can copy and paste the following code:
@ECHO OFF
java -Xms2G -Xmx4G -jar server.jar
PauseThis code will make the Command Prompt Window cleaner, launch the server, and indicate the minimum and maximum amount of RAM distributed.

You can check how much RAM you can allocate by opening the Task Manager on your device. Go to the Performance tab and check the Memory indicator. It shows how much RAM you're using at the moment and the total amount of RAM you have on your device.

-Xms2G -Xmx8G indicate the minimum and maximum amount of RAM you decide to allocate for your server.In terms of the Pause line, this prevents the Command Prompt window from closing if the server crashes. It's certainly helpful when you want to check out read server error messages.
After entering the code block above, save the Batch File and close it.
Step 3: Configure Your Minecraft Server Settings
It's time to fine-tune the settings according to how you want to play.
3.1 Updating your server.properties file
Click the server.properties file and open it with Notepad.

You'll find all the different settings of your server such as difficulty, gamemode, allow-flight, and more. The rest of the settings can be found on the Minecraft Wiki Server Properties page. The example below changes the gamemode to creative.

As you've edited your settings to your liking, just save the file and close it to apply the settings.
3.2 Starting the Server, Operator Permissions, and Whitelisting
As you've set up the Batch File, just double-click to launch your server.

This is where you need to make yourself an Operator to have permissions to run commands within the Minecraft server.
Go to the right-hand area of the server window and type in the text field below /op [your in-game username] to give yourself or another player Operator access, and hit Enter.

A message should pop up that you're now a server operator.

Similarly, you can whitelist players you allow to join by typing in /whitelist add [player name] in the same text field.

3.3 Joining your Minecraft Server on the Local Network
After that, you can now connect to your server from the same computer it's running on.
Once you launch the Minecraft game itself, select Multiplayer, then Direct Connection.

Type in localhost in the Server Address field, and you'll be able to join your server.

You can now enter your Minecraft server directly.

To connect from another computer on the same network, go back to the File Explorer and open up Command Prompt once again.
Type in ipconfig and press Enter.

You'll need to find and take note of the IPv4 Address which is your computer's IP address on your local network.

Following that, go back to a blank Notepad file to paste your IPv4 Address.

From there, you'll have to append the Port Number. You can find this in the server.properties file.

With both the IPv4 Address and the Port Number, you'll be combining these into one address separated by a colon.

Copy the entire server address, and you can share it with your friends who are on the same network as you to play Minecraft.
Players on the same network can then launch Minecraft, click on Direct Connection, and add the Server Address you've just made earlier with both the IP Address and Port Number.

Now, your friends on the local network can join you.

Step 4: Enable Port Forwarding for Multiplayer Access
Playing locally is fun, but if your friends live miles away, you'll need to set up Port Forwarding so they can join your Minecraft server online.
4.1 Logging onto your Router
Head back to the Command Prompt and type in ipconfig and press Enter.

You'll find a default gateway property with an IP address which is your router's IP Address. Copy the address and close the Command Prompt.

Then, you'll navigate to your browser and in the address field, and paste it in. Once that's done, press Enter. You'll find yourself on your router's login page. Log in to your router with your username and password details.

After signing in, you need to find your WAN IP Address. It's the IP Address your internet provider assigns or your external IP Address. Copy the value of your WAN IP Address. This example below references Kevin Stratvert's video guide on setting up your Minecraft server and navigating the WAN IP.

4.2 Updating your Router's Port Forwarding Settings
Moving on, you can head to your router's settings. Find a setting on Port Forwarding.

This opens up a specific port on your router, which allows friends or external players to connect to your Minecraft server by directing their traffic to your computer. Without it, no one would be able to connect to your server.
You can also give your port a name, but we'll use the default port provided by Minecraft, which is 25565 , and place that on the WAN Port field. On the next line, set the setting to Any. Continue by indicating the Forward IP Address using the address you took earlier from the ipconfig. Then add the Forward Port value. After that, set the Protocol to TCP/UDP.

Finally, you can click Add Entry. You should be able to confirm that your Port Forwarding is now enabled.

Step 5: Connect to the Minecraft Server
For someone to join your Minecraft server, they'll need to enter your WAN IP Address, followed by a colon and the port number. To test it out, go to Minecraft, click Multiplayer, and then add on the Server Address field the completed WAN IP Address.

With that, it should now work like a typical externally hosted Minecraft server address, and you can start playing.

Step 6: Optimize Your Minecraft Server Performance and Security
With your server finally up and running, the final step is to fine-tune it for the best performance your PC can handle. You can also keep your world safe and troubleshoot problems that might come up.
Performance Tweaks
- Allocate RAM wisely: Use
-Xms1G -Xmx2Gto set how much memory the server uses. Too little causes lag; too much slows things down. - Reduce load: Lower the
simulation,view-distance, orentitycounts on theserver.propertiesfile when you notice lag. - Use optimized builds: Consider server loaders when creating a server, such as Paper, Spigot, or Forge, for better performance. You'll also be able to add mods with these builds.
World Backups
- Automate it: Schedule tasks or scripts to copy your world folder regularly. Skim through this guide on the Minecraft Wiki to learn about backing up your personally created server.
- Keep old versions: Store older versions of backups in case the latest one breaks.
- Stop the server before backing up: Always stop your server first to avoid it from being corrupted.
Troubleshooting
- Crashes: Check your Java version, mods, and start-up files if they're correct and updated.
- Connection issues: Ensure port 25565 is open and allowed through firewalls.
- IP Changes: Frequently check if your external IP address has been updated, or consider using a static local IP and dynamic DNS for easier connections.
WiseHosting – The Best Minecraft Hosting Alternative to Self-Hosting
While setting up a Minecraft server on your PC may be fun and rewarding, it isn't for everyone. Not everybody has good hardware, networking know-how, or the time to set up their own server.

That's where WiseHosting, created by Shulkercraft (2.3M+ YouTube subscribers), comes in as a reliable hosting provider, exclusively built for Minecraft server hosting.
Subscribing to a web hosting plan from providers like WiseHosting takes all the technical weight off your shoulders. You don't need to worry about port forwarding, router configurations, or keeping your PC running.
Setup A Server in 2 Minutes

With WiseHosting, you can easily launch your Minecraft server in under a few minutes. You don't even need to mess around with router settings or complex setup steps. Everything's handled through WiseHosting's Game Panel, so you can jump right into playing.
Performance You Can Rely On
WiseHosting servers run on powerful and optimized hardware built for Minecraft. You're ensured low latency, high TPS, and smooth gameplay.
- Powerful CPUs: Get smooth gameplay and quick server startup through quality Ryzen processors
- NVMe SSD storage: Chunks load faster, and it's easy to save your progress with the fast-running NVMe drives
- Pre-installed Server Software: Planning to run mods? You can easily switch between server software while still getting great performance.
- Global locations: Connect with your friends from all around the world with server locations across North America, Europe, and Asia.
Get 24/7 support from professional server admins
Every member of the WiseHosting support team knowns ins and outs of running Minecraft servers, they’re not generic “tech agents” or "gaming enthusiasts". So when you need help with plugins, modpacks, or performance tuning, you’re talking to someone who actually runs servers themselves.
Easy Installation of Mods, Plugins, and Presets

When you want to spice up your server, WiseHosting offers one-click installations for modpacks, plugins, and add-ons.
- One-Click Modpack: Instantly install Forge, Fabric, Spigot, and Paper-type servers without manual setup
- Automatic Presets: Easily add, remove, or update your plugins directly from WiseHosting's control panel
- Experiment Freely: Test new mods and configurations safely with automatic backups and resets if things go wrong
Final Words
Setting up your own Minecraft server on your PC takes a lot of patience and a bit of tech know-how. However, it's one of the most rewarding ways to experience the game. You get full control of the gameplay, world settings, and you get your server for free.
If you'd rather skip the technical setup and jump straight into adventuring, building, and exploring, hosting platforms like WiseHosting are always a great alternative. Whether you build your server or let a hosting provider handle it, the best part of the experience is the same: creating your world, your rules, your way.
Renee A.