Installazione software · 8 min read · Dec 21, 2025
Come installare la piattaforma di social network Friendica su Ubuntu 20.04

Friendica è una piattaforma di social networking gratuita, open-source e decentralizzata che ti aiuta a costruire e mantenere i tuoi progetti di social networking. Ha supporto integrato per ActivityPub, inclusi Mastodon, Hubzilla, OStatus, Pleroma e altro ancora. Ti consente di importare i tuoi siti web e blog nel tuo flusso sociale tramite feed RSS/Atom. Fornisce un potente cruscotto per utenti e amministratori che ti aiuta a gestire la tua rete sociale da qualsiasi dispositivo.
In questo tutorial, ti mostreremo come installare Friendica con Apache e Let’s Encrypt SSL su Ubuntu 20.04.
Prerequisiti
- Un server che esegue Ubuntu 20.04.
- Un nome di dominio valido puntato al tuo IP del server.
- Una password di root configurata sul server.
Iniziare
Prima di iniziare, dovrai aggiornare i pacchetti del tuo sistema all’ultima versione. Puoi aggiornarli utilizzando il seguente comando:
apt-get update -yUna volta aggiornato il tuo server, puoi procedere al passaggio successivo.
Installa il server LAMP
Friendica funziona su un server web, scritto in PHP e utilizza MySQL come backend del database. Quindi, lo stack LAMP deve essere installato nel tuo sistema. Se non è installato, puoi installarlo con il seguente comando:
apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-gmp php-curl php-intl php-mbstring php-xmlrpc php-mysql php-gd php-imagick php-xml php-cli php-zip php-sqlite3 curl git -yUna volta installati tutti i pacchetti, modifica il file php.ini e apporta alcune modifiche:
nano /etc/php/7.4/apache2/php.iniCambia le seguenti righe:
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 300
max_input_vars = 1500
date.timezone = Asia/KolkataSalva e chiudi il file quando hai finito.
Crea un database Friendica
Successivamente, dovrai creare un database e un utente per Friendica. Prima, connettiti a MySQL con il seguente comando:
mysqlUna volta connesso, crea un database e un utente con il seguente comando:
MariaDB [(none)]> CREATE DATABASE friendicadb;
MariaDB [(none)]> CREATE USER 'friendica'@'localhost' IDENTIFIED BY 'password';Successivamente, concedi tutti i privilegi al database Friendica con il seguente comando:
MariaDB [(none)]> GRANT ALL ON friendicadb.* TO 'friendica'@'localhost' WITH GRANT OPTION;Successivamente, svuota i privilegi ed esci da MySQL con il seguente comando:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;Una volta finito, puoi procedere al passaggio successivo.
Scarica Friendica
Prima di scaricare Friendica, dovrai installare Composer nel tuo sistema. Puoi installarlo con il seguente comando:
apt-get install composer -yUna volta installato, cambia la directory nella radice web di Apache e scarica l’ultima versione di Friendica dal repository Git:
cd /var/www/html
git clone https://github.com/friendica/friendica.gitUna volta completato il download, cambia la directory in friendica e installa le dipendenze PHP richieste con il seguente comando:
cd friendica
composer install --no-devSuccessivamente, scarica gli addon di Friendica con il seguente comando:
git clone https://github.com/friendica/friendica-addons.gitSuccessivamente, imposta la corretta proprietà e i permessi sulla directory friendica:
chown -R www-data:www-data /var/www/html/friendica/
chmod -R 755 /var/www/html/friendica/Una volta finito, puoi procedere al passaggio successivo.
Configura Apache per Friendica
Successivamente, dovrai creare un file di configurazione del virtual host di Apache per ospitare Friendica. Puoi crearlo con il seguente comando:
nano /etc/apache2/sites-available/friendica.confAggiungi le seguenti righe:
ServerAdmin [email protected]
DocumentRoot /var/www/html/friendica
ServerName friendica.example.com
Options +FollowSymlinks
AllowOverride All
Require all granted
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Salva e chiudi il file, quindi abilita il virtual host di Apache e il modulo di riscrittura con il seguente comando:
a2ensite friendica.conf
a2enmod rewriteSuccessivamente, ricarica il servizio Apache per applicare le modifiche:
systemctl restart apache2Puoi verificare lo stato del servizio Apache con il seguente comando:
systemctl status apache2Dovresti ottenere il seguente output:
? apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-02-07 09:20:58 UTC; 6s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 33243 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 33259 (apache2)
Tasks: 6 (limit: 2353)
Memory: 15.1M
CGroup: /system.slice/apache2.service
??33259 /usr/sbin/apache2 -k start
??33260 /usr/sbin/apache2 -k start
??33261 /usr/sbin/apache2 -k start
??33262 /usr/sbin/apache2 -k start
??33263 /usr/sbin/apache2 -k start
??33264 /usr/sbin/apache2 -k start
Feb 07 09:20:58 ubuntu2004 systemd[1]: Starting The Apache HTTP Server...Accedi al cruscotto di Friendica
Ora, apri il tuo browser web e accedi all’interfaccia web di Friendica utilizzando l’URL http://friendica.example.com. Sarai reindirizzato alla pagina di controllo del sistema:

Assicurati che tutte le dipendenze PHP siano installate, quindi fai clic sul pulsante Avanti. Dovresti vedere la seguente pagina:

Fornisci il tuo nome di dominio, il percorso di installazione e fai clic sul pulsante Invia. Dovresti vedere la seguente pagina:

Fornisci il nome del tuo database, il nome utente del database, la password e fai clic su Invia. Dovresti vedere la pagina delle impostazioni del sito:

Fornisci l’email dell’amministratore, la lingua, il fuso orario e fai clic sul pulsante Invia. Una volta completata l’installazione, dovresti vedere la seguente pagina:

Ora, fai clic sul pulsante della pagina di registrazione e completa il processo di registrazione per accedere a Friendica.
Sicurezza di Friendica con Let’s Encrypt SSL
È sempre una buona idea proteggere il tuo sito web con Let’s Encrypt SSL. Dovrai installare il client Certbot per installare e gestire l’SSL. Puoi installarlo con il seguente comando:
apt-get install python3-certbot-apache -yUna volta installato Certbot, esegui il seguente comando per proteggere il tuo sito web con Let’s Encrypt SSL:
certbot --apache -d friendica.example.comTi verrà chiesto di fornire la tua email e accettare i termini di servizio come mostrato di seguito:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for friendica.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/friendica-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/friendica-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/friendica-le-ssl.confSuccessivamente, seleziona se reindirizzare o meno il traffico HTTP a HTTPS come mostrato di seguito:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2Digita 2 e premi Invio per installare l’SSL di Let’s Encrypt per il tuo sito web:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/friendica.conf to ssl vhost in /etc/apache2/sites-available/friendica-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://friendica.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=friendica.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/friendica.example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/friendica.example.com/privkey.pem
Your cert will expire on 2020-10-23. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-leOra, puoi accedere al tuo sito web in modo sicuro utilizzando l’URL https://friendica.example.com.
Conclusione
Congratulazioni! hai installato e configurato con successo la piattaforma di social network Friendica sul server Ubuntu 20.04. Ora puoi gestire la tua comunità di social network da un’unica posizione.
Ricevi i nuovi post nella tua casella di posta.
Nessuno spam. Disiscriviti in qualsiasi momento.