Hak5 1812 – 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!

Download HD | Download MP4

# Install dependencies
apt-get install php5-curl php5-cli php5-gd libapache2-mod-php5 mcrypt
echo “<?php phpinfo(); ?>” > /var/www/html/check.php
# check http://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:
<Directory “/var/www/html”>
AllowOverride All
</Directory>

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 [email protected]: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” [email protected]

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

# Finish Install
Follow the wizard from http://localhost
# Installing Plugins
http://friendica.com/extend

https://github.com/friendica/friendica-addons
# Example: Install Gravatar plugin

https://github.com/friendica/friendica-addons/tree/master/gravatar
mkdir /var/www/html/addon

cd !!

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

tar zxvf gravatar.tgz

2 Comments

  • Ben
    Reply

    Hey guys,
    great tutorial! I watched it twice and was going to install friendica on my vm-server now… You forgot to mention a few things in this text.

    After # Finish Install, there is nothing to do on http://localhost, bc you didn’t mention to donwload the friendica master.zip and unpack it (you DID in the video, but it is missing in the description).

    Also, later on in the video, you mention what to put in the .htaccess (Darren cats the file in the video). That content is missing as well. Anyway, great video tutorial, which made me want to set up my own friendica server as well 🙂

  • Manuela
    Reply

    whoah this weblog is great i like studying your posts.
    Stay up the great work! You recognize, lots of persons are hunting round for this info,
    you could aid them greatly.

    • chadinfluence
      Reply

      I’d like to know what happened too. No-one in the chat room is aware of it, and I can’t find any reference in the forums. 🙁

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>