Skip to main content

Installation

We will go through all steps that needs to be done to get your PC or Server equiped with the latest installation of Minecarft Java Edition Server. This software should be runnig 24x7, especially if you are going to use it as a public server, available to everyone. That's why the best would be to rent a virtual server for this. If you would use your private PC for this, it could make it vulnerable for hacker attacks, we would not recommend this.

The minimal requirement for a good virtual server would be at least 2GB and 4 full cores PC.

Java Installation​

The Minecarft Java Edition Server needs of cause Java.

First check if you have one already on your virtual server:

$ java -version

The response should look something like this:

openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment (build 19.0.1+10-21)
OpenJDK 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)

If the response looks like this, you're fine can jump over the Paper Installation.

If it responds with Command java not found, you don't have the java installed, and if the version is not the latest (17 at the moment of writting) you have Java, but it needs to be updated to the latest version.

Do the following:

  • Open the Open JDK Download Website.
  • Download the tar.gz mentioned on the page, e.g.
    $ curl https://download.java.net/java/GA/jdk19.0.2/fdb695a9d9064ad6b064dc6df578380c/7/GPL/openjdk-19.0.2_linux-x64_bin.tar.gz --output openjdk-latest.tar.gz
  • Install downloaded bundle:
    $ sudo mkdir -p /usr/java/openjdk
    $ sudo cp openjdk-latest.tar.gz /usr/java/openjdk/openjdk-latest.tar.gz
    $ cd /usr/java/openjdk
    $ sudo tar -xzvf openjdk-latest.tar.gz
  • Extend profile with Java
    sudo vi /etc/profile
    add following lines to the end of the file
    # OpenJDK 19
    JAVA_HOME=/usr/java/openjdk/jdk-19
    PATH=$PATH:$JAVA_HOME/bin
    export JAVA_HOME
    export PATH

Now the java should be installed.

Paper Installation​

The next point is to install the Minecraft Server itself. We need a plugin-enabled version of the Minecraft Server so we can install mods and plugin in it. At the end it is the main point of having a Minecraft Server!

So, first we have to create a directory for the Minecraft. Go to you home directory and create a minecraft folder there:

$ cd ~
$ mkdir minecraft

Now you need a mod/plugin-enabled variant of the Minecraft Server. MineShare uses PaperMC flavour of the Server. Please, go to the download page and pick up the latest version. Please, take the latest download link for the 1.19.4 version. You can point a mouse to the blue button and select Copy link address.

Then, go back to your minecraft directory and download this file:

$ cd ~/minecraft
$ curl https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/521/downloads/paper-1.19.4-521.jar --output paper-1.19.4-521.jar

Please, change the version to what you copied from the download page. Please, preserve the version in the name of the file, as it will help you track the version your are using currently.

Before you start a new minecraft server, please open a new virtual terminal.

You can do it with a screen command:

$ screen

This is needed to be able to let the minecraft running even after you will close your connection.

Later, if you need you can go back to your screen like this:

$ screen -r

Ok, now you can start your Minecraft Server in the screen:

$ cd ~/minecraft
$ java -Xmx2048M -Xms2048M -jar paper-1.19.4-521.jar nogui

Note that you have to change paper-1.19.4-521.jar to the current version you have downloaded.

After the first start the proper Minecraft bundle is downloaded and some modules are unpacked, but the start will fail. This is happenning because you have to agree with MINECRAFT END USER LICENSE AGREEMENT.

If you have read and want to accept the EULA, please open the eula.txt and change the property eula=false to eula=true. Once you saved the file, you can restart the server and it will work this time.

Now you can connect to your server from the Minecraft Client.

After opening the Minecraft Java Client, please go first to Multiplayer option, then press "Add Server", add the ip adress of the Server and... you are in the new World that has just been created for you.

Install MineShare​

To install MineShare plugin, you have to download the latest version of the plugin. Please, copy the link address and put the result into the plugins directory:

$ cd ~/minecraft/plugins
$ curl https://ro-store.net/mine-share-latest.jar --output mine-share-latest.jar

Now you can restart the server and it should work.