Installation Guide: Ubuntu 25.04

Friendica (formerly Friendika, originally Mistpark) is a free and open-source software distributed social network.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Installation Guide: Ubuntu 25.04

Post by FiendKing04 »

SECTION 1 — Introduction

Overview

Friendica is a decentralized social networking platform designed for interoperability, long‑form content, and broad federation across the Fediverse. Unlike microblog‑focused platforms, Friendica supports multiple protocols, flexible post formats, and a more traditional social‑networking model. This guide provides a complete, real‑world installation process for deploying Friendica on a modern Ubuntu 25.04 system using PHP 8.4, MariaDB, and Apache with a secure reverse‑proxy configuration.


Purpose of This Guide

The official documentation covers the fundamentals, but does not fully address the practical challenges encountered on current Linux distributions, particularly with newer PHP versions, updated module paths, and modern reverse‑proxy setups. This guide is designed to fill those gaps by providing:
  • A reproducible installation workflow.
  • Verified configuration examples.
  • Clear explanations of required components.
  • Troubleshooting notes based on real‑world behavior.
  • Cross‑references to deeper guides for Apache, PHP‑FPM, MariaDB, and federation.
The goal is to provide a reliable, end‑to‑end installation path that works on contemporary systems without guesswork.


Target Environment

This guide assumes the following environment:
  • Operating System: Ubuntu 25.04
  • Web Server: Apache 2.4 with SSL and reverse proxy modules
  • PHP: PHP 8.4 with required extensions
  • Database: MariaDB 10.x
  • HTTPS: SAN certificate or equivalent TLS configuration via Let's Encrypt (Certbot).
  • Deployment Model: Native installation
    • This mean no Docker.
  • Access: Public domain with DNS configured
If your environment differs, the general principles still apply, but configuration paths and module versions may vary.


Prerequisites

Before beginning, ensure you have:
  • A domain name pointed to your server’s public IP.
  • A valid TLS certificate (Let’s Encrypt or SAN certificate).
  • Basic familiarity with Linux command‑line operations.
  • Ability to edit Apache vHost files.
  • Ability to create and manage MariaDB databases.
  • A clean directory structure for hosting Friendica.
  • A working mail server or SMTP relay for notifications and password resets.
    • This is a hard requirement. You will not receive your temporary password to log in without it!
Optional but recommended:
  • Adminer or equivalent database management tool

Guide Structure

This installation guide is divided into the following sections:
  • Introduction (this section)
  • Prerequisites and System Preparation
  • Directory Layout and Permissions
  • Downloading Friendica
  • Apache Configuration (Reverse Proxy + PHP‑FPM)
  • PHP 8.4 Configuration
  • MariaDB Setup
  • Running the Installer
  • Post‑Installation Tasks
  • Federation Checklist
  • Troubleshooting
  • Maintenance and Updates
Each section is self‑contained and can be referenced independently. Additional deep‑dive guides (Apache, MariaDB, SMTP, Federation) will be linked where appropriate.
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 2 — Prerequisites and System Preparation

Post by FiendKing04 »

SECTION 2 — Prerequisites and System Preparation

System Requirements

Before installing Friendica, ensure your server meets the following baseline requirements:
  • Ubuntu 25.04 with current security updates.
  • Apache 2.4 with SSL and reverse‑proxy modules enabled.
  • PHP 8.4 with all required extensions.
  • MariaDB 10.x or compatible MySQL variant.
  • Valid TLS certificate (SAN certificate or Let’s Encrypt)
  • Public DNS record pointing to your server.
  • Minimum recommended resources: 2 CPU cores, 2 GB RAM
Friendica is lightweight, but background workers, federation tasks, and image processing benefit from additional CPU and memory.


Update the System

Ensure your server is fully updated before installing any components:

Code: Select all

sudo apt update & sudo apt full-upgrade
sudo reboot
A clean, updated base system prevents version mismatches and module conflicts later in the installation.


Install Required Packages

Install the core components needed for Friendica:

Code: Select all

sudo apt install apache2 mariadb-server php8.4 php8.4-fpm php8.4-cli php8.4-mysql php8.4-gd php8.4-curl php8.4-xml php8.4-mbstring php8.4-zip php8.4-intl php8.4-imagick php8.4-redis php8.4-opcache git unzip
Additional modules may be required depending on your configuration. The PHP section of this guide will provide a complete list.


