Setting up a custom storage cloud
There was a requirement at work, to setup a personal cloud software, for file-sharing, and possibly enable shared document editing. A solution called owncloud came recommended, but I decided to do some more looking around. A few years ago, opensource content management systems, and even blogs were really clunky things, held together with a lot of duct-tape and warning signs saying ‘Here be dragons’. Now, however, things are quite different. Instead of building monolithic behemoth apps which would prove to be extremely hard to maintain, developers are focusing on minimalist code, to allow one to get services up and running, and depending on what additional features or quality of service that’s required, one can add applications, or even buy the premium version of the software, with additional features and support thrown in.
My research online showed me that owncloud held a lot of promise, but so did a software called seafile. Seafile, written in C, and Python, proved to be a breeze to install, and seemed very easy to use. This is an interactive demo that you can actually use, to get an idea how it works. Check it out at https://demo.seafile.com/. The documentation was also quite nice, but as soon as I started digging around, I realized that they’ve stripped the code of all logging functionality, and are offering the logging enabled version of the software as a ‘premium product’. Thanks, but no thanks. While it’s probably a bit harsh to term it as crippleware, it’s definitely an anti-feature; paying customers aren’t gettin anything that’s really extra, but those who aren’t paying get a less that fully functional product. Without proper logging, one can’t identify and protect oneself against brute-forcing or denial of service attacks, so I moved on.
Next stop was owncloud, which is developed in PHP, and that was the reason it wasn’t my first choice. I have nothing against the developers at all, but PHP is a language that has really established itself as one which has encouraged many a bug, simply due to its unconventional syntax, like the infamous triple === instead of the more standard ==, to quote just one example. A cursory examination showed signs that it was an active project, and that security advisories were being acted upon in a timely manner. I’ll be poking around some more, in the next couple of days.
Installing owncloud was quite simple. I chose the owncloud package for my distribution, as it not only makes installation easier, but also ensures that updates are automatically applied. Like seafile, owncloud also comes with excellent documentation. Next up was enabling Collabra Online, which is described as LibreOffice in the cloud, on your own terms. When enabled with owncloud (or seafile, nextcloud, or anything similar), it makes it possible for a file storage service to also function as a document editor, and the best part is that it allows collaborative editing of the documents, like google docs. The easiest way to get Collabra up and running on my server was to run a docker image, so I ran and got that. Collabra also needed a sub-domain, to work correctly, and I only had an SSL certificate for my domain’s base name. Since I use letsencrypt, it only took me a minute to get a new certificate for a subdomain, and another couple of minutes to correct the entries in the apache configuration, which the execution of letsencrypt had modified in a manner I wasn’t happy with. Fortunately, I’d backed up my configuration beforehand, so it wasn’t too much extra work.
Even after nailing the Apache configuration, I was still getting errors saying “Failure: “Please ensure the file type is supported and not corrupted””; fortunately, it was an error that others had encountered, and it seemed to be docker-related. I’m still not very docker-savvy, so while it fixed my problem, I still don’t know why and how the solution worked. After that, it was pretty smooth sailing. I also found an Android app, an owncloud client called Cirrus for owncloud, which supports all the features provided by owncloud. I installed it and gave it a whirl, and saw that it worked just as it was expected to. So far, so good! I now need to do some more reading up about docker administration.