Installing Multicraft on Ubuntu Server | Information Technology from Valdemar

This article is written for those who were searching for a detailed and simple for the understanding guide on how to install Multicraft on Ubuntu Server.

Multicraft is a complete solution for hosting Minecraft servers.

In this guide, we will consider the case when you already have a server with the Ubuntu Server 18.04 LTS operating system installed on it.

You can read more about how to install Ubuntu Server 18.04 LTS in my guide «Installing Ubuntu Server 18.04 LTS».

In addition, OpenSSH must be installed on the server, and port 22 must be open in order to be able to connect to the server using the SSH protocol.

To install OpenSSH on the server, you can use the command:

sudo apt-get install openssh-server

If you plan to connect to the server using the Windows operating system, you can use PuTTY, a freeware client for various remote access protocols, including SSH, Telnet, rlogin.

This guide covers connecting to a server using the iTerm2 terminal emulator installed on the macOS operating system.

Please note that you will need to open the following TCP ports to access your server:

  • 80 – to receive a free cryptographic certificate through the Let’s Encrypt certificate authority.
  • 443 – to access the Multicraft control panel.
  • 25565 – to access the Minecraft client to the Minecraft server.

Please note that port 25565 is used by default to connect the Minecraft client to the Minecraft server, but you can use other ports to run multiple Minecraft servers. For example, the first Minecraft server launched with Multicraft will use port 25581; the second server launched using Multicraft will use port 25582 and so on. In this case, the Minecraft client will need to specify not only the IP address or name of the Minecraft server but also the port on which to connect to the server. For example, minecraft.heyvademar.net:25581.

Connect to the server on which it is planned to install Multicraft.

Next, you need to confirm that we trust the server to which we are connecting.

Enter “yes” and press the “Enter” button.

This guide discusses how to obtain a free cryptographic certificate through the Let’s Encrypt Certificate Authority. To receive and further update the free SSL certificate, we will use the Certbot software client, which is designed to simplify the receipt and renewal of the certificate through the Let’s Encrypt certificate authority.

Add the Certbot repository using the command:

sudo add-apt-repository ppa:certbot/certbot

Press the “Enter” button to confirm the addition of a new repository.

Now install the packages necessary for Multicraft to work using the command:

sudo apt-get install -y apache2 mysql-server php libapache2-mod-php php-mysql php-gd php-cli php-common php-mbstring php-ldap php-odbc php-pear php-xml php-xmlrpc php-bcmath php-pdo certbot python-certbot-apache default-jdk git zip unzip

Please note that in this guide, MySQL will be used as the database management system, and Apache will be used as the webserver.

Configure Apache for later work with the Multicraft control panel.

Enable the Apache webserver module called “rewrite” with the command:

sudo a2enmod rewrite

Please note that the “rewrite” module is one of the most commonly used Apache webserver modules and provides a flexible and powerful way to manipulate URLs.

Now you need to make changes to the Apache configuration file by opening it in a text editor using the command:

sudo vim /etc/apache2/apache2.conf

Press the “i” button to enter the editing mode, find the “AllowOverride” parameter for the “/var/www/” directory and set the parameter to “All”.

Please note, “AllowOverride All” – indicates that for the root directory of the virtual host and all subfolders you need to use “.htaccess”.

Now press the “Esc” button to exit the editing mode, and then enter “: x” and press the “Enter” button to save the changes and exit the editor.

Now you need to create a virtual host file (in Nginx it is called a block), with which the Multicraft control panel will continue to work.

Create a virtual host file using a text editor using the command:

sudo vim /etc/apache2/sites-available/multicraft.heyvaldemar.net.conf

In this manual, the multicraft.heyvaldemar.net subdomain will be used to access the Multicraft control panel from the Internet. You will need to specify your domain or subdomain by which your Multicraft control panel will be accessible from the Internet.

Press the “i” button to enter the editing mode, then insert the following configuration for the webserver to work:

