How to Install Friendica on MXLinux Latest

Friendica Logo

Friendica is a free, open-source, and decentralized social network platform that allows users to interact with each other over the internet. In this tutorial, we will guide you through the process of installing Friendica on MXLinux Latest.

Prerequisites

Before proceeding with this tutorial, you will need the following:

Step 1: Download Friendica

Go to the official Friendica website and download the latest stable release of Friendica source code. You can use the wget command to download the file directly from the terminal:

$ wget https://github.com/friendica/friendica/archive/refs/tags/2022.01.tar.gz

This will download the latest Friendica source code into your current working directory.

Step 2: Extract Friendica Archive

Once the download is completed, extract the Friendica archive to the document root directory of your web server. You can use the tar command to extract the archive:

$ tar -xvzf 2022.01.tar.gz -C /var/www/html

This command will extract the source code to /var/www/html/friendica-2022.01 directory. You can change the directory name to friendica to make it easier to remember:

$ mv /var/www/html/friendica-2022.01 /var/www/html/friendica

Step 3: Create Friendica Configuration File

Friendica requires a configuration file to be created before it can be installed. Change to the friendica directory and copy the sample configuration file:

$ cd /var/www/html/friendica
$ cp .htconfig.php.sample .htconfig.php

Step 4: Configure Friendica

Edit the .htconfig.php file and update the following parameters with your server's configuration:

$vi .htconfig.php

$db_host = 'localhost';      // Your database hostname
$db_port = '';               // Your database port (default: 3306)
$db_name = '';               // Your database name
$db_user = '';               // Your database username
$db_pass = '';               // Your database password
$basepath = '';              // Your Friendica URL (e.g. https://example.com)

Step 5: Create Friendica Database

Create a new MySQL database and user for Friendica:

$mysql -u root -p

Enter the MySQL root password to log in to the MySQL shell:

mysql> create database friendica;
mysql> grant all privileges on friendica.* to 'friendicauser'@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit;

Update the db_name, db_user, and db_pass variables in the .htconfig.php file with the MySQL database details you just created.

$vi .htconfig.php

$db_host = 'localhost';
$db_port = '';
$db_name = 'friendica';
$db_user = 'friendicauser';
$db_pass = 'password';
$basepath = '';

Step 6: Set Directory Permissions

Set the correct directory permissions for the Friendica installation directory:

$sudo chown -R www-data:www-data /var/www/html/friendica
$sudo chmod -R 755 /var/www/html/friendica

Step 7: Configure Web Server

Configure your web server to serve the Friendica installation directory:

For example, if you are using Apache, create a new virtual host configuration file in /etc/apache2/sites-available/friendica.conf:

$cd /etc/apache2/sites-available/
$vi friendica.conf

And, paste the following configuration:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/friendica

    <Directory /var/www/html/friendica>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/friendica_error.log
    CustomLog ${APACHE_LOG_DIR}/friendica_access.log combined
</VirtualHost>

Enable the new virtual host and restart Apache:

$sudo a2ensite friendica.conf
$sudo systemctl restart apache2

Step 8: Access Friendica Installation

Open your web browser and enter the Friendica installation URL in the address bar: http://your-ip-address/friendica. Follow the on-screen instructions to complete the Friendica installation process.

Congratulations! You have successfully installed Friendica on MXLinux Latest. You can now host your own social network platform and invite your friends to join you.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!