How to deploy a Minecraft server on Linux Centos and Ubuntu

Linux

Minecraft has proven to be one of the best and highly regarded video games in the world.

Minecraft is also a great too for teaching students how to do coding.

Now you can now have a Minecraft server deployed on your own server be it on Linux.

Having it deployed on your own server will enable you have more control.

 

We shall learn;

1. How to deploy a Minecraft Server on Linux

i. Install Java and Screen

ii. Install and Run Minecraft Server on Linux

iii. Run Minecraft Server

 

2. Pointing a domain to your Minecraft server

 

1. How to deploy a Minecraft Server on Linux

The first step to take is to get you a reliable server or hosting plan that supports Minecraft.

There are some packages which is required to get Minecraft server running.

i. Install Java and Screen

In this deployment process, we are going to use CentOS 7 and Ubuntu 16.04. You must connect to your server via ssh to the do the following;

Check if Java is already installed and if not, you must install a Java instance.

To Check if Java is available, run the following command;

$ java -version

If not available, then you must install with the following command;

On Ubuntu, enter;

$ sudu apt-get update
$ sudo apt-get install default-jdk

While On CentOS, enter;

$ sudo yum update
$ sudo yum install java -y

Proceed with the installation of Screen with the following command;

On Ubuntu, enter;

$ sudo apt-get install screen

On Centos, enter;

$ sudo yum install screen -y

ii. Install and Run Minecraft Server on Linux

After installing Java and Screen, you can proceed with installing the Minecraft server by following the following steps;

* Create a new directory dedicated for Minecraft which will store all its configuration files. To make the directory, us the command below;

$ mkdir minecraft

* Then change your current directory into the new Minecraft Directory created by using the command below;

$ cd minecraft

* In order to be able to download Minecraft configuration files, wget needs to be installed. Use the commands below;

On Ubuntu, enter;

$ sudo apt-get install wget

On CentOS, enter;

$ sudo yum install wget -y

* Then use wget to download the Minecraft server properties file;

$ wget
https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar

However, you can get the latest file from https://minecraft.net/en-us/download/server.

* Next, you will run the Minecraft server properties file using the command below;

$ java -Xmx1024M -Xms1024M -jar minecraft_server.1.15.2.jar
nogui

* It is important to note that the server program will not start automatically. But a EULA(end-user license agreement) file needs to be accepted to proceed. To accept Minecraft's EULA, open eula.txt file by using;

$ sudo nano eula.txt

* Then find the line ;

eula=false

You should change this to eula=true

Once done, save changes.

* Now it is time to activate Screen to enable the server to run in the background. run the following command;

$ screen -S "Minecraft server 1"

Note that you can change the name above to a name of your choice!

If you followed the steps accordingly without errors, then your Minecraft server is now installed.

 

iii. Run Minecraft Server

To get the Minecraft Server up and running, use the command below;

$ java -Xmx1024M -Xms1024M -jar minecraft_server.1.14.4.jar
nogui

From the above command, we allocated the minimum RAM size (1024M) which is equivalent to 1 GB of RAM. You can increase this according to your server capacity. Let's say you want to use more ram like 2048M(2 GB) or more, you would simply change the value.

If successful, you will see that it is running. To leave Screen, enter press ctrl A, then D.

To re-open the Screen window, enter the command below;

$ screen -r

For customization of the server settings, open the server's properties file you installed previously by using the following command;

$ nano ~/minecraft/server.properties

To test your Minecraft server and to ensure that everything is running correctly, stop your server with:

$ stop

Then edit the “server.properties” file and set:

enable-query=true

Save the “server.properties” file and restart your server. From there, enter your server IP address into the Minecraft Server StatusChecker (https://mcsrvstat.us/) to see if it’s publicly accessible.

 

2. Pointing a domain to your Minecraft server

Using a domain with your Minecraft server will enable players to remember your server easily instead of the default server ip address.

To connect your domain, simply set up a Domain dns("A" record) correctly to point to the Minecraft server

 

In Conclusion

Now you can see that deploying a Minecraft Server on Linux is very easy. Let me know if you are having issues with deployment.

We offer installation and deployment of Minecraft Server on your own Server, Windows and other platform of your choice. Contact us today to get started.

 


Conclusion

Minecraft is so much more than just a game. It’s also a tool for teaching kids how to code; an open platform to be expanded by mod developers; and it’s the heart of a global community of creators. Minecraft is a popular video game developed by Mojang Studios. Minecraft was created by Markus "Notch" Persson in the Java programming language.

Your Cart