Enable Required Apache Modules

Friendica requires Apache to operate as a reverse proxy to PHP‑FPM.
Enable the necessary modules:

Code: Select all

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_fcgi
sudo a2enmod ssl
sudo a2enmod rewrite
sudo a2enmod headers
These modules allow Apache to handle HTTPS, forward requests to PHP‑FPM, and support Friendica’s routing requirements.


Prepare the Database Server

Start and secure MariaDB:

Code: Select all

sudo systemctl enable --now mariadb
sudo mysql_secure_installation
You will create the Friendica database and user in Section 7, but MariaDB must be running and secured at this stage.


Verify PHP‑FPM Socket Path

Ubuntu 25.04 uses the following default socket:

Code: Select all

/run/php/php8.4-fpm.sock
Confirm it exists:

Code: Select all

ls -l /run/php/
If the socket is missing, restart PHP‑FPM:

Code: Select all

sudo systemctl restart php8.4-fpm
This path will be referenced in your Apache vHost configuration.


Directory Planning

Before downloading Friendica, decide where it will live. A clean, predictable directory structure prevents permission issues and simplifies future maintenance.

Recommended layout:

Code: Select all

/var/www/communication/social/friendica
You will create this directory in Section 3.


Next Steps

With the system prepared and all required components installed, you can proceed to:

SECTION 3 — Directory Layout and Permissions
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 3 — Directory Layout and Permissions

Post by FiendKing04 »

SECTION 3 — Directory Layout and Permissions

Overview

A clean and predictable directory structure is essential for a stable Friendica installation. Proper ownership and permissions ensure that Apache and PHP‑FPM can read and write required files without exposing unnecessary access to the rest of the system. This section defines the recommended layout and prepares the filesystem before downloading Friendica.


Create the Base Directory Structure

Choose a location that keeps your web applications organized and easy to maintain. The following structure is recommended for clarity and future scalability:

Code: Select all

/var/www/communication/social/friendica
Create the directory:

Code: Select all

sudo mkdir -p /var/www/communication/social/friendica
This path keeps Friendica grouped logically with other communication‑related services and avoids cluttering /var/www with unrelated applications.


Set Ownership

Apache (via PHP‑FPM) must be able to read and write to the Friendica directory. Assign ownership to the web server user:

Code: Select all

sudo chown -R www-data:www-data /var/www/communication/social/friendica
This ensures that Friendica can manage configuration files, logs, cache directories, and addon installations.


Set Permissions

Apply secure, predictable permissions:

Code: Select all

sudo chmod -R 755 /var/www/communication/social
This provides:
  • Read/execute access for all users
  • Write access only for the owner (www-data)
Friendica does not require world‑writable directories, and using restrictive permissions reduces the risk of accidental modification or exposure.

Code: Select all

Verify Directory State
Confirm the directory exists and is owned correctly:

Code: Select all

ls -ld /var/www/communication/social/friendica
Expected output:
  • Owner: www-data
  • Group: www-data
  • Permissions: drwxr-xr-x
If the ownership or permissions differ, correct them before proceeding.


Next Steps

With the directory structure prepared and permissions set, continue to:

SECTION 4 — Downloading Friendica
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 4 — Downloading Friendica

Post by FiendKing04 »

SECTION 4 — Downloading Friendica

Overview

This section covers how to obtain the Friendica source code and place it into the directory structure prepared in Section 3. The recommended method is to use Git, which simplifies updates and ensures you always have access to the latest stable release. A fallback method using a release tarball is also provided.


Recommended Method: Clone via Git

Using Git provides the cleanest upgrade path and allows you to switch between stable releases with minimal effort.

Navigate to the Friendica directory:

Code: Select all

cd /var/www/communication/social/friendica
Clone the stable branch:

Code: Select all

sudo -u www-data git clone https://github.com/friendica/friendica.git .
Clone the addons repository:

Code: Select all

sudo -u www-data git clone https://github.com/friendica/friendica-addons.git addons

Why Git?
  • Simplifies updates (git pull)
  • Ensures consistent versioning.
  • Provides access to tags and release history.
  • Avoids manual extraction and file replacement

Alternative Method: Download Release Tarball