In this manual, the multicraft.heyvaldemar.net subdomain will be used to access the Multicraft control panel from the Internet. You will need to specify your domain or subdomain by which your Multicraft control panel will be accessible from the Internet.

Now press the “Esc” button to exit the editing mode, and then enter “: x” and press the “Enter” button to save the changes and exit the editor.

Activate the created virtual host using the command:

sudo a2ensite multicraft.heyvaldemar.net.conf

In this manual, the multicraft.heyvaldemar.net subdomain will be used to access the Multicraft control panel from the Internet. You will need to specify your domain or subdomain by which your Multicraft control panel will be accessible from the Internet.

Deactivate the default virtual host using the command:

sudo a2dissite 000-default.conf

Make sure that there are no errors in the syntax of the new Apache configuration file using the command:

sudo apache2ctl configtest

Restart Apache to apply the changes using the command:

sudo systemctl restart apache2

Verify that Apache started successfully using the command:

sudo systemctl status apache2

Now, to increase the security level of the webserver, it is necessary to obtain a cryptographic certificate for the domain or subdomain, through which the Multicraft control panel will be accessible from the Internet.

To receive and subsequently renew the free SSL certificate, we will use the Let’s Encrypt Certificate Authority, as well as the Certbot software client, which is designed to simplify the receipt and renewal of the certificate through the Let’s Encrypt Certificate Authority.

In this manual, the multicraft.heyvaldemar.net subdomain will be used to access the Multicraft control panel from the Internet. You will need to specify your domain or subdomain by which your Multicraft control panel will be accessible from the Internet.

Request a cryptographic certificate using the command:

sudo certbot --apache -d multicraft.heyvaldemar.net

Next, specify the email address to which Let’s Encrypt will send notifications about the expiration of the cryptographic certificate and press the “Enter” button.

The next step is to read and accept the terms of use of the services provided.

Press the “a” button, then “Enter” if you agree to the terms of use of the services provided.

At the next stage, you must choose: do you want to share the email address indicated above with the Electronic Frontier Foundation to receive newsletters.

Press the “n” button, then “Enter”.

The next step is to choose: do you want the parameters to automatically redirect HTTP traffic to HTTPS be automatically added to the Apache configuration file.

Press the button “2”, then “Enter”.

Please note that cryptographic certificates obtained through the Let’s Encrypt Certificate Authority are valid for ninety days. Certbot automatically adds a script to renew the certificate in the task scheduler, and the script runs twice a day, automatically updating any cryptographic certificate that expires within thirty days.

You can check the operability of the cryptographic certificate renewal process using the command:

sudo certbot renew --dry-run

Now we will configure MySQL for further work with the Multicraft control panel.

First, you need to run the script “mysql_secure_installation”, which is designed to provide a basic level of MySQL security.

Run the script using the command:

sudo mysql_secure_installation

Next, you need to answer a few questions to ensure the basic level of MySQL security.

The first question is whether you want to use the plugin to check the password strength, which will need to be set later for the root user, who has administrator rights in MySQL.

Press the “y” button, then “Enter”.

At the next stage, you need to select the level of password complexity check, which will need to be set later for the “root” user who has administrator rights in MySQL.

In this guide, we will look at the highest level of password strength checking for the root user.

Press the button “2”, then “Enter”.

The next step is to specify a strong password for the user “root”, who has administrator rights in MySQL.

Specify a strong password for the user “root” and press the “Enter” button.

Next, specify the password for the user “root” again and press the “Enter” button.

The next question is whether you want to go to the next step to configure the basic MySQL security level with the received password strength value.

Please note that if the password you specify is set to “Estimated strength of the password” less than 100, it means that the password you specified earlier for the root user is not strong enough, and you need to specify a more reliable password.

In this manual, the value of “Estimated strength of the password” is 100, which indicates that the password specified above is strong enough.

Press the “y” button, then “Enter”.

The next question is whether you want to remove anonymous users.

Press the “y” button, then “Enter”.

The next question is whether you want to disable the ability to remotely connect to MySQL for the root user.

Press the “y” button, then “Enter”.

