How to create a Minecraft server [on Windows and Linux]

Minecraft is the most popular video game in the world, available for many platforms, not only computer but also mobile, on Android and iOS. The possibility of exploring an infinite world and shaping it to your liking has always aroused the interest of young and old, who see in this game a sort of Lego world in which everything is possible, from building a village, a city, to to complete the game by killing the final boss, a giant dragon!

In order to play together with other players, whether they are friends or strangers from the other side of the world, you need to use a server. In this article, we will see how to create one step-by-step.

Content of the article

  • Before starting
  • How to make a minecraft server from home
    • Hardware requirements
    • Create a minecraft server on Windows
    • Create a Mincraft server on Ubuntu Server
    • Port forwarding on Windows and Linux
    • Backup
  • Minecraft Server Hosting

Before starting

To play on a server we have three possibilities:

  • Play on someone else’s server , thus entering a world already created and probably with many other players, with the possibility of playing for free or for a fee, depending on the community of interest
  • Create our own home server, for free , and we decide whether to make it public or keep it private to play with a small number of people, leaving us in total control
  • Build our own Minecraft server by relying on one of the many hosting companies on the web, paying a few euros upwards, based on the performance of the server, the number of slots and the possibility of installing mods.

In this article we will focus on the second and third possibilities.

If the idea is to play with a few friends, creating a home server could be a good start, without spending anything and also learning some more technical aspects of online gaming , often similar for other video games.

Using a hosting remains a good alternative, prices are increasingly affordable and often a few euros a month are enough to get a good machine to play with, without slowdowns and hosting a handful of friends.

How to make a minecraft server from home

Creating a home server allows you to have total control over it, manage it from start to finish, configure the world in which we will live our adventures, allow access only to whoever we want and install any mod, performance permitting.

For a hassle-free gaming experience we need good internet connectivity , otherwise we would find ourselves seeing other players suffering from lag and the resulting discontent.

The computer on which to install the server must be sufficiently performing , so as to be able to keep the game world snappy and an adequate number of players connected simultaneously. Finally, when the computer is shut down, the server will also go out of business and if some other player wanted to keep playing, they can’t. The latter is probably the biggest drawback.

Hardware requirements

Considering the opening of a server capable of supporting a handful of players, such as a group of 4 or 5 friends, the necessary hardware resources are now within everyone’s reach. A home computer would hold up without slowing down, but we must consider that in most cases the PCs are used simultaneously for multiple operations, it is better to make sure you have at least a minimum of resources to devote exclusively to the server.

Considering a multipurpose computer and a number of players from 5 to 8, we would be able to have good performance with a quad core CPU and 8GB of RAM . A classic 20mbps download and 1mbps upload connection is enough.

The most important data regarding connectivity is the upload , because the server will have to constantly send all the players information about the game world and the actions of other players. 1mpbs can be enough for a vanilla server , i.e. without mods. If we encounter any slowdowns on the part of hosted players, the starting point to solve the problem at least temporarily is to stop software and applications that make the internet a rather intensive use, such as social apps for mobile phones and sharing software on computers. In general, if we barely meet the requirements, it is advisable to stop any other unnecessary software and applications in order not to affect the gaming experience.

In case we have a computer to be dedicated exclusively to use as a Minecraft server, the requirements go down, a dual core CPU together with 2GB of RAM are more able to run an 8-player Minecraft server, with a small margin capable of reaching even 10 players or mods that are not particularly heavy.

If we choose the second option, we would not be able to use Windows, as it would use all the few resources available to ensure the proper functioning of the operating system. Linux is the right choice, choosing a distribution suitable to be used as a server, such as Ubuntu Server or CentOS. Being server operating systems, they are certainly developed with the aim of being more stable and less resource-intensive than desktop systems.

Create a minecraft server on Windows

Install Java

Before proceeding with the installation of the Minecraft server, we need to install Java . Java is the programming language in which both Minecraft and its server were written.

