Friendica is a free and open-source social networking platform that allows you to create and join social networks. It is designed to be decentralized, and it supports all major social network protocols such as Diaspora, OStatus, and even more.
In this tutorial, you will learn how to install Friendica on Clear Linux which is an open source, rolling release Linux distribution.
Before starting with the installation of Friendica, please make sure that you have the following prerequisites installed and configured on your Clear Linux machine:
From the terminal, update Clear Linux
sudo swupd update
Install Apache web server and PHP (7.2 or latest)
sudo swupd bundle-add httpd php-basic
Start the Apache web server and enable it to start on boot
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
Verify that Apache is running by visiting the following URL in your web browser
http://localhost
You should see a message stating "It works!".
Install MariaDB server
sudo swupd bundle-add mariadb
Start the MariaDB server and enable it to start on boot
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
Secure the MariaDB installation, set the root password, and remove the anonymous users
sudo mysql_secure_installation
Create a new MariaDB database and user for Friendica
sudo mysql -u root -p
CREATE DATABASE friendica;
GRANT ALL PRIVILEGES ON friendica.* TO 'friendicauser'@'localhost' IDENTIFIED BY 'NewPassword';
FLUSH PRIVILEGES;
EXIT;
Replace 'NewPassword' with a strong password of your choice.
From the terminal, switch to the root user and navigate to the document root directory of the Apache web server
sudo su
cd /var/www/html/
Download the latest stable release of Friendica from the official website
sudo wget -O friendica.zip https://github.com/friendica/friendica/archive/2022.01.zip
sudo unzip friendica.zip
Please note that in the above command, we are downloading the 2022.01
branch. You may replace this with the latest stable version.
Rename the extracted folder to "friendica" and adjust the permissions
mv friendica-* friendica
chown -R apache:apache friendica
Copy the sample configuration files to the correct locations
cd friendica
cp .htconfig.php.sample .htconfig.php
cp config/addon.config.php.sample config/addon.config.php
Configure the .htconfig.php file
nano .htconfig.php
Enter the database credentials that you created in Step 2:
$db_host = 'localhost';
$db_user = 'friendicauser';
$db_pass = 'NewPassword';
$db_data = 'friendica';
Set your site URL
$a->config['system']['url'] = 'http://localhost/friendica';
Save and close the .htconfig.php file.
Restart the Apache web server
sudo systemctl restart httpd.service
Open a web browser and enter the URL of your Friendica installation
http://localhost/friendica
The installation wizard should start. Follow the on-screen instructions to complete the installation.
Once the installation is complete, log in to your Friendica admin panel by adding /admin
to the end of the URL
http://localhost/friendica/admin
Use the admin account details entered during the installation to log in.
To add new users to your Friendica instance, use the registration link shown in the admin panel.
Congratulations, you have successfully installed Friendica on Clear Linux.
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!
Alternatively, for the best virtual desktop, try Shells!