Friendica

Friendica is a decentralized social networking platform that you can install on your own server. Here’s a step-by-step guide to installing Friendica on a Linux server.

Prerequisites
A VPS or dedicated server (Ubuntu/Debian recommended)
LAMP or LEMP stack (Apache/Nginx, MySQL/MariaDB, PHP)
Domain name (Optional but recommended)
SSL certificate (Let's Encrypt or another provider)
Step 1: Update Your Server
Before starting, update your system packages:

bash
Copy
Edit
--------------
sudo apt update && sudo apt upgrade -y
--------------

Step 2: Install Required Packages
Install Apache, MariaDB, and PHP
bash
Copy
Edit
----------------

sudo apt install apache2 mariadb-server php php-cli php-mysql php-gd php-curl php-xml php-mbstring unzip -y
-----------------

Enable Apache Modules
bash
Copy
Edit
-------------------
sudo a2enmod rewrite headers ssl
sudo systemctl restart apache2

-------------------
Step 3: Set Up Database
Log into MariaDB:

bash
Copy
Edit

------------------
sudo mysql -u root -p
------------------
Create a new database and user:
sql
Copy
Edit
--------------------------
CREATE DATABASE friendica;
CREATE USER 'friendica_user'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON friendica.* TO 'friendica_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
-------------------
Step 4: Download and Configure Friendica
Download Friendica:
bash
Copy
Edit
------------------------
cd /var/www
git clone https://github.com/friendica/friendica.git friendica
cd friendica
git clone https://github.com/friendica/friendica-addons.git addon
-----------------------
Set Correct Permissions:
bash
Copy
Edit
-------------------------
sudo chown -R www-data:www-data /var/www/friendica
sudo chmod -R 755 /var/www/friendicaStep 5: Configure Apache
-------------------------
Create a new virtual host file:

bash
Copy
Edit
----------------------
sudo nano /etc/apache2/sites-available/friendica.conf
-----------------------
Add the following configuration (replace yourdomain.com with your actual domain):
bash
Copy
Edit
-------------
<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/friendica

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

    ErrorLog ${APACHE_LOG_DIR}/friendica_error.log
    CustomLog ${APACHE_LOG_DIR}/friendica_access.log combined
</VirtualHost>
-----------------
Enable the site and restart Apache:

bash
Copy
Edit
---------------------
sudo a2ensite friendica
sudo systemctl reload apache2
-----------------------
Step 6: Secure with Let's Encrypt (SSL)
If you have a domain, install Let's Encrypt SSL:

bash
Copy
Edit
------------------------
sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d yourdomain.com
-------------------------
Step 7: Run the Friendica Web Installer
Open your browser and go to http://yourdomain.com
Follow the on-screen instructions:
Enter the database details
Configure site settings
Create an admin account
Step 8: Set Up a Cron Job
For background tasks, add a cron job:

bash
Copy
Edit
-----------------------
sudo crontab -e
-----------------------
Add the following line:

bash
Copy
Edit
--------------------
*/10 * * * * cd /var/www/friendica && php bin/worker.php
----------------------
This ensures Friendica runs periodic maintenance tasks.

Step 9: Finalize Installation
Log in to your Friendica instance
Customize settings
Install addons (Settings > Addons)
Invite friends and federate with other networks!
That’s it! 🎉 Your Friendica instance is now live.

Views: 26

Odd T.C.