The next question is whether you want to delete the test databases.

Press the “y” button, then “Enter”.

Now you need to apply the changes.

Press the “y” button, then “Enter”.

Now you need to create the databases that will be used by the Multicraft control panel and the Multicraft daemon, as well as users with the necessary rights in these databases.

Connect to the MySQL management console using the command:

sudo mysql -u root -p

Specify the password for the “root” account, set earlier and press the “Enter” button.

In this manual, “multicraft_panel” will be used as the database name for the Multicraft control panel.

Create a database that the Multicraft control panel will use in the future using the command:

CREATE DATABASE multicraft_panel CHARACTER SET utf8 COLLATE utf8_general_ci;

In this manual, as the username that has the rights to the database for the Multicraft control panel to work, we will use “multicraftpaneldbuser” with the password “c7_Qm, A +; eq} = UHq5yW”.

Create the user, assign him a password and issue the rights to the previously created database to the new user using the command:

GRANT ALL PRIVILEGES ON multicraft_panel.* TO 'multicraftpaneldbuser'@'localhost' IDENTIFIED BY 'c7_Qm,A+;eq}=UHq5yW';

In this manual, “multicraft_daemon” will be used as the database name for the Multicraft daemon.

Create the database that the Multicraft daemon will use in the future using the command:

CREATE DATABASE multicraft_daemon CHARACTER SET utf8 COLLATE utf8_general_ci;

In this manual, as the username that has the rights to the database for the Multicraft daemon to work, we will use “multicraftdaemondbuser” with the password “zkJ3Xpr7f> / TLSYw6Zk”.

Create the user, assign him a password and issue the rights to the previously created database to the new user using the command:

GRANT ALL PRIVILEGES ON multicraft_daemon.* TO 'multicraftdaemondbuser'@'localhost' IDENTIFIED BY 'zkJ3Xpr7f>/TLSYw6Zk';

Apply the changes using the command:

FLUSH PRIVILEGES;

Disconnect from the MySQL management console using the command:

quit

Now download the “multicraft.tar.gz” archive containing the files for installing Multicraft using the command:

sudo wget http://www.multicraft.org/download/linux64 -O multicraft.tar.gz

Unzip the downloaded multicraft.tar.gz archive using the command:

sudo tar xvzf multicraft.tar.gz

Go to the “multicraft” folder with the command:

cd multicraft

Now run the installation script for Multicraft using the command:

sudo ./setup.sh

Next, you need to answer a few questions from the Multicraft installer.

The first question is whether to run each Minecraft server using a separate user.

Press the “y” button, then “Enter”.

The next step is to specify the user who will be used to launch the Multicraft control panel.

In this manual, the user “minecraft” will be used to launch the Multicraft control panel.

Leave the default value and press the “Enter” button.

The next question is whether to create a new user “minecraft” for the subsequent launch of the Multicraft control panel under this user.

Press the “y” button, then “Enter”.

In the next step, you can select the directory where you want to install the Multicraft control panel.

Leave the default value and press the “Enter” button.

In the next step, you can specify the Multicraft license key.

Please note that a license key is not required to run a single Minecraft server using the Multicraft control panel. More information about the cost of licenses for the Multicraft control panel can be found at https://www.multicraft.org/site/page/pricing

In this guide, the Multicraft control panel will be used to launch a single Minecraft server.

Leave the default value and press the “Enter” button.

The next question is about managing multiple servers using the Multicraft control panel. If you have several servers for management via the web interface, then each daemon managing the server must be assigned a unique number.

In this manual, the Multicraft control panel will manage a single server.

Leave the default value and press the “Enter” button.

The next question is whether the Multicraft control panel will work on the current server.

Press the “y” button, then “Enter”.

The next step is to specify the webserver user.

Leave the default value and press the “Enter” button.

In the next step, you can select the directory where you want to install the Multicraft web panel files.

Leave the default value and press the “Enter” button.

The next step is to specify a strong password for the daemon.

Please note that the password for the daemon that is set at this stage will need to be specified later at the final stage of installing the Multicraft control panel.

