How to Make a Minecraft Server (Java Edition)

With over 131 million active monthly players, Minecraft is home to one of the largest gaming communities of all time. And that opens up endless possibilities of unique multiplayer experiences. You and your friends can jump online to explore all the Minecraft biomes together. Or you can use this opportunity to beat the best Minecraft adventure maps. But that’s only possible if you know how to host a Minecraft server on your PC. And believe it or not, following the right set of instructions, almost every PC player can make a Minecraft server in a few easy steps. With that said, we will only focus on the Java edition in this guide. Minecraft Bedrock users can refer to their dedicated server setup guide or make an online Minecraft server for free. With that said, check out the step-by-step instructions to make a Minecraft server on Java Edition.

Host a Minecraft Java Server (2022)

Before we get started, let’s focus on what exactly is a Minecraft server and its minimum requirements. But if you are eager to go through the steps, use the table below to skip right ahead.

What is a Minecraft Server?

A Minecraft server is a customized Minecraft world where others players can join to compete, play, and spend time with each other. These servers can be owned by individuals, businesses as well as communities. If you plan on setting up an online server limited to a dozen-odd players, your PC has more than enough potential to handle it. But for commercial purposes, you need powerful dedicated machine to push the Minecraft server to its limits.

As for the server’s in-game world, it can have any type of personal customizations, ranging from texture packs to the best Minecraft skins. You can even use the best Minecraft seeds and the most amazing mods to craft an unforgettable experience for players. The online server also provides you, the host, some admin abilities. You can control almost every in-game aspect, from weather to mob spawn frequencies. But before you get overwhelmed with power, let’s see the system requirements for hosting a server.

Requirements to Host a Minecraft Server

If you are already running Minecraft 1.18 on your PC, the requirements might not seem too demanding. Based on the latest edition of the game, we recommend the following specifications for hosting a server with 4-6 players:

  • Windows 10 or 11
  • 2 GBs of RAM or more
  • A reliable internet connection with 5 MB/sec or faster internet speed
  • Enough power supply to keep the PC running as long as the server is online

Please note that usually Minecraft only transfers around 100-150 MB of data on a non-modded server per hour. Therefore, you can host it on PCs with lower specs and slower internet speeds. But that’s only the case for vanilla Minecraft worlds with low server activity. You can dive deeper into the specs by exploring the Minecraft Wiki. Alternatively, you can also ask your friends to host a server if they have better specs. But if you want to do it all by yourself, read on to learn how to make a Minecraft server.

How to Create a Minecraft Server in Java Edition

Before you get started, make sure you are running the latest version of Minecraft Java Edition. Usually, the game launcher automatically keeps updating the game if you have a reliable internet connection. With that said, let’s get started:

Update your Java Version

For a server to run smoothly, it has to run on the latest version of Java. To update Java on your PC, follow these simple steps:

1. Open the start menu by pressing the Windows key and type “Configure Java“. Once the search completes, click on the top search result and open the “Configure Java” app. If you don’t see the “Configure Java” in the search, which is unlikely, you can install the latest version from Oracle’s website using this link right here.

Make a Minecraft Server - Configure Java

2. Within the Java control panel, move to the second tab called “Update“. Then, click on the “Update Now” button at the bottom right corner. 

Update Java to make a Minecraft Sever in Windows 10

3. On the new pop-up window, click on the “Update” button.

Update Java to make a Minecraft Sever

4. The app will then ask you to remove any existing versions of Java. If you are not sure what other software uses Java on your PC, you can leave it as it is. Now, click on “Update” and then the “Install” button. The app will automatically download and install the new version of Java.

How to Make a Minecraft Server (Java Edition)

Download Minecraft Server File

Fortunately, every single version of Minecraft, including the beta updates, has its own server file. So, it’s time to visit the official Minecraft server website and download the server file by clicking on “minecraft_server.1.18.1.jar” for the latest update. The file name may vary depending upon the version of the server. Your browser might warn you about the nature of the file. If it does, click on the “Keep” button when prompted to save your file.

How to Make a Minecraft Server (Java Edition)

Set Up Commands to Run the Server

Once you have downloaded the Minecraft server file, it’s time for you to prepare it for hosting. Here’s how.

1. To get started, create a new text document by right-clicking and selecting “Text Document” from the context menu on your PC. Make sure you are doing this in the same folder as the downloaded server file.

Making a new text document

2. Then, open the new text document by double-clicking on it and type the following command in it:

java -Xmx2048M -Xms2048M -jar minecraft_server.1.18.1.jar nogui


You can leave the “nogui” part out of it if you want the graphical interface of the server.

