How to make a Minecraft Server

12-Nov-2022

How to make a Minecraft Server

This CodaKid tutorial will show you how to create a Minecraft Server. It also shows how to host it for free.

We provide step-by-step instructions for how to set-up Minecraft server hosting.

CodaKid is a Minecraft-centric company that lives and breathes Minecraft. We teach thousands of students every year Minecraft Modding using Java programming language. We hope you enjoy this guide!

Step 1 - Get Minecraft Java EditionStep 2- Get the Latest Version Of Java
Step 3: Download the Minecraft server
Step 4: Run the Server with Commands
Step 5: Setting up server properties
Step 6: Play Globally with Port Forward (Optional).
Step 7: Connect to your Minecraft Server
Next steps
Create your own Minecraft Mods

Step 1: Get Minecraft Java Edition

These instructions require you to have the Minecraft Java Edition. You cannot host your own custom Minecraft server if you do not own the Pocket, Console, or Windows 10 editions of Minecraft. You can purchase Minecraft Java Edition and download it here.

You can skip Step 2 if you already have Minecraft Java Edition.

Step 2: Download the latest Java Version

Installing the latest Java version is the first step to setting up a Minecraft server. Minecraft runs on Java, so we need the most recent version of Java to ensure that our server runs smoothly.

You can download the latest Java version here. Click the Java Download button, as you can see below.

Next, click the "Agree to Start Free Download" button.

The Java setup file should now be in your download folder. To locate the download folder, use the computer search bar to type "downloads" and then open the Downloads folder.

Open the JavaSetup executable file from the downloaded folder. A popup window might appear asking you if the application is allowed to make changes on your computer. Click to grant access. You may be asked for a password.

After the application loads, click to install Java.

You may be asked to remove an older Java version. This is because it does not help our server setup.

Continue to the prompts until Java has been downloaded and is up-to-date.

Now, the first step to setting up a Minecraft server is complete. Next, we need to download and set up the Minecraft server folder.

Step 3: Download the Minecraft server

Downloading the Server.jar file from Minecraft's website is the first step to downloading a Minecraft server.

Optional - If you need an older version of Minecraft, you can see a list below. Make sure you click the Server jar for the version you wish to use to ensure you have the Server.jar needed for the next step.

This link will take you to the latest version of Minecraft.

Once you are on the page, click on the Download Minecraft server Java link.

Note - You might have a different version than the one shown in this picture. This is normal as Minecraft is always being updated.

Your computer might warn you that the file may be dangerous to your computer. Any.jar file downloaded in most browsers and on computers is considered to be harmful. Simply click on Keep to confirm that this is an official Minecraft server.jar file that we can trust.

Before we run the.jar file, we need to create a folder that will contain all files. It is common to create the server directory on your desktop. Go to your desktop and right-click on an empty space. Click on New > Folder to create a new empty directory.

Once clicked, it will allow you to change the folder's name.

Now, go back to your Downloads folder and right-click on Server.jar to copy it. We will then paste it into the folder we created in the next step.

Once you have the Server.jar saved, go back to your desktop and open that server folder. Next, right-click in the empty folder to copy the.jar file.

Right click on the server file in the folder and press the open button to run it. This will create the configuration files that you will need to configure your server. They will be placed in the folder we created.

To allow our server to continue running without being shut down immediately, we must accept the EULA agreement. Open the eula.text.

This should reveal the line eula=false. This should be changed to eula=true, as shown below.

Once you have made the changes, go to File > Save to save your text document. The eula text file can be closed at any time.

Next, run the server.jar file once more to download additional folders. To launch the server, open the server.jar file.

You should see many new text documents and a server window as shown below.

Your server is now officially launched and ready for use! If they are connected to the same internet as your server, players should be able find your server game under the multiplayer tab. We have a section that covers how to run the server so friends can join your game via a different internet connection.

Before we get into playing with your friends globally, let's first cover some commands that we can use with our servers as well as some customization options.

Step 4: Run the Server with Commands

Next, we will create a batch file that we can use to launch our server. This will help to reduce lag. First, create a new text file that will be saved as a.bat file. To create a new text file, right-click in your server folder.

Once you have created the document, name it something that is easily recognizable. This will be the file that will launch our server.

Double-click the file to rename it. Then, add the text as shown below. These commands are to ensure that our server runs smoothly.

Let's take a look at what these commands do for our server. Two lines, -Xms1024M or -Xmx1024M, allow the server to have more RAM memory. This allocates a gigabyte worth of RAM memory to the server.

Server.jar and -jar execute the server jar file that we have in the same directory. Important Note: If your jar file's name is different from server.jar, make sure you have the exact file name written down.

The pause at the end allows the batch file window to remain open. This allows you to identify any problems that could be crashing your server during gameplay or at launch.

Next, save the file. To save this file, go to File > Save as. We will be changing it to an Excel batch file rather than a text document.

After you have accessed the save as menu, scroll down to the section that says save as text document and change it to all files. This allows us to change the file it will be saved under.