Specify a strong password for the daemon and press the “Enter” button.

The next question is whether to enable the built-in FTP server.

Enabling the built-in FTP server can come in handy for downloading the files necessary for Minecraft servers to work.

Press the “y” button, then “Enter”.

The next step is to specify the IP address of the server on which the built-in FTP server will be launched.

Leave the default value and press the “Enter” button.

The next step is to specify the port on which the built-in FTP server will be available.

Leave the default value and press the “Enter” button.

The next question is whether to block downloading files with the extension “.jar” and other executable files downloaded using the built-in FTP server.

Press the “n” button, then “Enter”.

The next step is to specify the database management system that will be used to work with the Multicraft daemon.

In this guide, MySQL will be used as the database management system.

Specify “mysql”, then press the “Enter” button.

The next step is to specify the IP address of the server on which the database for the Multicraft daemon is located.

In this manual, the database for the Multicraft daemon is located on the same server as the Multicraft control panel.

Leave the default value and press the “Enter” button.

In the next step, you must specify the name assigned to the database for the Multicraft daemon, which was created earlier.

In this guide, “multicraft_daemon” is used as the database name for the Multicraft daemon.

Leave the default value and press the “Enter” button.

At the next stage, you must specify the name assigned to the user who was created earlier and who was granted the rights to the database for the Multicraft daemon to work.

In this manual, “multicraftdaemondbuser” is used as the user name for the database for the Multicraft daemon to operate.

Specify “multicraftdaemondbuser”, then press the “Enter” button.

At the next stage, you must specify the password assigned to the user who was granted the rights to the database for the Multicraft daemon to work.

Specify the password assigned to the user “multicraftdaemondbuser”, then press the “Enter” button.

Everything is ready to start installing the Multicraft control panel.

Press the “y” button, then “Enter”.

The first installation phase has been completed successfully.

Press the “Enter” button.

The next question is whether to save all the above values to install the Multicraft control panel.

Press the “y” button, then “Enter”.

To continue the process of installing the Multicraft control panel, you must go from workstation to the link https://multicraft.heyvaldemar.net/install.php, where multicraft.heyvaldemar.net is the name of my server. Accordingly, you need to specify the name or IP address of your server with the Multicraft control panel installed.

Click on the “Start Installation” button.

Further, the installer will verify that all the requirements for the correct installation of the Multicraft control panel are met.

Click on the “Continue” button.

In the next step, the installer will copy the configuration file of the Multicraft control panel to the directory with the files for the Multicraft web panel.

Click on the “Continue” button.

Now you need to specify the database management system that will be used to work with the Multicraft control panel.

In the field “Database Type” select “MySQL”.

In this manual, the database for operating the Multicraft control panel is located on the same server as the Multicraft control panel.

In the “Database Host” field specify “127.0.0.1”.

In this manual, “multicraft_panel” is used as the database name for the Multicraft control panel.

In the “Database Name” field specify “multicraft_panel”.

In this manual, “multicraftpaneldbuser” is used as the user name of the user with the database permissions to operate the Multicraft control panel.

In the “Database Username” field specify “multicraftpaneldbuser”.

In the “Database Password” field specify the password assigned to the user “multicraftpaneldbuser”.

Click on the “Save” button.

Next, you need to initialize the database.

Click on the “Initialize Database” button.

The database was successfully initialized.

Click on the “Continue” button.

Now you need to log in to the Multicraft control panel under the Multicraft administrator account and complete the installation process.

Click on the “Login” button.

The default login for the Multicraft admin account: admin

The default password for the Multicraft admin account: admin

Specify the username and password of an account that has administrator rights Multicraft, and click on the “Login” button.

Then a message appears stating that the connection to the Multicraft control panel database has been successfully established.

Click on the “Continue” button.

Now you need to specify the database management system that will be used to work with the Multicraft daemon.

In the field “Database Type” select “MySQL”.

In this manual, the database for the Multicraft daemon is located on the same server as the Multicraft control panel.