3. The “2048” in code states the minimum (Xms) and maximum (Xmx) RAM the server can use. You can edit it as per your requirements. Just make sure the name of the file in code (before nogui) is the same as your download “.jar” file. Then, use the “save as” option and save the file with the name “start.bat” and “All Files” selected in the file type section. You need to save it in the same folder as the server file.

creating a minecraft server

4. Then, double click the start.bat file that you just saved. It will launch a command prompt windows, and within a few minutes, the server folder will have a few new files in it. Once it finishes, you qill see a EULA error.

EULA Error in Minecraft Server

v) Finally, you have to read and accept EULA guidelines to continue the process. To do so, find and open the eula.txt file in your server folder. Here, you will notice “false” written next to EULA. Replace it with “true” and save the file.

fix for EULA error in Minecraft server

Host Minecraft Server on Your Windows PC

After saving the EULA file, you need to open start.bat once more by double-clicking on it. This will start the installation process of the server file within the command prompt. It usually takes 2-4 minutes to complete depending upon your internet speed and system specs.

installing minecraft sever files

Once you reach the end of the installation process, the “pause” function that we added in the start.bat file will come into play and stop the command. You can then scroll to the top to see if there were any errors during the setup. If there are no errors, that means your Minecraft Java server is now up and running. You can type “help” and hit Enter to figure out what more in-game options you have on the server.

But do not close this command prompt window even after you are done playing. If you want to save your progress while closing the server, type “stop” in the command prompt and press enter before closing the window.

Test Your Minecraft Server

At this point, ideally, your Minecraft Java server is up and running. Now, to test your newly created Minecraft server, follow these steps:

1. Open up your Minecraft game using the launcher. It will update the game if it’s not already on the latest version. As soon as the game opens, you will find a “Multiplayer” option on the home page. Click on it.

minecraft home page

2. Next, the game automatically starts searching for local servers running on your PC. Now, even after several minutes, if you don’t see your server on the list, click the “Add Server” button at the bottom right to connect it manually.

Minecraft Multiplayer Mode

3. Here, type in any server name you want or let it be as it is. Then, in the server address, type “localhost” or “0” without the quotation marks and click on “Done” to save the server details.

How to Make a Minecraft Server (Java Edition)

3. Now, the Minecraft server you’ve created will appear in the list of available servers. You can create multiple servers and add them in the same way. Click on your server’s name and click on the “Join Server” button to launch it.

How to Make a Minecraft Server (Java Edition)

Make Yourself a Server Operator

Before you start playing on your new server, let’s give you full control over the game. To do that, simply go back to the server’s command prompt window and type “op username“. where the username is your Minecraft username. Then, press Enter to execute the command. Once it finishes processing, you will become the server operator. The position gives you control over all the Minecraft commands you can use to change the game mode, in-game settings, and a lot more.

Minecraft server operator command

Invite Friends to Join Your Minecraft Java Server

If your friends are playing on the same local network as you, they can join the game in the same manner as you did. They simply need to go to the multiplayer section and join the localhost server. Being on the same local network means using the same WiFi or LAN network to connect to the Internet. This method also gives you the lowest latency online Minecraft experience.

However, things get a little complicated when we try bringing distant online friends to the Minecraft server. But worry not, we have broken down this complicated part into easy-to-follow steps. Let’s get started.

Get your System Port Settings Ready

Starting with the basics, a System Port is the route other players take to reach your online server from Minecraft. The default port ID is “25565”, but you can change it within your server properties. So, you need to add this port ID to your router to allow players to join your Minecraft server.

Setup Router Homepage

But even though it sounds easy, every router manufacturer has a unique method with a different option name to open up the system port. We won’t be able to cover all of them here. Fortunately, you can use to find your way around the QoP or Port Forwarding settings. They have covered almost every major WiFi router in the market.

Enter Basic Server Details

On your router’s port settings page, all you need to do is click on “add service” or “create new” or a similarly named button. Then, you have to have to enter the details for different network-related information.

Minecraft Port Forwarding

The format and the positioning might change, but the field names should be more or less the same. You may leave the optional ones as it is if you’re not sure. For the rest of the fields, use the following information.

  • Server/Service/Port Name: Minecraft Server
  • Start Port: 25565
  • End Port: 25565
  • Service Type: TCP/UDP

The start and end port might also have maximum or minimum ranges. You can enter the same value: 25565 in all those fields.

Enter your Server IP Address & IPv6 Addresses

Your server IP address is the same as the IPv4 address of your PC. To find that and the IPv6 address, follow these steps.

1. Open Command Prompt by searching for “cmd” in the Start menu and click to open it. Alternatively, you can use the Win + R keyboard shortcut to open the Run prompt and type cmd to open it.

Command Prompt in start menu