After selecting all files, add ".bat” to the end of each filename. Save. This will create a new version your start server file, which is now a batch.

Next, delete the old text file so that we don't get confused about which file we need. The text file should indicate that the file is a Text document.

Now, test the server and ensure it launches with the batch file. Make sure that the server starts by opening our new file. If it fails to launch the server window, ensure you have the correct jar name for the command.

After your server has launched correctly, exit the server window and the command window that launched it. Now we will customize our server further.

Step 5: Setting up server properties

Let's now look at some server properties that you can modify to make Minecraft games more your own. Open the server properties file.

You will see many text sections once you get there. Let's start with the most important and then move on to the most common properties that you will want to modify.

The most important properties to be familiar with are those highlighted in the image above. The default gamemode that you and your friends will use is the "gamemode=survival" property. This property is set to survival, which means you will have food and health that you will need to manage in the game. This gamemode is called "gamemode=creative". It allows players to build, break, fly, and be untouchable.

The next "spawn-monsters=true" is a property that tells the server monsters and dangerous enemies will appear. Changing this to "spawn-monsters=false" will stop monsters from spawning even in survival mode.

Our experience with minecraft servers has shown us that the next highlighted "pvp=true” line is one of the most important properties. PvP is player vs. play. This controls whether or not players can cause damage to each other. This default setting is true, meaning that players can damage and hurt each other in game. This setting to "pvp=false” will disable the ability for players to cause damage to each other.

The command line "enable-command-block=false" is a line that disables the use of the programming command block in the server. Setting this to "enable-command-block=true" will let the command block be used. The command block is a useful tool for teaching basic coding skills to Minecraft players. CodaKid offers helpful courses that cover the use of command blocks as well as the basics of programming Minecraft.

The line that sets the maximum number of players allowed to join the server is located below the command block line. This default value is 20. If you wish to have a smaller server, you can change it to a lower number or increase it if you are hosting many people.

The server-ip (the last highlighted property) and the level-name (the second) are the two most important properties. The server-ip is used for port forwarding, which allows you to play around the world with your friends. The level-name refers to the world in which you play on your server. It defaults to "world" because a random Minecraft world is created when creating server files. You can replace it with any map or level that you find on the internet. However, you must make sure to place the entire map file in your server directory and then change the "level_name=world" to the name of your new map.

Now we have a basic understanding about the server properties and how to customize it. Let's now do some more work to make our server fun for friends.

Step 6: Play Globally with Port Forward (Optional).

Port forwarding allows friends to connect to your server even if they aren't on the same local network. This step is not necessary if you wish to play locally on the same server. Port forwarding can pose security risks, so be sure to follow the port forwarding steps.

Port forwarding is a different process for every router. A router is what you use to establish a wireless internet connection. Follow these steps to reach your router's administrator page. We will port forward a specific port address to Minecraft. Click on the link below to find your router. Do not click on any ads and don't download any software from this website. This website does not require additional software.

Follow these steps to set up a port forwarding entry once you have reached your router page. While each router will have its own set of steps, the basic steps will be the same for most routers.
Make a static IP address

Login and navigate the section port forwarding.

Create a port forward entry

This website will detail each step for your router. When creating a port forwarding entry, make sure it is named something easily recognizable like Minecraft. The port number should be at least 25565. You can also find a helpful explanation on port forwarding for Minecraft at the port forward website.

Once everything is set up, it's time to test your Minecraft server. To test your port forwarding work, someone with a different connection must test to see if they are able to connect to your Minecraft server. Port forward has the steps to do this in the link above, but we will also provide instructions below.

Step 7: Connect to your Minecraft Server

Let's now connect to the server. To launch the server, run our batch file.

Once the server is up and running, go to your Minecraft launch page. Make sure that you load the latest version of Minecraft. At the time of writing this article, Minecraft 1.15 was the most recent version and the downloaded server. If this version becomes obsolete, I can either make a new server or load the 1.15 Minecraft version. It is a good idea for us to have a launch version Minecraft that we can connect to our server with. You can do this by going to the Installations tab, clicking the +New button.

Once you have created the installation, name it with the server and version numbers of Minecraft. Next, select the version that your server downloaded. This is the version 1.15. Make sure to change it to your Minecraft server version. To finish the installation, click Create.

Next, locate it in your list and then click Play to launch Minecraft.

After Minecraft has been launched, go to the Multiplayer tab.

Click Add Server when you are in the multiplayer tab.

After clicking on add server, go to the next page and add a server name. In the server address, enter your public IP address. This will allow other players to connect to you. This is an example address. Enter your unique public IP address. You can find this information at the link below. You might also need to enter a colon after the address. For example, 123.456.789.0 is 25565.

After this, you should be able to see the server's connection and try to connect. If you experience a failed connection, make sure to check the port forwarding settings and the IP address you entered. If you see a green connection indicator with open spots to connect, you can launch your own server and start playing!