If Git is not available or not preferred, you may download a release tarball from the official Friendica website or GitHub releases.

Download the latest stable release:

Code: Select all

wget https://github.com/friendica/friendica/archive/refs/tags/2024.XX.tar.gz
Extract the archive:

Code: Select all

tar -xvf 2024.XX.tar.gz
Move the extracted files into the Friendica directory:

Code: Select all

sudo cp -r friendica-2024.XX/* /var/www/communication/social/friendica/
Download and extract the addons package:

Code: Select all

wget https://github.com/friendica/friendica-addons/archive/refs/tags/2024.XX.tar.gz
tar -xvf 2024.XX.tar.gz
sudo cp -r friendica-addons-2024.XX /var/www/communication/social/friendica/addons
Important Notes for Tarball Users:
  • Updates require manually replacing files
  • Version mismatches can occur if addons and core are not from the same release
  • Git is strongly recommended for long‑term maintenance

Verify File Ownership

Regardless of installation method, ensure all files are owned by www-data:

Code: Select all

sudo chown -R www-data:www-data /var/www/communication/social/friendica
This prevents permission issues during installation and when Friendica writes configuration files.


Verify Directory Structure

After downloading, the Friendica directory should contain:
  • index.php
  • config/
  • view/
  • src/
  • addon/ or addons/
  • .htaccess
Confirm with:

Code: Select all

ls -l /var/www/communication/social/friendica
If any of these components are missing, re‑download or re‑clone the repository.


Next Steps

With Friendica downloaded and placed in the correct directory, proceed to:

SECTION 5 — Apache Configuration (Reverse Proxy + PHP‑FPM)
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 5 — Apache Configuration (HTTP vHost + Certbot + PHP‑FPM)

Post by FiendKing04 »

SECTION 5 — Apache Configuration (HTTP vHost + Certbot + PHP‑FPM)

Overview

Friendica runs best when served through Apache using PHP‑FPM. This section configures Apache to serve Friendica over HTTP, prepares the server for Let’s Encrypt certificate generation, and then enables HTTPS with a secure VirtualHost.

This approach ensures:
  • Certbot can complete the HTTP‑01 challenge
  • Apache redirects HTTP → HTTPS cleanly
  • PHP‑FPM is used consistently
  • Friendica’s .htaccess rules function correctly

Enable Required Apache Modules

Enable the necessary modules:
  • sudo a2enmod proxy
  • sudo a2enmod proxy_http
  • sudo a2enmod proxy_fcgi
  • sudo a2enmod rewrite
  • sudo a2enmod headers
  • sudo a2enmod ssl
Reload Apache:

Code: Select all

sudo systemctl reload apache2
Create the HTTP VirtualHost (Port 80)

Create the HTTP vHost file:

Code: Select all

sudo nano /etc/apache2/sites-available/friendica.conf
Insert the following configuration:

Code: Select all

<VirtualHost *:80>
    ServerName friendica.domain.tld

    DocumentRoot /var/www/communication/social/friendica

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

    # Allow Certbot to complete HTTP-01 challenges
    <Location /.well-known/acme-challenge/>
        Require all granted
    </Location>

    ErrorLog ${APACHE_LOG_DIR}/friendica-error.log
    CustomLog ${APACHE_LOG_DIR}/friendica-access.log combined
</VirtualHost>
Key Notes:
  • This vHost must be HTTP-only so Certbot can validate the domain.
  • AllowOverride All is required for Friendica’s .htaccess.
  • No redirect to HTTPS yet — Certbot will add it automatically.

Enable the Site

sudo a2ensite friendica.conf
sudo a2dissite 000-default.conf
sudo systemctl reload apache2



Obtain a Let’s Encrypt Certificate

Run Certbot with the Apache plugin:

Code: Select all

sudo certbot --apache -d friendica.domain.tld
Certbot will:
  • Detect the HTTP vHost
  • Create a new HTTPS vHost
  • Install the certificate
  • Add an automatic HTTP → HTTPS redirect

Reload Apache

Code: Select all

sudo systemctl reload apache2
After completion, you will have:
  • /etc/apache2/sites-available/friendica-le-ssl.conf (HTTPS vHost)
  • Automatic redirection from HTTP → HTTPS
  • Valid TLS certificates in /etc/letsencrypt/live/

Verify the HTTPS VirtualHost

Certbot generates the HTTPS vHost automatically.

Open it for review:

Code: Select all

sudo nano /etc/apache2/sites-available/friendica-le-ssl.conf
or

Code: Select all

sudo cat /etc/apache2/sites-available/friendica-le-ssl.conf
Ensure the following block exists inside the <VirtualHost *:443> section:

Code: Select all

<FilesMatch "\.php$">
    SetHandler "proxy:unix:/run/php/php8.4-fpm.sock|fcgi://localhost/"
</FilesMatch>
If it is missing, add it manually.

Important

The PHP‑FPM socket path must match your system:

Code: Select all

/run/php/php8.4-fpm.sock

Optional: Add HSTS

Inside the HTTPS vHost:

Code: Select all

Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
This enforces HTTPS for one year.

Reload Apache

Code: Select all

sudo systemctl reload apache2

Test the Domain

Open:

https://friendica.domain.tld

You should see:
  • A directory listing (if Friendica is not yet installed), or
  • The Friendica installer (if files are present and readable)
If you see an error page, check:
  • VirtualHost paths
  • Certificate paths
  • PHP‑FPM socket path
  • File permissions

Next Steps

With Apache configured and HTTPS enabled, continue to:

SECTION 6 — PHP 8.4 Configuration
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 6 — PHP 8.4 Configuration

Post by FiendKing04 »

SECTION 6 — PHP 8.4 Configuration

Overview

Friendica requires a properly configured PHP‑FPM environment with specific extensions enabled. This section ensures PHP 8.4 is installed, configured, and optimized for Friendica’s requirements. You will verify required modules, adjust key php.ini settings, and confirm that PHP‑FPM is running correctly.


Verify Required PHP Extensions

Friendica requires the following PHP 8.4 extensions:
  • curl
  • gd
  • xml
  • mbstring
  • zip
  • intl
  • imagick
  • json (bundled by default)
  • mysqli or pdo_mysql
  • opcache
  • redis (optional but recommended)
Verify installed modules:

Code: Select all

php8.4 -m
If any required modules are missing, install them:

Code: Select all

sudo apt install php8.4-<module>
Example:

Code: Select all

sudo apt install php8.4-intl php8.4-imagick

Configure PHP‑FPM

Edit the main PHP configuration file:

Code: Select all

sudo nano /etc/php/8.4/fpm/php.ini
Adjust the following recommended settings:

Code: Select all

memory_limit = 512M
upload_max_filesize = 20M
post_max_size = 20M
max_execution_time = 120
date.timezone = UTC
Notes
  • memory_limit of 512M ensures smooth operation during federation tasks and image processing.
  • upload_max_filesize and post_max_size can be increased if you expect large media uploads.
  • date.timezone must be set to avoid warnings in logs and the installer.
Save and exit.


Restart PHP‑FPM:

Code: Select all

sudo systemctl restart php8.4-fpm

Verify PHP‑FPM Service Status

Ensure PHP‑FPM is running:

Code: Select all

systemctl status php8.4-fpm
Expected state:

Code: Select all

active (running)
No errors in the service log.

If errors appear, review:

Code: Select all

sudo journalctl -u php8.4-fpm

Confirm the PHP‑FPM Socket Path

Friendica’s Apache vHost relies on the correct socket path:

Code: Select all

/run/php/php8.4-fpm.sock
Verify it exists:

Code: Select all

ls -l /run/php/
If the socket is missing:

Code: Select all

sudo systemctl restart php8.4-fpm

Optional: Enable and Tune OPcache

OPcache significantly improves performance and reduces CPU usage.

Edit:

Code: Select all

sudo nano /etc/php/8.4/fpm/conf.d/10-opcache.ini
Recommended settings:

Code: Select all

opcache.enable=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=20000
opcache.validate_timestamps=1
opcache.revalidate_freq=2
Restart PHP‑FPM again:

Code: Select all

sudo systemctl restart php8.4-fpm

Next Steps

With PHP 8.4 configured and PHP‑FPM running correctly, continue to:

SECTION 7 — MariaDB Setup
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 7 — MariaDB Setup

Post by FiendKing04 »

SECTION 7 — MariaDB Setup

Overview

Friendica requires a properly configured MariaDB (or MySQL‑compatible) database to store user accounts, posts, configuration data, and federation metadata. This section covers creating the database, creating a dedicated user, assigning secure permissions, and preparing the environment for the Friendica installer.


Secure the MariaDB Installation

If you have not already run the security script, do so now:

Code: Select all

sudo mysql_secure_installation
Recommended responses:
  • Set root password: Yes
  • Remove anonymous users: Yes
  • Disallow remote root login: Yes
  • Remove test database: Yes
  • Reload privilege tables: Yes
This ensures your database server is locked down before creating application‑specific databases.


Log In to MariaDB

Access the MariaDB shell:

Code: Select all

sudo mysql
You should now see the MariaDB [(none)]> prompt.


Create the Friendica Database

Create a dedicated database using UTF8MB4, which is required for full Unicode and emoji support:

Code: Select all

CREATE DATABASE friendica CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

Create a Dedicated Database User

Create a user with a strong password. Replace STRONGPASSWORD with your own secure value:

Code: Select all

CREATE USER 'friendica'@'localhost' IDENTIFIED BY 'STRONGPASSWORD';

Grant Required Permissions

Grant the Friendica user full access to the Friendica database:

Code: Select all

GRANT ALL PRIVILEGES ON friendica.* TO 'friendica'@'localhost';

Apply the changes:

Code: Select all

FLUSH PRIVILEGES;

Exit MariaDB


Leave the MariaDB shell:

Code: Select all

EXIT;
Optional: Verify Database and User

You can verify the database and user were created correctly:

Code: Select all

sudo mysql -e "SHOW DATABASES;"
sudo mysql -e "SELECT User, Host FROM mysql.user;"
You should see:
  • A database named friendica
  • A user named friendica with host localhost

Adminer Note (Important)

If you use Adminer or another database management tool:
  • Always select the correct database (friendica) before running queries.
  • Adminer does not persist the selected database between sessions.
  • Running queries in the wrong database can cause schema mismatches or installation failures.
This is one of the most common causes of silent errors during Friendica setup.

Next Steps

With the database created and permissions configured, continue to:

SECTION 8 — SMTP Setup
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 8 — SMTP Setup (Required Before Installation)

Post by FiendKing04 »

SECTION 8 — SMTP Setup (Required Before Installation)

Overview

Friendica requires and assumes a working SMTP server before running the installer. The installer sends the administrator login link or password via email, and without a functioning mail setup, you will be locked out of your new node.

This section ensures outbound email is configured, authenticated, encrypted, and tested before proceeding to the Friendica installer.

This guide uses a generic SMTP configuration that works with any provider, including:
  • Mailgun
  • Postmark
  • SendGrid
  • Proton Mail (via Bridge)
  • mailbox.org
  • Migadu
  • Gmail (app password required)
  • Your own mail server (Postfix, Stalwart, etc.)

Verify Your SMTP Credentials

Before configuring Friendica, gather the following information from your mail provider:
  • SMTP server hostname
  • SMTP port (usually 587 for TLS)
  • Encryption type (TLS or SSL)
  • SMTP username
  • SMTP password or app‑specific password
If you are using your own mail server, confirm:
  • Authentication works
  • TLS certificates are valid
  • Outbound mail is permitted

Test SMTP Connectivity

Install swaks (Swiss Army Knife for SMTP):

Code: Select all

sudo apt install swaks

Send a test email:

Code: Select all

swaks --to user@domain.tld \
      --from user@domain.tld \
      --server smtp.emailprovider.tld \
      --auth \
      --auth-user username \
      --auth-password password \
      --tls
A successful test will show:
  • 250 OK after sending
  • No authentication errors
  • No TLS handshake failures
If the test fails, fix SMTP before continuing.


Configure SMTP for Friendica

Open the Friendica configuration directory:

Code: Select all

sudo nano /var/www/communication/social/friendica/config/local.config.php
Add or update the mail block:

Code: Select all

'mail' => [
    'smtp' => true,
    'smtp_server' => 'smtp.yourprovider.tld',
    'smtp_port' => 587,
    'smtp_secure' => 'tls',
    'smtp_username' => 'username',
    'smtp_password' => 'password',
],
Save and exit.

Restart PHP‑FPM:

Code: Select all

sudo systemctl restart php8.4-fpm

Verify DNS Records (Recommended)

To avoid spam filtering, ensure your domain has:
  • SPF
  • DKIM
  • DMARC
Your mail provider will supply the correct DNS entries.


Send a Final Test Email

Use your mail provider’s web UI or your local mail client to send a message from the same account Friendica will use.

Confirm:
  • Delivery is successful
  • No spam folder issues
  • No authentication warnings
Once outbound mail is confirmed working, you are ready to run the Friendica installer.


Next Steps

With SMTP configured and tested, continue to:

SECTION 9 — Running the Installer

This ensures the administrator login email is delivered correctly during installation.
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 9 — Running the Installer

Post by FiendKing04 »

SECTION 9 — Running the Installer

Overview

With Apache, PHP‑FPM, MariaDB, and SMTP fully configured, you are ready to run the Friendica web installer. This section walks through the installation process, explains what each step should look like, and provides solutions for common issues such as missing labels, blank pages, or configuration write failures.

Because your mail server is already operational, the installer will be able to send the administrator login email without issues.

Access the Installer

Open your Friendica domain in a browser:

Code: Select all

https://friendica.domain.tld
If everything is configured correctly, you should see the Friendica Installation Wizard.

If you instead see:
  • A directory listing → Friendica files are missing
  • A blank page → PHP error or missing module
  • An Apache error → vHost or permissions issue
Refer to the troubleshooting notes at the end of this section.


Step 1: System Check

The installer will perform an environment check and display:
  • Required PHP modules
  • Recommended PHP modules
  • File permissions
  • Database connectivity prerequisites
All required items must show OK before proceeding.

If something is missing, revisit Section 6 (PHP Configuration).


Ensure ownership is correct:

Code: Select all

sudo chown -R www-data:www-data /var/www/communication/social/friendica
  • Ensure .htaccess is readable
  • Ensure Apache’s AllowOverride All is enabled

Step 2: Database Configuration

Enter the database details created in Section 7:
  • Database Type: MySQL/MariaDB
  • Hostname: localhost
  • Database Name: friendica
  • User: friendica
  • Password: (your secure password)
Click Check Database.

If successful, the installer will confirm that the database is reachable and ready.

If you receive a connection error:
  • Ensure MariaDB is running
  • Ensure the user was created with 'localhost'
  • Ensure the password is correct
  • Ensure the database exists
  • Ensure no firewall rules block local connections

Step 3: Create the Configuration File

Friendica will attempt to write:

Code: Select all

/var/www/communication/social/friendica/config/local.config.php
If the installer reports it cannot write the file:

Fix permissions:

Code: Select all

sudo chown -R www-data:www-data /var/www/communication/social/friendica/config
sudo chmod 755 /var/www/communication/social/friendica/config
Then click Retry.

If writing still fails:

The installer will provide the configuration contents.

Copy them manually into:

Code: Select all

/var/www/communication/social/friendica/config/local.config.php
Ensure the file is owned by www-data:

Code: Select all

sudo chown www-data:www-data /var/www/communication/social/friendica/config/local.config.php

Step 4: Administrator Account Setup

Friendica will ask for:
  • Administrator email address
  • Administrator username
  • Administrator password (sent via email)
Important:

Because SMTP was configured and tested in Section 8, Friendica will successfully send the temporary login link or password to the administrator email.

If you do not receive the email:
  • Check your mail server logs
  • Check spam/junk folders
  • Verify DNS records (SPF, DKIM, DMARC)
  • Ensure outbound mail is not being blocked

Step 5: Finalization

Once the configuration file is created and the database is initialized, Friendica will:
  • Create required tables
  • Populate initial data
  • Set up the administrator account
  • Redirect you to the login page
If everything is successful, you will see the Friendica login screen.


Common Installer Issues and Fixes
  • Blank Page
Usually caused by:
  • Missing PHP modules
  • PHP‑FPM errors
  • Incorrect socket path
  • Fatal PHP error
Check logs:

Code: Select all

sudo journalctl -u php8.4-fpm
sudo tail -f /var/log/apache2/error.log
  • Missing Labels or Empty Buttons
This is a known issue when:
  • PHP intl module is missing
  • gettext support is missing
  • Locale is not configured
Fix:

Code: Select all

sudo apt install php8.4-intl
sudo systemctl restart php8.4-fpm
  • “Cannot write config file”
Fix permissions:

Code: Select all

sudo chown -R www-data:www-data /var/www/communication/social/friendica/config
sudo chmod 755 /var/www/communication/social/friendica/config
  • Database Schema Errors
Often caused by:
  • Running installer in the wrong database
  • Adminer not selecting the correct DB
  • Partial schema from a failed install
Fix:

Code: Select all

DROP DATABASE friendica;
CREATE DATABASE friendica CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Then restart the installer.

Next Steps

With the installer complete and Friendica initialized, continue to:

SECTION 10 — Post‑Installation Tasks

This includes:
  • Cron/worker setup
  • Base URL configuration
  • Addon activation
  • Performance tuning
  • Federation verification
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

SECTION 10 — Post‑Installation Tasks

Post by FiendKing04 »

SECTION 10 — Post‑Installation Tasks

Overview

After completing the Friendica installer, several essential post‑installation tasks must be performed to ensure your node operates reliably, federates correctly, and remains maintainable. This section covers:
  • Worker/cron setup
  • Base URL verification
  • Addon activation
  • Performance tuning
  • Log configuration
  • Initial system health checks
These steps prepare your instance for full federation (covered in Section 11).

Worker / Cron Setup (Required)
  • Friendica relies on background workers to:
  • Process incoming and outgoing federation messages
  • Deliver posts and notifications
  • Clean up queues
  • Perform scheduled maintenance
Without a working cron job, your node will not federate.

Create the Cron Job

Run:

Code: Select all

sudo -u www-data crontab -e
Add:

Code: Select all

*/10 * * * * php /var/www/communication/social/friendica/bin/console.php cron
This runs the worker every 10 minutes, which is the recommended interval.


