How to create a Minecraft server

This tutorial will show you how to create a Minecraft server on various platforms. In the end, you will know how to configure a Minecraft server on Linux, Windows and Mac operating systems.

In general, Minecraft is a sandbox video game developed by Mojang. It is ranked among the most popular games on streaming sites like Twitch. Although players can play alone, there is also a multiplayer mode that has a strong online community.

To enjoy multiplayer, players must set up their own Minecraft server or use a web hosting provider. In this guide, we will focus on how to set up your own Minecraft server on Linux, Windows and Mac. If you have a virtual server, you can use these instructions and play with your friends and family!

In essence, this is the summary of the steps to create a Minecraft server:

  1. Install the latest version of Java;
  2. Choose a location for your Minecraft server;
  3. Configure the server and perform the configuration of the network;
  4. Initialize the Minecraft server;
  5. Check if the server is accessible and enjoy the game!

How to create a Minecraft server in Linux

Let’s see how we can create a Minecraft server in two of the best Linux distributions: Ubuntu and CentOS. Although the process is quite similar in both operating systems, there are some differences that you will notice when installing the necessary packages.

Setting up a Minecraft server in Ubuntu

First, we will create a Minecraft server using a VPS running on Ubuntu 16.04. The whole process can be divided into three simple steps.

Step 1 – Install Java and Screen

Before starting, you must connect to your server through SSH. To log in to your server, open the terminal (or use the Putty SSH terminal if you are in Windows) and type the following command:

ssh username @ ipaddress

Once you have logged in, you can begin formally configuring your own Minecraft server. Note that the configuration of the Minecraft server requires Java to be installed on the system. It is possible that you already have Java installed on your system. To verify this, execute the following command:

java -version

If you receive a message that says Java was not found on your system, you can continue with the rest of these instructions. Otherwise, you can end this section and go directly to step 2.

Run the following command on your terminal to download the latest software packages installed on your system, including Java:

sudo apt-get update

Now you need to install Java. We will install Java 17 for this tutorial:

sudo apt-get install openjdk-7-jdk

In case you want the latest version of Java, you can execute the following instead of the previous command:

sudo apt-get install default-jdk

Here we should also install Screen, which will ensure that your server keeps running in the background, even if the connection goes down. To do this, write the following and execute:

sudo apt-get install screen

Now you should have Java and Screen installed on your system.

Step 2 – Install the Minecraft server on Ubuntu

After having taken care of the prerequisites, we can now focus on installing the Minecraft server in Ubuntu VPS. It is always better to keep things clear and in order; To avoid making a mess, create a new directory that will contain all your Minecraft files in one place. This step is optional but we recommend it enough so you do not lose your head. To create a new directory, execute this:

mkdir minecraft

Once created, go inside the newly created directory by typing the following:

cd minecraft

Then, you need to have wget in your system. If you still do not have it installed, simply execute the following command:

sudo apt-get install wget

Now download and install your own Minecraft server:

wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.11.2/minecraft_server.1.11.2.jar

At the time of writing, the latest available version is 1.11.2. You must replace this number with the latest version that exists at the time you are going to install.

Accept the Minecraft end-user license agreement:

echo “eula = true”> eula.txt

Put Screen in operation so that the server can run in the background:

screen -S “Minecraft server 1”

We have named the current session “Minecraft server 1”, but you can use any other name.

And that’s it: you have successfully installed your custom Minecraft server in Ubuntu.

Step 3 – Run the Minecraft server

Now you just have to run the installed server. To achieve this, execute the following in the terminal:

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

As you can see, Minecraft requires that you have 1024 MB or 1 GB of RAM available to start the server. While this is the minimum requirement, we recommend having more RAM for better peThis is what you should see after executing the command:

And there you have it: your own Minecraft server configuration in just a few minutes. The server runs in the background, according to our use of Screen. Screen To exit, press CTRL + A , then D . You can undo this and reopen the Screen window by typing screen -rin the terminal. Finally, you can play with the configuration of your server through the server properties file:

nano ~ / minecraft / server.properties

Setting up a Minecraft server in CentOS 7

Let’s see now how to create a Minecraft server on a VPS running CentOS 7. The process is slightly different compared to Ubuntu.