In the “Database Host” field specify “127.0.0.1”.

In this manual, “multicraft_daemon” is used as the database name for the Multicraft daemon.

In the “Database Name” field specify “multicraft_daemon”.

In this manual, “multicraftdaemondbuser” is used as the user name for the database for the Multicraft daemon to operate.

In the “Database Username” field specify “multicraftdaemondbuser”.

In the “Database Password” field specify the password assigned to the user “multicraftdaemondbuser”.

Click on the “Save” button.

Next, you need to initialize the database.

Click on the “Initialize Database” button.

The database was successfully initialized.

Click on the “Continue” button.

In the “Administrator contact Email” field, you must specify the email address at which you can contact the administrator of the Multicraft control panel.

In the “Password for daemon connections” field, you must specify the password that was set for the daemon earlier at the stage of using the installation script in the terminal emulator.

Click on the “Save” button.

Now you need to start the Multicraft daemon.

Return to the terminal emulator and start the Multicraft daemon using the command:

sudo /home/minecraft/multicraft/bin/multicraft -v start

Return to the Multicraft control panel and click on the “Refresh” button.

Daemon started successfully.

Click on the “Continue” button.

Multicraft control panel installation completed successfully.

Click on the “Continue to Multicraft” button.

Welcome to the Multicraft control panel.

Now, for security reasons, you must delete the file “install.php”, which was used during the installation of Multicraft.

Return to the terminal emulator and delete the file “install.php” with the command:

sudo rm -f /var/www/html/multicraft/install.php

Exit the multicraft directory using the command:

cd ..

Now delete the “multicraft” directory containing the files to install Multicraft with the command:

sudo rm -rf multicraft

Now delete the previously downloaded archive “multicraft.tar.gz” containing the files to install Multicraft with the command:

sudo rm -f multicraft.tar.gz

Next, you need to configure the startup of the Multicraft service when the operating system starts.

Load the unit prepared in advance by the developers of Multicraft with the parameters for launching the Multicraft service into the directory “/etc/systemd/system/” using the command:

sudo wget http://www.multicraft.org/files/multicraft.service -O /etc/systemd/system/multicraft.service

Assign the correct permissions to the unit “multicraft.service” using the command:

sudo chmod 644 /etc/systemd/system/multicraft.service

Enable autostart of the Multicraft service when the operating system is launched using the command:

sudo systemctl enable multicraft

Now you need to provide an email address and set a new password for the Multicraft administrator account.

Return to the Multicraft control panel and go to the “Users” tab, then click on the “My Profile” button.

In the “Email” field specify the current email address of the administrator of Multicraft.

In the “Current Password” field specify the current password for the Multicraft administrator.

In the “New Password” and “Confirm Password” field, specify the new Multicraft administrator password.

Click on the “Save” button to save the changes.

Now you need to log in to the Multicraft control panel under the Multicraft administrator account using the new password.

Click on the “Login” button.

Next, you need to specify the user name and password of an account that has administrator rights Multicraft and click on the “Login” button.

Click on the “Close” button if you agree to the Minecraft license agreement.

You can read more about the Minecraft license agreement at https://www.minecraft.net/en-us/eula/.

Everything is ready to use the Multicraft control panel.

Next, you may need to upgrade Spigot.

Spigot is a modified Minecraft server based on the CraftBukkit core. Spigot is known for its stability, performance, support for a large number of plug-ins and is intended to replace CraftBukkit.

You can read more about how to upgrade Spigot on Ubuntu Server with Multicraft in my guide «Updating Spigot on Ubuntu Server with Multicraft».

Also in my guide, «Starting Minecraft Server with Multicraft» you can learn how to start a Minecraft server using Multicraft.

Author

Hi, I’m Vladimir Mikhalev, but my friends call me Valdemar. I have a lot of experience in the design and maintenance of various information systems. On my website, you will find detailed and clear guides for setting up IT solutions. Dive into the ocean, full of positive and technology! For cooperation: callvaldemar@gmail.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.