Setting up the server

Before we start to install Multicraft onto the server, we need to ensure that the local package list is updated to the most recent version.
To do this we can run the following command.

sudo apt-get update -y

We have added -y to skip past the confirmation dialog, you can remove this if you wish but it helps speed up the process.

Installing Software (1/6) – Apache

To access your control panel on the web we need a web server, this is where Apache comes in.

To install Apache we run the following command:

sudo apt-get install apache2 -y

Now we need to give Apache the name of the server, this can either be the IP address of the server or a custom host name for example mc01.vybrus.net

To open the configuration file we will be using nano which is pre-installed on the server.

sudo nano /etc/apache2/apache2.conf

We now need to find the a line in the configuration file looking something like this:

ServerName: localhost

Where it says localhost above change that to what you wish it to be.

Once you have done that we need to save the file, we can do that by pressing ctrl+x then y and then enter and this will save your file.

Now we need to test the configuration file before we restart the Apache service.

To do this we can run the following command:

apache2ctl configtest

Once we are happy with the configuration file we can go ahead and restart the service.

sudo systemctl restart apache2

Installing Software (2/6) – MySQL

Multicraft requires a database to work and some of the plugins that you may use will also require a database such as permissions plugins.

sudo apt-get install mysql-server -y

Now that we have MySQL installed onto the server we need to configure it, it’s far quicker than editing a file manually.

sudo mysql_secure_installation

Depending on the version of MySQL that is installed it may ask you to install the password validation plugin, we would recommend this as it will help enforce a good level of security.

The message that you see may look something along the lines of this:

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:

For most installations, we suggest that you go for option number 1 as number 2 can throw a allot of errors as your passwords may not match the criteria.

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1

If you have installed the password protection plugin, it will ask you if you wish to change the root password that you have set during the installation of the initial MySQL plugin.

Using existing password for root.

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) :

If you feel confident with the strength of the password you can select for no otherwise hit and set your new password.

The next set of questions answer to as it removes anonymous users, test databases and disallows remote root logins, once you’ve done all that MySQL is ready to be used.

Installing Software (3/6) – PHP

For Multicraft to run successfully it requires PHP and a few PHP extensions, to keep this quick we can run these all in one command.

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql -y

Now we need to set Apache to use .php files over the normal .html files, we do this by editing a config using nano in the command line.

sudo nano /etc/apache2/mods-enabled/dir.conf

In the configuration file, you will need to locate a section of the configuration file that looks something like this.

DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm

We need to move index.php before index.html and it should look something along the lines of this.

DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm

Once you have edited the configuration file we need to save the file this can be done by doing ctrl+x then pressing y and then hitting enter and this will save a file in nano.

Before we restart Apache we need to test the configuration file like we did above for the server name.

apache2ctl configtest

Now that we have tested the configuration file and no errors are being shown we can then restart Apache successfully.

sudo systemctl restart apache2

Installing Software (4/6) – Java

To be able to run the server jar’s we need to have Java installed on the server.

sudo apt-get install default-jre

Installing Software (5/6) – PHPMyAdmin (optional)

If you wish to manage your server via a web panel you will require PHPMyAdmin and this quite handily can be done using one command.

sudo apt-get install phpmyadmin

You can follow all of the steps quite simply but when you get to stages where it requires the web server software please select Apache2.

Also, ensure any password meet the requirements you set when setting up MySQL.

Installing Software (6/6) – Let’s Encrypt (optional)

If you are using a URL for example mc01.vybrus.net we would recommend that you get an SSL certificate. You don’t need to pay for one as we will be using Let’s Encrypt which is a free service.

Most servers do not have the repository already in it’s list, so we will need to add this ourselves, which you can do using this command:

sudo add-apt-repository ppa:certbot/certbot

It will prompt you if you wish to add the above repository, you will need to hit enter for this.

Now we need to update our local package list, we will need to run the update command once again:

sudo apt-get update

As we now have everything updated we can go ahead and install Certbot which is maintained by the Let’s Encrypt developer.

sudo apt-get install python-certbot-apache -y

Once Certbot is installed we can issue our new SSL certificate for our domain name.

Make sure that you change example.com to your chosen domain name.

sudo certbot --apache -d example.com

Now that we have the SSL certificate installed you can verify this by going to your domain name and entering https:// in place of http://.

Installing Multicraft

Now for the exiting bit, we get to install Multicraft.

To start the installation we need to move to our home directory, we can do this by using the flowing command.

cd /home

We also need a folder to place the installation files into and then navigate into that directory.

mkdir MulticraftInstllation; cd MulticraftInstllation

We can now download the installation files but be sure to change $OSVer to either 64 or 32 depending on the build of Ubuntu

wget http://www.multicraft.org/download?arch=linux$OSVer -O multicraft.tar.gz

Now that we have the compressed files downloaded we need to now decompress these files to be able to start the installation.

tar xvzf multicraft.tar.gz

Once we have decompressed the files we now need to navigate into that directory.

cd multicraft

Once we are in that directory we can then run the installation script.

./setup.sh

During the installation, it will start to ask you some questions. They make look something along the lines of this:

Run each Minecraft server under its own user? (Multicraft will create system users): [y]/n y
Run Multicraft under this user: [minecraft] minecraft
User not found. Create user 'minecraft' on start of installation? [y]/n y
Install Multicraft in: [/home/minecraft/multicraft] /home/minecraft/multicraft
If you have a license key you can enter it now: [no] *Enter license key if you have one*
If you control multiple machines from one control panel you need to assign each daemon a unique ID (requires a Dynamic or custom license). Daemon ID? [1] 1
Will the PHP frontend run on this machine? [y]/n y 
User of the webserver: [www-data] *Just hit enter* 
Location of the PHP frontend: [/var/www/multicraft] /var/www/html 
Enable builtin FTP server? [y]/n y
IP the FTP server will listen on (empty for same as daemon): [] *Just hit enter* 
FTP server port: [21] 21 
Block FTP upload of .jar files and other executables (potentially dangerous plugins)? [y]/n y 
What kind of database do you want to use? [sqlite]/mysql mysql
Ready to install Multicraft. Start installation? [y]/n y>

Once that you have completed above, it will prompt you to navigate to a website address.

Open that address in your web browser and from there you can complete your installation. This can vary differently and we suggest taking your time through this part of the installation.

If you have any questions, please leave a comment below and we can get back to you as soon as possible.