Installing my favorite web suite aka Hubzilla on Debian is a joy. Quick, straightforward and easy. I will show you how to do it in about 10 minutes or less.
[b]Edit 09.09.2019:[/b]
Updated, tested with Debian 9 "Buster" and for ]PHP-FPM / Apache Event Worker. There are more tuning tips in [url=https://hub.netzgemeinde.eu/wiki/buckaroo/Tuning(20)Hubzilla/Home] Mark Nowiasz' tuning tips for Hubzilla[/url], highly recommended for further reference. You will not be finished with this [i]basic quickstart[/i] howto. Read the Wiki, there are valuable information to help you adapt your server config to your needs.
View article
View summary
Installing my favorite web suite aka Hubzilla on Debian is a joy. Quick, straightforward and easy. I will show you how to do it in about 10 minutes or less.
Edit 09.09.2019:Updated, tested with Debian 9 "Buster" and for ]PHP-FPM / Apache Event Worker. There are more tuning tips in
Mark Nowiasz' tuning tips for Hubzilla, highly recommended for further reference. You will not be finished with this
basic quickstart howto. Read the Wiki, there are valuable information to help you adapt your server config to your needs.
What you will need:
- Debian basic installation (only deviation in my install was including "basic" and SSH-server, which actually makes sense as you need a way to remote control your system, and fail2ban t give you a little protection for brute force login attempts. Chose your passwords wisely but never enter them into foreign services. Though this may be useful to get some impession on password security.)
- 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 openssh-server git apache2 mariadb-server php-fpm php-curl php-gd php-mbstring php-xml php-mysql php-zip imagemagick certbot python-certbot-apache php-fpm fail2ban
- 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.
MyDomain=example.com
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
ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/run/php/php7.3-fpm.sock|fcgi://localhost/var/www/hubzilla
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/hubzilla_error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/hubzilla_access.log combined
</VirtualHost>
EOF
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
Enable apache modules mpm_event and proxy
a2enmod mpm_event
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://framagit.org/hubzilla/core.git hubzilla; chown -R www-data. hubzilla;
- To create the database set your desired password first:
MyPassword=SuperSecret
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.
certbot
- setup a cronjob
echo "*/10 * * * * www-data cd /var/www/hubzilla; /usr/bin/php Zotlabs/Daemon/Master.php Cron > /dev/null 2>&1" >> /etc/crontab
- Install the official addons:
util/add_addon_repo https://framagit.org/hubzilla/addons addons-official
Continue with:Howto: Hubzilla Server Setup On A Working Web Server for the actual Hubzilla setup