How to Install Friendica on Arch Linux

Friendica is an open-source social networking software that allows users to connect with friends, create and share content, and stay in touch with family and colleagues. In this tutorial, we will guide you through the process of installing Friendica on Arch Linux.

Prerequisites

Before we begin, ensure that you meet the following prerequisites:

Step 1: Install Required Packages

Friendica requires the following packages to be installed on your system. Execute the following command to install them:

sudo pacman -S php php-apcu php-gd php-intl php-pdo php-imagick php-curl php-fpm

Step 2: Configure PHP

Open the /etc/php/php.ini file using your favorite text editor and set the following variables:

memory_limit = 128M 
max_execution_time = 3600 
upload_max_filesize = 20M
post_max_size = 20M
date.timezone = Europe/Berlin (Set the timezone according to your region)

Once you've made the changes, save the file and restart the php-fpm service using the following command:

sudo systemctl restart php-fpm

Step 3: Install Friendica

  1. Go to the Friendica website https://friendi.ca/ and find the latest release version.
  2. Open the terminal and navigate to the directory where you want to install Friendica.
  3. Use curl to download the latest version of Friendica. For example:
curl -LO https://github.com/friendica/friendica/archive/refs/tags/2021.07.tar.gz
  1. After the download is complete, extract the files by running the following command:
tar -zxvf 2021.07.tar.gz
  1. Rename the extracted folder to "friendica" and move it to your web server's root directory. For example:
mv friendica-2021.07 friendica
sudo mv friendica /srv/http/
  1. Give ownership of the friendica directory to your web server. For example:
sudo chown -R http:http /srv/http/friendica
  1. To allow Friendica to write files, create a new directory named store in the friendica directory:
mkdir /srv/http/friendica/store
sudo chown -R http:http /srv/http/friendica/store

Step 4: Configure Friendica

  1. Copy the .htaccess-sample file to .htaccess in the friendica directory.
cd /srv/http/friendica/
cp .htaccess-sample .htaccess
  1. Open the .htaccess file and uncomment the RewriteBase line by removing the '#' character and setting the correct path to the friendica directory.

  2. Create a new database and database user for Friendica. For example:

sudo mysql -u root -p
CREATE DATABASE friendica;
GRANT ALL ON friendica.* TO 'friendica'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;
  1. Configure Friendica by editing the config/local.config.php file. For example:
cd /srv/http/friendica/
cp config/local.config.php.sample config/local.config.php
nano config/local.config.php
  1. In this file, set the database credentials and other configurations for your server. Refer to the sample file for available options.

  2. Save the file and close the editor.

Step 5: Test Friendica

  1. Open your web browser and navigate to http://localhost/friendica/.

  2. Follow the on-screen instructions to create a new Friendica account.

  3. After creating an account, you can start using Friendica.

Conclusion

In this tutorial, we showed you how to install Friendica on Arch Linux. Now you can run your own social network and enjoy features like connecting with friends, creating and sharing content, and staying in touch with family and colleagues.

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!