Building a Friendica Server


Building a Friendica Server

Rolling your own Friendica node! From setting up the LAMP stack to configuring Postfix and MySQL. Time time on Hak5, Darren and Shannon take the scenic route setting up their very own Distributed Decentralized Open Source Social Network! All that and more, this time on Hak5!

# Install dependencies
apt-get install php5-curl php5-cli php5-gd libapache2-mod-php5 mcrypt
echo "" > /var/www/html/check.php
# check webserver/check.php and ensure SSL support

# Enable mod rewrite
a2enmod rewrite
sudo nano /etc/apache2/sites-available/000-default.conf
# find DocumentRoot /var/www/html and add the following right after:

AllowOverride All

sudo chown www-data:www-data -R /var/www/html/*
service apache2 restart

# Setup Postfix with test Gmail account
sudo apt-get install postfix mailutils libsasl2-2 ca-certificates
nano /etc/postfix/
# delete first appearance of relayhost
# add the following to the end of the file
relayhost = []:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
# add password to sasl_passwd file
nano /etc/postfix/sasl_passwd
# add the following
sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a
sudo /etc/init.d/postfix reload

# Test email config
echo "Test mail from postfix" | mail -s "Testing Postfix"

# Setup database
mysql --password
show databases;
create database friendica;

# Finish Install
Follow the wizard from localhost


# Installing Plugins

# Example: Install Gravatar plugin

mkdir /var/www/html/addon

cd !!


tar zxvf gravatar.tgz