We can download it from the official website https://www.java.com/it/download/

We then proceed with the installation

Java installation is simple and requires only a few clicks from the user.

Windows does not automatically add Java to the PATH (virtual directory that makes the software used as commands in the terminal available to the operating system ), it follows that we have to do it manually, otherwise it will not be possible to notify the executable file of the Minecraft server.

To set the PATH we must proceed as follows:

  1. We open a window of the Windows explorer (the classic directory viewer, called My computer or My computer)
  2. In the left column we find the icon relating to the pc, with the label “My computer”
  3. We right click and then on Properties
  4. On the right we find the link Advanced SystemSettings
  5. A window will open and we will click on the “Environment Variables”button
  6. In the table below we find the PATH item, select it and click on Edit, among the buttons on the left of the screen
  7. In the newly opened window, click on New and paste the complete address of where Java is installedon our computer which, if it has not been modified, is C: \ Program Files \ Java \ jre [version] \ bin
  8. Let’s save and go out

If you have difficulty on this step, we leave you the link to the official java guide .

Create the environment variables

2. Download the Minecraft server

Well now we can proceed with the download of the Minecraft server.

Let’s go to the appropriate section on the official website https://www.minecraft.net/en-us/download/server and download the minecraft_server.1.16.4.jar file.

3. Start the server

Once the download is complete, place the file in the C: \ Users \ User-Name \ ServerMC folder . Instead of username you will find your username, for example C: \ Users \ Marco \ ServerMC. The ServerMC folder will need to be created.

Now double click on the server.jar file and, after a few seconds, a series of files will be created inside the folder. Let’s open the one called eula.txt , and modify the value

eula=false

Turning it into

eula=true

This is to accept the license to use the file.

Now we can start the Minecraft server. We open the CMD, that is the Windows command line , opening the Windows menu (classic bottom left with the logo) and typing CMD.

First of all, let’s move to the folder we created and where the file relating to our server is located, typing the following line and then pressing Enter , as follows.

cd C: \ Users \ Username \ ServerMC

Now let’s start the server, with the command:

java -Xmx1024M -Xms1024M -jar server.jar

Instead of -Xmx1024M and -Xms1024M we insert the amount of RAM we want to dedicate to the server (eg 6GB becomes -Xmx6144M -Xms6144M). We enter and the server will start. We also need to allow the server to connect .

After a few seconds a series of writings will scroll in the window, among them we will find the server port, generally 25565, which we must note down because it will be used to connect to the server . When the word Done appears , it will be possible to connect to the newly created server and start playing, giving our friends our IP address followed by the port.

Well, if you’ve come this far, you can skip straight to the section called “Port forwarding on Windows and Linux”.

Create a Mincraft server on Ubuntu Server

As with Windows, even on Linux we need to install Java before we can use our Minecraft server. Considering that we have chosen Ubuntu Server as the operating system, the procedure is quite simple.

We open a terminal window and type the command:

sudo apt-get install software-properties-common

We send, we insert our password to execute the sudo commands and we wait for the completion of the operation and proceed with the following command:

sudo apt update; sudo apt-get install openjdk-8-jdk-headless

The semicolon is used to send two commands in succession, Ubuntu will first execute the command to the left of the semicolon and then the one to the right. In this case, it will download about 140MB of software, i.e. OpenJDK version 8.

Weight and version may vary from the time I write the article to when you follow the instructions. Once this operation is finished, we just have to start the Minecraft server , just like you do for Windows.

The procedure for downloading the latest version of the Minecraft server from the official website is the same as seen in the paragraph on Windows , then going to the minecraft.net/it-it/download/server/ site and clicking on the link to download the file server. jar.

Now let’s move to the folder where we downloaded the .jar file, that is / home / user / downloads and move it to / home / user / minecraft. Now we open the terminal and terminal give the command:

cd / home / user / minecraft

And then the nano eula.txt command , which will open the Minecraft EULA and allow us to change false to true . To confirm the change press ctrl + X and then confirm with Y.