Step 1 – Install Java and Screen

First of all, you will have to install Java , since Minecraft is based exclusively on it. The next package will be Screen , which is required for the Minecraft server to work once the SSH session ends. Connect to your VPS server through SSH (Windows users can use the Putty SSH client for this) and execute this command to install both packages:

yum install java screen -y

Step 2 – Install Minecraft server on CentOS 7

To organize the installation, you must create a dedicated directory for Minecraft by executing this command:

mkdir minecraft

Then simply change the working directory that you just created:

cd minecraft

Download the Minecraft server package:

wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.10.2/minecraft_server.1.10.2.jar

Start Screen with the appropriate name:

screen -S “Minecraft server”

Accepts the EULA agreement by changing the value from false to true in the eula.txt file . Use this command to edit the file:

nano eula.txt

Step 3 – Run the Minecraft server

Finally, you can run the server using this command:

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

I should show something like this:

The Minecraft server has started successfully, you can leave Screen using the keyboard shortcut CTRL-A + D .

The configuration of the server can be changed by editing the options file:

nano server.properties

How to create a Minecraft server in Windows

You can also configure a Minecraft server on your Windows PC. Once again, we will try to cover everything you need to know using three steps.

Step 1 – Get the latest version of Java

As Minecraft is based on Java, we will have to install the latest version to ensure everything runs smoothly. You can use the command prompt to check if you meet the requirements. Execute the following:

java -version

Then, make sure it matches the latest version of Java on the official website. Download it and install it in case your current version is earlier or if you do not have Java.

Step 2 – Install the Minecraft server in Windows

Next, you must choose a location where you will configure the Minecraft server. To keep everything organized, we recommend creating a dedicated folder for this task. Once this is done, download the latest Minecraft server configuration software from the official site.

Move the .jar file to the directory you created earlier and double-click on it.

Before proceeding to start the Minecraft server, you must accept the EULA agreement . This can be done by editing the file eula.txt and changing from eula = false to eula = true .

Step 3 – Run the Minecraft server

You can start the Minecraft server with the help of the Windows command prompt. Use it to navigate to your dedicated Minecraft server directory. For example:

cd Desktop / MinecraftServer

Start the Minecraft server by running the following command:

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

Alternatively, you can double-click on the .jar file again and it will also work. You may need to authorize the Minecraft server in the firewall.

If you see a screen similar to this one, it means that your Minecraft server has started correctly:

How to create a Minecraft server on Mac

Last but not least, let’s see how we can create a Minecraft server using MacOS. We will divide the process in three steps.

Step 1 – Install Java and Screen

Java is included by default if you are using a recent version of MacOS. You can verify this by entering this command in your Terminal:

java -version

If it is not available, you can download a version of Java legacy from the Apple website.

Step 2 – Install the Minecraft server on Mac

To keep everything organized, it is better to dedicate a folder to your Minecraft server. Once created, download the Minecraft server configuration from the official website.

Upload it to the created directory. Then, open TextEdit and leave the format as plain text (Format> Create plain text). Paste the following:

#! / bin / bash

cd “$ (dirname” $ ​​0 “)”

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

Save this file as startmc.command in the same directory where the Minecraft server installation file resides. For it to work, execution permission will be required. We can grant it with the help of the Terminal located in the Applications > Utilities section . Once opened, enter your dedicated Minecraft folder. For example:

cd Desktop / MinecraftServer

You can grant the required permission with the help of this command:

chmod a + x startmc.command

Step 3 – Run Minecraft Server

If you followed all the steps correctly, you can start your Minecraft server by double-clicking on the startmc.command file . After that, a new Terminal window will appear.

You may notice some missing file / directory warnings when you do it for the first time. However, you should not worry, as it is completely normal!

In conclusion

Congratulations! By the end of this tutorial, you have learned how to create a Minecraft server on various platforms and operating systems.

Do you have any idea, advice or trick that you want to share? We are waiting for you in the comments section below!

rformance. To allocate more memory to the server, simply replace 1024 in the -Xmx and -Xms parameters by 2048 (2GB) and so on. This is what you should see after executing the command:

 

Leave a Reply

Your email address will not be published. Required fields are marked *