Friendica is a free and decentralized social networking platform that allows users to connect and communicate with their friends and family. If you're looking to install Friendica on macOS, then you've come to the right place.
In this tutorial, we'll take you through the basic steps of installing Friendica on macOS.
Before we start, please make sure that you have the following prerequisites:
You can download Friendica from the official website at https://friendi.ca/. Once the download is complete, extract the contents of the file to a directory of your choice.
Friendica is typically installed on a web server. So, you need to configure the web server on your macOS to host Friendica.
By default, macOS comes pre-installed with Apache. Follow the below steps to configure Apache with PHP:
Open the Terminal app on your macOS.
Type the following command to open the Apache configuration file in nano editor:
sudo nano /etc/apache2/httpd.conf
Uncomment the following line by removing the #
:
LoadModule php7_module libexec/apache2/libphp7.so
Save and exit the editor by pressing Control + X
, Y
, then Enter
.
Restart the Apache server by entering the following command:
sudo apachectl -k restart
If you prefer to use Nginx instead of Apache, you can follow the below steps to install and configure Nginx:
Open the Terminal app on your macOS.
Install Nginx on macOS using Homebrew by executing the following command:
brew install nginx
Edit the Nginx configuration file using nano editor:
sudo nano /usr/local/etc/nginx/nginx.conf
Change the server section to the following:
server {
listen 80;
server_name localhost;
location / {
root /Users/YourUserName/friendica;
index index.php;
try_files $uri $uri/ /index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root /Users/YourUserName/friendica;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
Save and exit the editor by pressing Control + X
, Y
, then Enter
.
Start the Nginx server by entering the following command:
sudo nginx
Friendica requires a database server to store its data. You can either use MariaDB, MySQL or PostgreSQL as your database server.
Follow the below steps to install MariaDB on macOS using Homebrew:
Open the Terminal app on your macOS.
Enter the following command to install MariaDB:
brew install mariadb
Start the MariaDB server by entering the following command:
mysql.server start
Secure the installation by running the following command and following the prompts:
mysql_secure_installation
Follow the below steps to install MySQL on macOS using Homebrew:
Open the Terminal app on your macOS.
Enter the following command to install MySQL:
brew install mysql
Start the MySQL server by entering the following command:
mysql.server start
Secure the installation by running the following command and following the prompts:
mysql_secure_installation
Follow the below steps to install PostgreSQL on macOS using Homebrew:
Open the Terminal app on your macOS.
Enter the following command to install PostgreSQL:
brew install postgresql
Start the PostgreSQL server by entering the following command:
brew services start postgresql
Create a new database by entering the following command:
createdb your_database_name
Now that you have installed web server and database, it is time to configure Friendica.
Rename the .htconfig.php.sample
file to .htconfig.php
.
Edit the .htconfig.php
file you just renamed and provide the following details:
$dbtype
- Set to the type of database you're using (mysql, pgsql, sqlite, or mysqli).$db_host
- Set to the server name or IP address where your database is installed.$db_user
- Set to the database user you created.$db_pass
- Set to the password for the database user you created.$db_data
- Set to the name of the database you created.localhost
in the URL bar.That's it! You have successfully installed and configured Friendica on macOS. Enjoy your new social network platform!
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!