How I set up a hubzilla hub on Digital Ocean.
Motivation: Hubzilla is the most interesting of the possible G+ alternatives I've looked at so far. It's most important feature, from my perspective, is that your identity isn't tied to a particular hub. Identity portability is built in. You can move your activity to any hubzilla hub -- one you run yourself, or one run by a mega-corp. You can run your own hub and participate fully in the network.
But hubzilla is new and perhaps a bit hard to grasp -- new terms, new concepts. I decided to set up a hub.
Requirements: Some proficiency in linux system administration at the command line. Financial committment of ~ $100/year. Time committment of ~ 8-24 hours to set up, and then ongoing time TBD. Some expertise in using Google...
0) You need a domain name for your hub (eg: "nymclub.net"). In my case I had registered the name long ago at godaddy.com.
1) 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 really great tutorials.]
[Note: I don't work for DO, but I am a satisfied customer.]
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 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.
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 will reveal 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_steps
https://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.
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
$ 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 restart
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.
After all this you should have an 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) Now it is "administration" of hubzilla, not "installation." I'm learning
this at the moment, so just a couple of quick notes.
Initially, the navigation bar at the top of the page is pretty empty. In the
upper right 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...".
"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 the 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.
Anyway, for ~$100/year you can have an awesome social network with complete control over your own data. Not a bad deal.
No comments:
Post a Comment