Verify Cron Installation

Code: Select all

sudo -u www-data crontab -l
You should see the entry you added.


Check Worker Activity

In the Friendica administrator panel:

Adminstrator → Summary → Background Tasks

You should see:
  • Tasks running regularly
  • No long‑stalled tasks
  • No growing backlog

Verify Base URL (Required)

Friendica must know its public URL for:
  • Federation
  • WebFinger
  • ActivityPub signatures
  • Internal routing

Go to:

Administrator Panel → Site → General

Ensure:
If this is incorrect, federation will fail.


Enable Recommended Addons

Friendica includes several useful addons. Common recommendations:
  • frio — default modern theme
  • markdown — Markdown support
  • notifyall — administrator broadcast messages
  • openstreetmap — map integration
  • diaspora — Diaspora federation (optional)
Enable addons from:

Administrator Panel → Addons


Performance Tuning (Optional but Recommended)

Enable Worker Daemon Mode

This allows Friendica to run a persistent worker process for faster federation.

Add to local.config.php:

Code: Select all

'worker' => [
    'daemon_mode' => true,
],
Restart PHP‑FPM:

Code: Select all

sudo systemctl restart php8.4-fpm

Enable Caching (Redis Recommended)

If Redis is installed:

Code: Select all

sudo apt install redis-server
Add to local.config.php:

