[Ubuntu] How to Install Minecraft Server

Minecraft is a sandbox video game. The creative and building aspects of Minecraft enable players to build constructions out of textured cubes in a 3D procedurally generated world. Other activities in the game include exploration, resource gathering, crafting, and combat.

This tutorial will show you how to set up personal Minecraft Server, here on Time4VPS.

Requirements

In this tutorial we will be using Ubuntu 16.04, however you should be able to use all our offered Ubuntu and Debian versions.

In Time4VPS you are able to install Ubuntu 16.04 template really easy and fast, only with few mouse clicks:

Create a script to run the Minecraft server by create file /home/minecraft/run.sh

nano /home/minecraft/run.sh

and pasting in this code:

#!/bin/shBINDIR=$(dirname "$(readlink -fn "$0")")cd "$BINDIR"

java -Xms1024M -Xmx1536M -jar minecraft_server.1.11.2.jar -o true

Note: The Xms and Xmx flags define the minimum and maximum amount of RAM the Minecraft server will use. The settings above are recommended for package "M", which has 2 GB of RAM used solely for this purpose. Adjust these values to fit your needs.

And last but not least make run.sh executable:

chmod +x /home/minecraft/run.sh

Run Minecraft

The first time you run the Minecraft server it will create an EULA file and then exit:

./run.sh

Open the eula.txt file and change the value of eula to true:

nano /home/minecraft/eula.txt

To ensure that the Minecraft server runs independent of an SSH connection, execute run.sh from within a GNU Screen session:

sudo screen /home/minecraft/run.sh

Note: To disconnect from the screen session without stopping the game server, press CTRL+a and then d. To resume the running screen session, use the command screen -r.

Connect to your Minecraft Server

Open your local Minecraft client. After logging in, click on the Multiplayer option:

Your server is now available to incoming connections. Click Join Server to connect.

Conclusion

Now you have your own private Minecraft server on which you can play with your friends from wherever you are. We recommend to take a deep look at all possible configurations, mods and so on which you can implement on your Minecraft word to increase your joy of playing even more.