hzkick | tobias
hzkick | tobias

Wiki Pages

How to install Hubzilla in 7 easy steps

Installing my favorite web suite aka Hubzilla on the forthcoming Debian 9 "Stretch" is a joy. Quick, straightforward and easy. I will show you how to do it in about 10 minutes or less.
What you will need:
  • Debian 9 basic installation (only deviation in my install was including "basic" and SSH-server)
  • Existing domain, correctly configured and pointing to your server

All right then, let's start the Hubzilla installation party.
  • The Basics: Install the required dependencies:
    apt install git apache2 mariadb-server php certbot python-certbot-apache php-curl php-gd php-mbstring php-xml php-mysql php-zip imagemagick
  • Webserver apache: Create vhost file /etc/apache2/sites-available/hubzilla.conf and enable vhost, enable the required apache module rewrite. You need to replace example.com with your own domain name.
    Then paste this into your shell.

    cat > /etc/apache2/sites-available/hubzilla.conf << EOF
    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName $MyDomain
        DocumentRoot /var/www/hubzilla
        <Directory />
            Options FollowSymLinks
            AllowOverride All
        <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
        ErrorLog ${APACHE_LOG_DIR}/hubzilla_error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/hubzilla_access.log combined

    Enable the new vhost
    a2ensite hubzilla
    You might want to disable the default site (enabled automatically upon installation):
    a2dissite 000-default.conf
    Enable apache modules rewrite
    a2enmod rewrite
    Restart apache2 in order to activate all these changes
    systemctl restart apache2
  • Download Hubzilla: clone the Hubzilla Git repository and chown everything to be writable to the webserver account www-data
    cd /var/www/ ; git clone https://github.com/redmatrix/hubzilla ; chown -R www-data. hubzilla;
  • To create the database set your desired password first:
    Then actually create the database:
    mysql -u root -e "create database hubzilla ; CREATE USER 'hubzilla'@'localhost' IDENTIFIED BY '$MyPassword'; GRANT ALL PRIVILEGES ON hubzilla.* to 'hubzilla'@'localhost';"
  • SSL Encryption: create the letscencrypt certificates in order to use SSL and have certbot automatically configure your apache vhost to use SSL. Just follow the instructions. Let certbot configure your vhost to use SSL.
  • setup a cronjob
    echo "*/10 * * * *    cd /var/www/hubzilla; /usr/bin/php Zotlabs/Daemon/Master.php Cron"  >> /etc/crontab
  • Finally: open your browser and follow the instructions.