8.2 Use Hestia to Install Friendica

Ideally, we would like to use a Joomla extension to install a social network inside of our Joomla database. This would allow our website members to log into Joomla and into the social network at the same time. This is the case for the Kunena forum tool. However, because Joomla recently changed from PHP 7 to PHP 8, many Joomla extensions have not yet been updated. There are three tools I have written about in the past which are capable of acting as a social network. These are Fabrik, Seblod and Wall Factory. However none of these options has yet been fully updated to Joomla 4 or PHP 8. Therefore, our only option is to install a separate social network tool, with its own database, on a separate domain or subdomain name. In this article, we will first review the free open source options and then describe the steps to installing the best option – which is called Friendica – and which was just updated to PHP 8 a few weeks ago.

Federation Social Network Options
The Federation is a group of open source social networking platforms (called projects) which can interact with each other. You can see a list of these projects by going to this link: https://the-federation.info/#projects


Federated networks use a concept called nodes for their interaction. A node is simply a social network website created by anyone and hosted on their own server. The network can be public (open) or private (closed). The project with the most nodes and most users is called Mastodon. They have over 4000 nodes or separate social network websites which can interact with each other. Pleroma is a fork of Mastodon.

The problem with most of the options on the Federation list is that they use special programming languages and special databases. Both Hestia and Joomla are based on a database called MariaDB. MariaDB is an open source fork of the MySQL database (which was purchased by Oracle in 2010 for more than one billion dollars). Both Hestia and Joomla use PHP to interact with the database. We therefore need to seek out social networking options that interact with PHP and MariaDB.

Which Federation options use PHP?
Mastodon and Pleroma are written in a language called Ruby and require a database called PostgreSQL. Mobilizon also requires PostgreSQL. While PostgreSQL is faster than MariaDB, it also has a much larger file size and uses more RAM. The file size of MariaDB on a Linux seever is 43MB versus PostgreSQL is 116MB. On a typical small VPS with 40 websites, Maria will take 1.7 GB of space while PostgreSQL will take 4.4 GB of disc space. RAM usage is also less with MariaDB.

Write Freely is written in Go which is a language created by Google. After researching the top 20 options, the only social networking options that use PHP and MariaDB are Friendica, Hubzilla and GnuSocial. Because Hubzilla is more complex and difficult to manually install, and because GnuSocial lacks many important features (like calendars of events), we will explain how to use and recommend Friendica. In June, 2022, Friendica released a version compatible with both PHP 7.4 and PHP 8. So Friendica should work with any recent version of the Hestia Control Panel.

Friendica Features and Benefits
Friendica is a decentralized social network that you can install on your own VPS. Friendica provide members of your group with a forum that is modern, secure and privacy-friendly. Secure in the sense that the connections are encrypted from user to user and secure in the sense of decentralized. You can communicate with friends who only have an email and not a social media account via the handy email integration function. Friendica has several types of accounts, each with different uses – open forum, closed forum, private account, public relations account, community forum, etc. Friendica can be used for any membership organization from a small club to a big school.

Similar to common social networks, there are the following functions:

Set up your own profile page… you can have more than one profile page… with different profiles for different groups. On your page, you can create posts and decide which groups can see which posts, for example, family, friends, club members. Connect with friends. Send messages. Share posts, pictures, videos and events.

Friendica is developed by a team of about 10 active developers with more than 300 additional developers making contributions to the latest version. They are all volunteers. There is no money involved and there is no corporate structure or legal formation of any kind.


How to Install Friendica with Hestia
One of the goals of the Friendica developers is to make installing a secure social network as easy as possible. However, this does not mean that Friendica is as easy to install as Joomla. The problem is that all social networks require constantly updating the database in a manner similar to an email server. Thus, while many of the steps in installing Friendica are similar to the steps in installing Joomla, some of the steps are a little more complex.

Sadly, many tutorials on installing Friendica on a VPS involve copy pasting a huge number of complex commands into your terminal. Because most people do not understand these commands, they often make mistakes and wind up giving up. Below we provide a much easier way to install Friendica – using graphical interfaces whenever possible.

We will outline the process for installing Friendica on a Hestia Control Panel which has been installed on a Debian virtual private server hosted by Canhost.ca.

Step 1 Set up a Secure Foundation
This includes creating a Linux laptop and connecting it to the Internet with an Ethernet cable and then getting a Protonmail account and using your Protonmail account to create a Canhost account to create a Canhost VPS and then install the Hestia Control Panel on your Canhost VPS.

