Requirements: Some proficiency in linux system administration at the command line. Financial committment of ~ $100/year. Time committment of ~ 8-24 hours for initial set up, and then ongoing time TBD. Some expertise in using Google search would be very helpful.
0) You need a domain name for your hub (eg: "nymclub.net"). In my case I had registered the name
nymclub.net long ago at
https://godaddy.com1) Set up a DO account (at
https://www.digitalocean.com/) and create a droplet. A minimal droplet costs $5/month. Select ubuntu 18.04 as the OS. The name of the droplet on creation should be the domain name above (eg: "nymclub.net"), and not the name they provide by default. Secure your droplet by following the excellent clear instructions at
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04(In general, DO has excellent tutorials. I don't work for DO, but I've been a customer for some time.)
The droplet will have an IP address that it will keep as long as it is alive. Note it.
2) Set up DNS using the above noted IP address. You can use DO servers, following the documentation at:
https://www.digitalocean.com/docs/networking/dns/In my case I have my own DNS servers, so I used them.
Be sure you can log into your droplet remotely, by name, not IP address.
3) Install the LAMP stack (Linux, Apache, Mysql, PHP):
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04(There is also a DO "one click application" that gives you a server with a LAMP stack. I don't know anything about it, other than it exists.)
Note: I used the MariaDB, a free plug in replacement for MySql, with
$ sudo apt install mariadb-server
(If I recall correctly. It may be the default already.)
Verify that you can see the apache start page from your browser.
4) Hubzilla requires a mail server that can send mail to confirm accounts. I just installed postfix as an "internet server":
$ sudo apt update
$ sudo apt install postfix
[I think this will take further work on my part -- I got it to the point where it could send the confirmation emails, and didn't do any more email configuration. Email is, in general, a pain.]
I also installed an email client so I could send test messages:
$ sudo apt install mutt
5) Hubzilla also highly recommends using SSL/TLS for your web server. I used the "Let's Encrypt" certificate authority, and "certbot". See
https://certbot.eff.org/lets-encrypt/ubuntubionic-apache for information.
https://nymclub.net worked first try.
Note: Let's Encrypt certs expire after 90 days, so they need to be renewed via a periodic cron job:
$ sudo crontab -e
then add the certificate check-and-renew-if-necessary command to run daily (in this case at 5:43 am):
*/10 * * * * cd /var/www/html; /usr/bin/php Zotlabs/Daemon/Master.php Cron > /dev/null
43 5 * * * /usr/bin/certbot renew --post-hook "systemctl restart apache2"
(The command that runs every 10 minutes [*/10] is the part of hubzilla.)
6) Install hubzilla. The instructions at
https://project.hubzilla.org/help/en/admin/administrator_guide are perhaps too concise, but they are complete. I followed them slavishly. Google revealed several other tutorials:
https://www.howtoforge.com/tutorial/how-to-install-hubzilla-on-ubuntu/ --
doesn't include TLS, and uses an apache virtual host.
https://hubzilla.rocks/page/tobias/tutorial_install_hubzilla_in_7_easy_stepshttps://websiteforstudents.com/install-hubzilla-platform-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-2/Might not be a bad idea to read through them.
t
Once you have unpacked the software you can access the site and use the software itself to guide you through the installation. Specifically, I used the recommended "git clone" to get hubzilla in the default root directory of the web site, /var/www/html, then browsed to
https://nymclub.net. The web site at this point shows the status of the installation -- what is missing and what needs to be configured. At the command line, then, I manually installed the needed requirements -- php-zip, mbstring, php-xml, and several others were needed. Sometimes it took a bit of head-scratching to figure out the correct package name to install. You can use "dpkg -S" to find that out -- eg:
$ sudo dpkg -S php-zip
You may also need to edit the /etc/php/7.2/apache2/php.ini file to be sure that all the indicated packages have been enabled, change upload limits, and so on.
Important: in order to get changes in the php configuration to be reflected in the web page you must first RESTART THE WEB SERVER:
$ sudo service apache2 restartt
Took me a while to remember that...
Be sure you have changed "AllowOverride None" to "AllowOverride All" in the necessary places in the /etc/apache2/apache2.conf file:
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Set up the database and the database user as described in the documentation. Restart the web server...
After all this you should have a bare bones working installation.
Finally, you need to create the first user, using the same email address that you provided during installation. This user is the administrator.
7) Administration: I'm learning this at the moment, so just a couple of notes.
Initially, the navigation bar at the top of the page is pretty empty. In theright of the "Channel Home" page is "New Member Links. A "Missing Features?" group is at the bottom of the list, with "Install more apps" and "Pin apps to navigation bar" options.
"Install more apps": click on this link to get a list of apps to install.
"Pin apps to navigation bar": Click on that link, and you will see a bunch of apps, along with a pushpin icon. Click the icon, and they app will appear in the nav bar. (Requires a reload).
I think you need apps to do much of anything, so the above two steps are pretty important.