Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

[Ubuntu] How to Install Minecraft Server

LawrenceLawrence Member
edited May 2020 in Various Tutorials


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.


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:
  1. Login to the Client Area;
  2. Select at the top of menu the "My Services > VPS" tab;
  3. Press the "Manage" button at the service table;
  4. Press the "Install OS" button;
  5. Choose Ubuntu 16.04 operating system, agree with warning and press "Continue";
  6. Wait for 5-10 minutes and refresh VPS management page.

Update System

First things first. Like always, first of all, we recommend to update and upgrade your server.
apt-get update
apt-get upgrade -y

Install OpenJDK

Install OpenJDK, an open-source implementation of Java, and the GNU Screen package by running this command:
apt-get install openjdk-8-jre-headless screen

Creating New User

Create a new user for Minecraft by running:
adduser minecraft
Grant the created user "sudo" rights:
usermod -a -G sudo minecraft
Switch to the minecraft user:
su minecraft

Install Minecraft

Download the latest version of the Minecraft Multiplayer Server:
Note: You can find latest version on official Minecraft's webpage.
Create a script to run the Minecraft server by create file /home/minecraft/
nano /home/minecraft/
and pasting in this code:
BINDIR=$(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 executable:
chmod +x /home/minecraft/

Run Minecraft

The first time you run the Minecraft server it will create an EULA file and then exit:
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 from within a GNU Screen session:
sudo screen /home/minecraft/
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:

Click on Add server and enter your server's IP address or hostname. When you’re finished click Done:

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


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.

Sign In or Register to comment.

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2021 Time4VPS. All rights reserved.

Get In Touch