2. Then, type “ipconfig /all” in the Command prompt and press enter. The command will list your IPv4 address and IPv6 address on the screen. Enter the same in the Server IP Address segment of the Port Forwarding settings. What we just did will create a new public IP address for your system and your friends can use it to join your server without exposing any confidential details.

How to Make a Minecraft Server (Java Edition)

Find and Share Your Public IP Address

You can relax now. The hard part of the tutorial is over. Now, you need to load Google and search for “what is my IP“. The search results will display your public IP address, and it is the IP address you need to share with your friends to enable them to join your server.

Public IP address on Google

Now, you need to copy (select and ctrl+C) the public IP address and send it to your friends. They need to write it in the place of localhost when adding a new multiplayer server as we did earlier in this tutorial. With that, you and your friends can finally play Minecraft together on your own server.

Errors While Making a Minecraft Server

Understanding how to make a Minecraft server is a monumental task in itself. It gets even more complex if there are some random errors in the process. Fortunately, I also experienced the majority of those errors and have found some quick solutions for all of them. Hopefully, your server-making journey will be smoother than mine.

JNI Errors

The first error that you may encounter is while opening the server.jar file that we downloaded from the official website. Another version of this error can meet you when the command prompt fails to start the server. Luckily, the solution to most JNI errors is updating Java. If the automatic update isn’t working for you, you can manually update the Java by downloading it from this link.

How to Make a Minecraft Server (Java Edition)

EULA Error

Technically, the EULA error is not an error as Minecraft included it intentionally. But still, you’re bound to face it while opening the server.jar file for the first time. The fix is quite straightforward. You need to open the eula.txt file in your Server folder and accept the EULA agreement by replacing a “false” with “true”. Just like we did earlier.

EULA error minecraft

Stuck at Scanning for Games in Minecraft

Due to either your Internet or some other reasons, you can get stuck at finding Minecraft Servers while in the multiplayer window. The scanning goes on for a long time with no results.

Loading screen Minecraft multiplayer

For most people, waiting it out works fine. But if you are sick of waiting, you can use the “add server” button to manually load the server using its server address. Restarting the game is another quick fix for this situation.

Failed to Login: Invalid Session

Failed Login error minecraft multiplayer

It is a common Minecraft error that can appear for you and even your friends. It indicates that Minecraft is unable to recognize your username and register it in the server you are trying to enter. The devs suggests restarting the game to fix the error. That can work for a few people, but the better fix is logging out of Minecraft. When you log back into the game, it is sure to register the username while your server is running. Therefore, the invalid session will turn valid.

Firewall or Connectivity Errors

Finally, the king of all Minecraft server errors are the basic connection errors. All of them stem from firewall and antivirus settings, as the firewall automatically blocks people from joining the Minecraft server sometimes. To avoid such an error, you need to make an exception for your Minecraft server in your firewall. Here’s how:

1. First, open your “Windows Defender Firewall” by searching for it in the start menu. Click to open it.

Windows Firewall in Start menu

2. Then, click on the Inbound Rules section in the left panel and select the “New rule” option on the right. Please note that you will have to repeat the same steps with Outbound Rules as well to complete the process from this point onwards.

Inbound and Outbound rules in Windows Firewall

3. On the new rule window, select the Port option and click “Next“.

Port Rule selection for Firewall Exception

4. N ow, you can select either TCP or UDP because you will have to repeat this rule creation process with the other option too. Then, in the specific port column, enter your server port ID, which by default will be 25565. Continue the process by clicking next. 

protocol selection in firewall exception

5. Then, the app will ask the conditions under which it should allow a connection. Here, you need to select the option that says “Allow the Connection” and continue.

Firewall Setup for Minecraft

6. Finally, you have to choose when the connections are allowed. So, simply select all the given options and click “Next”. You can then give the firewall rule a name and save it.

Firewall Rules Setup for Minecraft

Saving the rule creates an exception for people connecting to your Minecraft server port through your firewall. But first, you need to repeat the process first from step 4, depending upon which option you chose – either TCP or UDP. You need to make a new rule with the other one selected. Finally, you need to make the same two rules in the Outbound Rules section as well. The entire process remains identical.

Start Your Online Minecraft Server with Friends

With that, your long and tiring journey of creating a Minecraft server has come to a close. It’s time for you to relax, and for that, these best 1.18 mountain seeds might give you the best spot. But if you are not ready to stop yet, you can start exploring the best Minecraft modpacks. Many of them hold the potential to take your servers to the next level. Alternatively, there is also an option to use one of the best Minecraft house ideas to build structures from scratch in your first server. However you choose to go about it, our team is ready to help you with all your need for your server. If you face any errors, you can head to our error section or simply reach out through the comments. Someone from our team will be there to help. With that said, it’s now your turn to create your Minecraft Java server right away.

comment Comments 0
Leave a Reply