We got to the point we were waiting for, to start the minecraft server.

java -Xmx1024M -Xms1024M -jar minecraft_server.1.16.4.jar nogui

As you can read from what is displayed in the terminal, the server first performs initialization steps, communicates the port to the server administrator (25565) and finally generates the game world and initial spawn area.

The writing Done will signal us that the operation is finished and the server is active.

Port forwarding on Windows and Linux

To connect to our brand new Minecraft server we need to know the server IP address and port. We already know the second, it is 25565, but if it is different, just go to the server start screen.

Knowing the IP of the server is simple, in the case of Windows just open the CMD, with which you have already become familiar with, and type ipconfig . The IP is displayed in the IPv4 Address line , and most likely it will be similar to what you will see in the screenshot.

If you are connected to the internet via cable, you have to check the Ethernet Adapter item, if you are using wifi, the right item is Wireless LAN Adapter or Wi-Fi Adapter. These items may change depending on how the PC is configured.

To know the IP in the case of Ubuntu servers, the same procedure is performed, from the terminal we give the command ifconfig (note well, if, not ip!) And a screen similar to that of Windows will be displayed.

Now that we know the IP and port, we need to configure the port forwarding of our router, otherwise it will not be possible for our friends to connect.

Let’s open our favorite browser and connect to the home page of our home router, the IP is probably 192.168.1.1 or 192.168.0.1. Username and password to use, if they have not been changed, are printed under the router itself.

Once in the control panel of the router, we have to go through the various menus until we find the entry port forwarding or just forwarding .

Each router has a different screen, but the substance is the same, we must fill in the fields as per the screenshot below:

Being careful to enter the IP you previously found using the ipconfig or ifconfig commands and the right port. When finished, save and apply the new settings.

Your server is now active and reachable from the outside!

Backup

Let’s go home, turn on the PC and start the Minecraft server. We discover that the game world has been lost to some unknown problem, how do we do it? Rather than risk finding ourselves in these situations and having to resort to the extreme attempt to recover the game world through software for recovering files, which often have a success rate that is not exactly attractive, it is better to prevent. To prevent such situations all we need to do is build a small backup system , and we can do it in multiple ways.

The simplest one, which, however, could be a bit tedious to do every time, is to copy the game world files to an external memory device every time we finish playing on the server , such as a pen drive or a usb hard disk.

Or, better solution, set up an automatic backup software that every day or every few hours will copy the file to a cloud storage system, such as Google Drive and Microsoft OneDrive.

Both offer a free plan more than enough for our purpose and simplify our work thanks to their respective PC software, which once installed, are configured in a few minutes and we can continue to play peacefully without worrying about losing the precious shared game world. with our friends.

If, on the other hand, we are using the server with a Linux operating system, the operations necessary to create an automatic backup system are more complicated , although not impossible. If you are not familiar with the Linux world, the advice is to make a manual backup of the game world on Google Drive (or your favorite cloud storage).

In case you want to experiment a little, the Back in Time utility is a small open source software capable of automatic file backup, available at https://github.com/bit-team/backintime and with excellent supporting documentation: https://backintime.readthedocs.io/en/latest/.

Minecraft Server Hosting

Not all of us are willing to invest the time in learning how to install and configure a server to play Minecraft with our friends. While the experience is also useful for learning the fundamentals of what server means and maybe even the basics of Linux if we choose to use Ubuntu Server, the current hosting prices are so affordable that it is worth considering them at least.

As mentioned in the article, one of the main problems we face when building a home server is downtime . When we shut down the PC, all players will be disconnected and will have to wait for the computer to be turned on and connected again to resume building their cottage on top of the promontory or fighting the dragon in the End.

By purchasing an online hosting plan this problem disappears and in addition we will have several additional features . Generally we find a mod manager, to be able to install and uninstall mods to our game world, an automatic system for backups, support for whitelists to decide who can connect and who cannot and much more.

 

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment