Page 1 of 1

Quick Start Guide: Ubuntu 25.04

Posted: March 13th, 2026, 10:02 pm
by FiendKing04
QUICK START — Friendica Installation (Ubuntu 25.04 + PHP 8.4)
A condensed, copy‑paste‑ready version of the full 15‑section guide.

1. System Prep
Code
sudo apt update && sudo apt upgrade -y
sudo apt install apache2 mariadb-server redis-server unzip git -y
2. PHP 8.4 + Modules
Code
sudo apt install php8.4 php8.4-fpm php8.4-cli php8.4-mysql php8.4-xml \
php8.4-mbstring php8.4-curl php8.4-gd php8.4-intl php8.4-zip php8.4-redis -y
Restart:

Code
sudo systemctl restart php8.4-fpm
3. MariaDB Setup
Code
sudo mysql -e "CREATE DATABASE friendica CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
sudo mysql -e "CREATE USER 'friendica'@'localhost' IDENTIFIED BY 'STRONGPASSWORD';"
sudo mysql -e "GRANT ALL PRIVILEGES ON friendica.* TO 'friendica'@'localhost';"
sudo mysql -e "FLUSH PRIVILEGES;"
4. Download Friendica
Code
sudo mkdir -p /var/www/communication/social
cd /var/www/communication/social
sudo git clone https://github.com/friendica/friendica.git
sudo git clone https://github.com/friendica/friendica-addons.git friendica/addon
sudo chown -R www-data:www-data friendica
Install dependencies:

Code
cd friendica
sudo -u www-data bin/composer.phar install --no-dev
5. Apache HTTP vHost (for Certbot)
Code
sudo nano /etc/apache2/sites-available/friendica.conf
Paste:

Code
<VirtualHost *:80>
ServerName friendica.domain.tld
DocumentRoot /var/www/communication/social/friendica
<Directory /var/www/communication/social/friendica>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Enable:

Code
sudo a2enmod proxy proxy_fcgi rewrite headers ssl
sudo a2ensite friendica.conf
sudo systemctl reload apache2
6. Let’s Encrypt Certificate
Code
sudo certbot --apache -d friendica.domain.tld
Certbot creates the HTTPS vHost automatically.

Add PHP‑FPM handler to the HTTPS vHost:

Code
<FilesMatch "\.php$">
SetHandler "proxy:unix:/run/php/php8.4-fpm.sock|fcgi://localhost/"
</FilesMatch>
Reload:

Code
sudo systemctl reload apache2
7. SMTP Setup (Required Before Installer)
Install swaks:

Code
sudo apt install swaks
Test SMTP:

Code
swaks --to you@domain.tld --from you@domain.tld \
--server smtp.provider.tld --auth --auth-user USER --auth-password PASS --tls
Add to local.config.php after install:

Code
'mail' => [
'smtp' => true,
'smtp_server' => 'smtp.provider.tld',
'smtp_port' => 587,
'smtp_secure' => 'tls',
'smtp_username' => 'USER',
'smtp_password' => 'PASS',
],
8. Run the Installer
Visit:

Code
https://friendica.domain.tld
Enter:

DB name: friendica

DB user: friendica

DB pass: your password

Admin email: must match working SMTP

If config file cannot be written:

Code
sudo chown -R www-data:www-data /var/www/communication/social/friendica/config
9. Cron / Worker Setup
Code
sudo -u www-data crontab -e
Add:

Code
*/10 * * * * php /var/www/communication/social/friendica/bin/console.php cron
10. Base URL
Admin Panel → Site → General

Set:

Code
https://friendica.domain.tld
(No trailing slash.)

11. Federation Checks
Verify:

Code
https://friendica.domain.tld/.well-know ... domain.tld
https://friendica.domain.tld/nodeinfo/2.0
Test:

Remote profile discovery

Outbound posts

Inbound replies

Queue processing

12. Updates
Code
cd /var/www/communication/social/friendica
sudo -u www-data git pull
sudo -u www-data bin/composer.phar install --no-dev
sudo -u www-data bin/console.php dbstructure update
13. Backups
Database:

Code
mysqldump -u root -p friendica > friendica.sql
Files:

Code
tar -czf friendica-files.tar.gz /var/www/communication/social/friendica
14. Logs
Friendica:

Code
tail -f friendica/friendica.log
Apache:

Code
sudo tail -f /var/log/apache2/error.log
PHP‑FPM:

Code
sudo journalctl -u php8.4-fpm
15. Security Hardening (Optional)
Enable HSTS

Disable unused Apache modules

Harden PHP (display_errors=Off)

Enable UFW firewall

Install Fail2Ban