Step 2 Choose your domain name and or subdomain name
While you can use any domain name, such as mynetwork.com - or subdomain name, such as friendsof.mynetwork.com, it is not possible to change the domain name later. Therefore give some thought to this question. In our example, we will build a Joomla website for the domain name communitynetwork.us. This will allow us to create an infinite number of sub-domains such as washington.communitynetwork.us and oregon.communitynetwork.us.

This will allow us to eventually set up a national network of Friendica websites to provide folks with an alternative to Facebook and Twitter.

Step 3 Point your domain name and or subdomain name
Each domain name should be transferred to and hosted on Canhost.ca in order to use the Canhost DNS manager to point your domain and or sub-domain to your VPS IP address. Log into your Canhost account and in the Client Area, click on My DNS in the side menu. Then to the right of your domain name, click on the pencil also called Edit Zone. Change the four A records from the Canhost IP address to your server primary IP address. Also add two CAA records. If using a sub-domain, add an A record for the sub-domain. Click Add Record. Below we have added the sub-domain washington for our domain communitynetwork.us.


Here is the top of our records table:


Click Save Changes at the bottom of the page to save the new record. Then click Client Area, Log Out.

Step 4 Use Hestia to create a Joomla website
Log into your Hestia Admin Control Panel. Then click Add User to create a new user for your top level Joomla website. Then use the right arrow to go to the new Hestia user account. Click Add Web Domain. Type in your domain name and check Create DNS zone and Enable mail.


Then click Save. Then click Back. Then to get an SSL certificate for your domain, click the Edit Icon to edit the domain. Check Enable SSL and Use Lets Encrypt. Then click Save and wait for the certificate to be added. After you see the green notice Changes have been saved, click the Back arrow.

Step 5 Create a Server Connected Email Address
Click Mail. Then click on the Edit Mail Domain icon. Click Enable SSL and Use Lets Encrypt. Then click save and wait for the certificate to be issued. Then click Back. Then click on the Plus sign to add a new mail account. Click on Advanced Options to Forward the account to your Protonmail account. We will need this server-connected email address later when we install Joomla and Friendica.

Step 6 Create a Database for our Joomla website
Click DB. Then click Add Database. Add a database name, a database username and database password. Copy paste all of these (including the Hestia User Prefix) to a Libre Writer document. We will need this information later when installing our Joomla website. Then click Save and Back.

Step 7 Install Joomla
Go to Joomla dot org to download the latest version of Joomla. Then in your Hestia User account, click Files. Then web. Then your domain name. Then public_html. Then click Add Files. Then navigate to your zipped Joomla folder and select it. Once it loads, click on the three dots and click Unzip. Scroll down and delete the zipped folder. Rename index.html as old-index.html and rename htaccess.txt to .htaccess. Then click Exit to Control Panel. Then click on the arrow icon to go to your website. This will bring up the Joomla Installer. Change the language to US English and type in your site name. Then click Log in data. Enter your real name, Joomla admin username and password and type in the server connected email address we just created. Then click Setup database. Then click Install Joomla.

Step 8 Joomla Initial Configuration
Click Open Administrator. Then log into your Joomla website dashboard. Click No to Statistics. Then simplify the dashboard by unpublishing Latest Actions, Privacy Dashboard, Logged in Users, Popular Articles, Recently Added articles, Sample Data.

Then click Global Configuration, Site Tab. Scroll down and change Use URL rewriting from No to Yes. Then click on the System tab and change Session Lifetime from 15 minutes to 150 minutes. Then click Save and Close. Then click on your website name in the upper right corner of the Dashboard to view your site. Note that the Login form is published by default. To unpublish the Log in form, in the Dashboard, click Content, Site Modules. Then click on the green checkmark to unpublish the log in form. Then in the User Menu, click Log out.

Now that we have our Joomla website, we are ready to install Friendica on our subdomain washington.communitynetwork.us.

Step 9 Download Friendica Full and Addon files.
There are several ways to install Friendica. Most of these involve pasting a bunch of complex commands into your server terminal with an SSH session. We will use the manual install method which will allow us to install Friendica manually using the Hestia Control panel. We need to download two files. One is called full and the other is called addons. The easiest way to download the latest stable versions of both of these files is to go to the release announcements. Here is the link to the June 2022 release announcement page: https://friendi.ca/2022/06/11/friendica-2022-06-released/

Scroll down the page to the section called Using the Archive Files. There are two links in the first paragraph. Click on the first link to download the Full file. Then click on the second link to download the addons file. This will place both files into your Downloads folder. Create a new folder called Friendica and move both files to your Friendica folder:


We will install these zipped files using the Hestia file manager after we have added our Friendica subdomain and Friendica Database.

