[Markdown] 

Hubzilla Project: Installation Instructions

Table of Contents

    Installation Instructions

    Ubuntu/Debian

    This installation guide is not 100% complete yet, but it contains most of the steps necessary to install Hubzilla on an Ubuntu/Debian installation. The test system is a DigitalOcean droplet, Ubuntu 16.04.2 x64, $10/mo, 1GB RAM.

    Provide some extra swap space

    install -o root -g root -m 0600 /dev/null /swapfile
    dd if=/dev/zero of=/swapfile bs=1k count=1024k
    mkswap /swapfile
    swapon /swapfile
    echo "/swapfile       swap    swap    auto      0       0" | sudo tee -a /etc/fstab
    sudo sysctl -w vm.swappiness=10
    echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
    

    Install Hubzilla dependencies

    apt-get update
    apt-get install apache2 php7.0 git mailutils sendmail php7.0-zip php7.0-cli php7.0-curl php7.0-gd php7.0-mysql php7.0-mbstring php7.0-xml libapache2-mod-php7.0 php7.0-mcrypt 
    a2enmod rewrite
    phpenmod mcrypt
    phpenmod zip
    service apache2 stop
    

    Install Let's Encrypt and obtain a certificate

    letsencrypt certonly --standalone
    

    Create a database

    root@hub:~# mysql -uroot 
    MariaDB [(none)]> create database dbname;
    MariaDB [(none)]> grant all privileges on dbname.* to dbuser@localhost identified by "dbpass";
    MariaDB [(none)]> flush privileges;
    

    Clone the Hubzilla code in the directory Apache is serving at my.hub.url

    cd /var/www/my.hub.url/
    git clone https://github.com/redmatrix/hubzilla.git .
    mkdir -p "store/[data]/smarty3"
    touch .htlog; chown -R www-data:www-data .htlog store/
    touch .htconfig.php; chown www-data:www-data .htconfig.php
    util/add_addon_repo https://github.com/redmatrix/hubzilla-addons.git official
    

    Open a browser and visit your site to complete the setup.