Minecraft is a sandbox video game developed by Mojang. It ranked highest on games streamed on Twitch. While the player can play the game himself, having a multiplayer mode has created a huge online community.
To play Minecraft multiplayer mode, players need to create their own server, or use a hosting provider. In this tutorial, we will show you how to install Minecraft server on Ubuntu 16.04. Players of any version of Linux can refer to this tutorial, no difference.
What do you need?
Before you start, you need to make sure your VPS meets:
- At least 1 GB of RAM
- 5 GB of storage
- Access SSH root privileges
Step 1 – Install Java and Screen
Before you start, you need to connect to the server via SSH. To log on to the server, open the termina (or use the Putty SSH Terminal if you are using Windows) and type the following command:
Once logged in, you will be able to start installing your own Minecraft server.
To install Minecraft server, you need Java installed on the system first. To do this, perform the following steps:
- You may already have Java installed on your machine. To test, execute the following command:
1<span class="crayon-v">java</span> <span class="crayon-o">-</span><span class="crayon-v">version</span>
- Run the following command in the terminal to load the latest installation package for your machine, including Java:
1sudo apt-get update
- Now install Java. We will install Java 17 in this tutorial:
1sudo apt-get install openjdk-7-jdk
- In case you want to install the latest version of Java, you can run the following command instead of the above command:
1sudo apt-get install default-jdk
- Also, to install the screen, make sure that the server is still running even if you lose the connection. Type the following command to execute:
1sudo apt-get install screen
Now you have Java and Screen installed on your computer.
Step 2 – Install Minecraft Server on Ubuntu
With the necessary preparation steps, you can now install Minecraft server on Ubuntu VPS. To do this, just repeat these steps:
- It would be nice to keep everything clean and tidy. To avoid confusing the system, create a folder containing all the MineCraft files inside a folder. This step is optional, you can do or not, but we recommend the same. To create a new directory, run the command:
1<span class="crayon-e">mkdir </span><span class="crayon-v">minecraft</span>
- Once created, access this directory with the command:
- Next, you need to have wget on your machine. If not, run the following command to install wget:
1sudo apt-get install wget
- Now download and install from MineCraft Server:
1wget -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 this article, the latest version is 188.8.131.52. You can change this number to any other number to install the latest version. Take a look at the versions here: visit this link.
1echo "eula=true" > eula.txt
Set screen operation and run, so server can run in background:
1screen -S "Minecraft server 1"
We put the current session ‘Minecraft server 1’, but you can use any other name.
And that’s it, you’ve successfully installed Minecraft server on Ubuntu.
Step 3 – Run the Minecraft server
Now just run the installer. To do this, run the following command in the terminal:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
And that’s it: Minecraft server will be installed in a few minutes. Server is running in the background for each screen use. To exit screen, type CTRL + A and then D. You can go back to this step and re-open the screen by typing screen -r in the terminal. Finally, you can further adjust in the server’s installation file:
In these steps, we showed you how to install the Minecraft server on Ubuntu. We also provide a lot of information such as installing Java on Ubuntu, installing screens so the server can run in the background.
As an introduction, players have the option of playing on the server hosted. But with this tutorial, you can have full control over security and control on the server.