Step 10 Use Hestia to add your Friendica Subdomain
Go to your Hestia User account that we just used to install our Joomla website. Then click Add Web Domain. Type in the subdomain and the parent domain. Then click Create DNS zone and Enable mail. Then click Save and Back. Then click on the Edit Pencil icon for the subdomain to add an SSL certificate to the subdomain.


Step 11 Create a Friendica Database with Hestia
Normally, we would click DB. Then click Add Database. However, we need to give Friendica permission to use the database. We will therefore first create a Hestia blank database noting the access details. These include the hostname (which by default in Hestia is localhost), the database name, the database username, the database password. Before you click save, copy paste all of these to a Libre Writer document. In addition, in Advanced Options, change the charset from utf8 to utf8mb4. Then click Save and Close.


Step 12 Edit the Database with a root SSH session
Friendica needs the permission to create and delete fields and tables in its own database. To do this, we will need to create a Friendica database inside of our empty Hestia database. Open a root SSH session in your home computer terminal. Then enter the Maria DB console by typing this command:


Press Enter. The prompt will change to MariaDB [(None)]>

Next select your Friendica database (with use <database name>) where you replace <database name> with the database name of the Hestia database we just created. For example use user1_db1.

The terminal will reply that the database has been changed to your blank hestia database. Then create a datatabase called friendica by copy pasting this command with the semi-colon at the end of it.

CREATE DATABASE friendicadb;

Press Enter. Then create a database user called friendica with your Hestia database password by copy pasting this command but substituting your Hestia database password between the quotes:

CREATE USER 'friendica'@'localhost' IDENTIFIED BY 'your Hestia mysql password here';

Then grant the friendica database user full access to the database.

GRANT ALL ON friendicadb.* TO 'friendica'@'localhost';

Press Enter. Then copy paste:


Press Enter. Then copy paste.


This will return you to the root at ns1 prompt. Type exit and press Enter to close the SSH session.

Step 13 Install the Full and Addon Files with the Hestia File Manager
The Hestia File Manager can not unzip a tar.gz file. Therefore, we will need to use our Home laptop file manager to right click on each file and click Extract Here. Then right click on each extracted folder and click Compress. Keep it set for default which is zip. This will create two zipped files.

Back in the Hestia User account, click Files to open the Hestia File Manager. Then click web. Then click your subdomain name. Then click the public_html folder. By default, it has only two files called index.html and robots.txt. Click Add Files. Navigate to and select the Full zipped file. Wait for it to load. Then click Add Files again. Select the Addons zipped file and wait for it to load.


Then click on the three dots to the right of the Full zipped file and click Unzip. Unzipping created a friendica full folder which we do not want. Click on the Friendica Full unzipped folder to open it. Then click on the top checkbox to select all of the files and folders.


Then click Move. This will bring up the select folder screen. Click + web. Then click + your subdomain name. Then click the public_html folder. This will move all of the files from the friendica unzipped folder to the public_html folder. Go to the public_html folder and delete the now empty friendica unzipped folder. Also delete the friendica full zipped folder. Then unzip the addon.zip folder. This will createe a new folder called addon. Click on it to make sure it is not empty. Then go back to the public_html folder and delete the addon zipped folder.

Step 14 Prepare .htaccess file
e need to copy the .htaccess-dist file to the .htaccess to have working mod-rewrite. We can not just rename the .htaccess-dist file as we need to keep the htaccess-dist file because it is tracked by GIT and renaming will cause a dirty working directory. Click on the three dots to the right of the htaccess-dist file and click Copy. This brings up the select folder screen Click + web, then + subdomain then click on the public_html folder. Then click on the three dots to the right of the new file and rename it .htaccess.

Also rename index.html as old-index.html.

Then click Exit to Control Panel.

Step 15 Complete Friendica Installation Steps
Click on the hidden green arrow to the right of the subdomain to go to the website. The first screen is the System check:


Hopefully all will be green. Click Next. This brings up the Base Settings. Hopefully, these will be correct and you can leave the bottom URL Sub path box empty.


Click Submit. Next is the Database Connection. Cop[y paste your Hestia database server name (localhost), Database username, Database password and database name here.


Then click Submit. Next is the Site settings screen:


Enter an email address connected to your server. We will use

This email address is being protected from spambots. You need JavaScript enabled to view it.

and change the time zone to Los Angeles. Then click Submit.

This screen will appear: Installation finished… Your Friendica site database has been installed.

What’s next?
In the next article, we will go to the new Friendica website registration page and register as a new user. If we use the same email we entered as administrator email, we will enter the site admin panel. We will then review some first steps you should take as a new Friendica site administrator.