Friendica is a free and open-source social networking software that allows you to create and run your own social networking site. It provides features like content sharing, privacy settings, and integration with other social networks.
In this tutorial, we will show you how to install the Friendica software on EndeavourOS.
Before proceeding with this tutorial, make sure you have the following:
First, update the system package list and install required packages:
sudo pacman -Syu
sudo pacman -S unzip curl wget mariadb php php-gd php-intl php-pgsql php-curl php-cli php-mbstring php-dom php-opcache php-json php-mysqli
Create a new directory for the Friendica software and navigate to it:
sudo mkdir /var/www/friendica
cd /var/www/friendica
Next, download the Friendica ZIP file from GitHub:
sudo wget https://github.com/friendica/friendica/archive/refs/tags/2022.05.zip
sudo unzip 2022.05.zip
sudo mv friendica-2022.05/* /var/www/friendica/
sudo rm -rf friendica-2022.05 2022.05.zip
sudo chown -R www-data:www-data /var/www/friendica
Log in to the MariaDB shell:
sudo mariadb -u root
In the MariaDB shell, create a new database and user with privileges for the Friendica software:
CREATE DATABASE friendica;
CREATE USER 'friendica'@'localhost' IDENTIFIED BY 'your_strong_password';
GRANT ALL PRIVILEGES ON friendica.* TO 'friendica'@'localhost';
FLUSH PRIVILEGES;
exit
Make sure to replace your_strong_password
with a secure password of your choice.
Create a new virtual host configuration file for the Friendica site:
sudo nano /etc/httpd/conf/sites-available/friendica.conf
Paste the following configuration into the file:
<VirtualHost *:80>
ServerAdmin webmaster@friendica.example.com
ServerName friendica.example.com
DocumentRoot /var/www/friendica
<Directory /var/www/friendica>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/friendica_error.log
CustomLog /var/log/httpd/friendica_access.log combined
</VirtualHost>
Make sure to replace friendica.example.com
with your own domain name. You can also change the log file paths if desired.
Save and close the file.
Next, enable the new virtual host configuration and restart Apache:
sudo ln -s /etc/httpd/conf/sites-available/friendica.conf /etc/httpd/conf/sites-enabled/
sudo systemctl restart httpd
If you want to secure your Friendica site with HTTPS, you can use Let's Encrypt to generate SSL certificates for free.
Install the certbot package:
sudo pacman -S certbot python-certbot-apache
Next, run the certbot command to generate SSL certificates for your domain and configure Apache to use them:
sudo certbot --apache -d friendica.example.com
Follow the prompts to create and install the certificates, and configure Apache to use HTTPS.
Navigate to your Friendica site and complete the installation process via the web interface.
Visit http://friendica.example.com
(replace with your own domain name) in your web browser.
Follow the prompts to complete the installation process, providing the required database and server settings.
Congratulations! You have successfully installed Friendica on EndeavourOS.
In this tutorial, you learned how to install Friendica on EndeavourOS. You also learned how to configure MariaDB, Apache, and SSL certificates (optional) to run a complete social networking site with Friendica.
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!