Code: Select all

'system' => [
    'cache_driver' => 'redis',
    'redis_host' => '127.0.0.1',
],
This improves performance and reduces database load.


Configure Logging (Optional)

Friendica logs can help diagnose federation issues.

Enable logging in local.config.php:

Code: Select all

'logger' => [
    'level' => 'notice',
    'syslog' => false,
    'file' => '/var/www/communication/social/friendica/friendica.log',
],

Ensure permissions:

Code: Select all

sudo chown www-data:www-data /var/www/communication/social/friendica/friendica.log

Initial Health Checks

Check PHP‑FPM

Code: Select all

sudo journalctl -u php8.4-fpm

Check Apache

Code: Select all

sudo tail -f /var/log/apache2/error.log

Check Friendica Log

Code: Select all

tail -f /var/www/communication/social/friendica/friendica.log
Look for:
  • Signature errors
  • HTTPS issues
  • Worker failures
  • Database errors

Next Steps

With post‑installation tasks complete, continue to:


SECTION 11 — Federation Checklist

This section verifies:
  • WebFinger
  • NodeInfo
  • Worker queue
  • Remote profile discovery
  • Inbound/outbound federation
  • HTTPS correctness
  • Ensuring your node is fully integrated into the Fediverse.
I make the best FK'ing Projects around.
Locked