How To Install OpenFire on Ubuntu 20.04 LTS

Install OpenFire on Ubuntu 20.04

In this tutorial, we will show you how to install OpenFire on Ubuntu 20.04 LTS. For those of you who didn’t know, Openfire is an open-source XMPP messaging and collaboration platform. XMPP is a widely adopted and open messaging protocol that is easily used from any operating system on any platform. The design of Openfire means that it is easily extended with plugins that are available from their website.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the OpenFire on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.

Install OpenFire on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing OpenFire on Ubuntu 20.04.

Now we run the following command to download the Openfire latest package from the official page:

wget https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_4.6.4_all.deb

Once the download is completed, install the downloaded file with the following command:

dpkg -i openfire.deb

After that, enable the Openfire service and then check its status:

sudo systemctl enable --now openfire
sudo systemctl status openfire

Step 3. Installing and Configure MariaDB.

Now we install the MariaDB database server with the commands below:

sudo apt install mariadb-server

Then, start the MariaDB service and make it automatically start on boot:

sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next, we will need to log in to the MariaDB console and create a database for the PrestaShop. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for PrestaShop installation:

CREATE DATABASE openfiredb;
CREATE USER 'openfireuser'@'localhost' IDENTIFIED BY 'Your-Strong-Passwd';
GRANT ALL PRIVILEGES ON `openfiredb`.* TO 'openfireuser'@'localhost';
FLUSH PRIVILEGES;

Step 4. Configure Firewall.

If you have an active firewall service, allow ports for Openfire:

sudo ufw allow 9090
sudo ufw enable

Step 5. Accessing OpenFire Web Interface.

Once successfully installed, now open your web browser and access the Openfire web interface using the URL http://your-server-ip-addres:9090. You should see the following screen:

Install OpenFire on Ubuntu 20.04

Congratulations! You have successfully installed OpenFire. Thanks for using this tutorial for installing the OpenFire on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official OpenFire website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!