Building a Friendica Server

Hak5

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
libsasl2-modules
nano /etc/postfix/main.cf
# delete first appearance of relayhost
# add the following to the end of the file
relayhost = [smtp.gmail.com]: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
[smtp.gmail.com]:587 USERNAME@gmail.com:PASSWORD
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
/etc/postfix/cacert.pem
sudo /etc/init.d/postfix reload

# Test email config
echo "Test mail from postfix" | mail -s "Testing Postfix" you@example.com

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

# Finish Install
Follow the wizard from localhost

 


# Installing Plugins


friendica.com/extend

github.com/friendica/friendica-addons


# Example: Install Gravatar plugin

github.com/friendica/friendica-addons/tree/master/gravatar


mkdir /var/www/html/addon

cd !!

wget github.com/friendica/friendica-addons/raw/master/gravatar.tgz

tar zxvf gravatar.tgz