Web Hosting and SEO
The ownCloud desktop client allows multiple accounts on Windows, OS X and Linux

Using OwnCloud to Provide Cloud Data Services on Joomla

When I had to transfer a 2.5 gigabyte file about a year ago, I ran into problems with all of the cloud storage accounts available to both the sender and to me; none would take a file larger than 2G–even the paid accounts. This started me on a the path to investigate self-administered cloud storage accounts. I was also frustrated with the difficulty of sharing consolidated address books and was independently looking for something that would help with that challenge. While taking the train in to town for a meeting, I read a Linux Journal article Synchronize Your Life with ownCloud, and decided to investigate the ownCloud package described in the article.

After running it for several months on a server behind my firewall, I decided that there were significant cost benefits to running ownCloud on my business and a client web site under Joomla. The article that follows describes the cost benefits and other considerations in setting up ownCloud on your website and how to set it up. The article is divided into the following sections:

Running Your Own Cloud Services can be Less Expensive

If you need the permanence of a paid cloud storage account, multiple collaborators can quickly become quite expensive: the Box Starter service is $5 per month per collaborator. For a sole proprietor with 20 customers as collaborators, this would be $105 per month. Similarly, if you need to use files greater than 2 gigabytes, Box Business is $15 per month per collaborator, with a three collaborator minimum. When compared to $20 per month for a 40G virtual private server (VPS), $50 per month for a 90G VPS or $120 per month for a 500G managed physical server, the business case for setting up your own cloud storage can quickly become compelling.

Running Your Own Cloud Services Add Responsibilities and Costs

If you choose to run your own cloud services, you will have several additional responsibilities as a web site administrator:

  • Your site should run SSL (HTTPS) session encryption, so you will need to go to the additional effort and in some cases expense of obtaining and installing an SSL certificate. Why and How to Set Up SSL/HTTPS on Your Web Site talks about how to do this and to obtain a free certificate. If you are already running SSL, this is not really an additional expense.
  • Your backup and recovery process must be enhanced to handle more data, and will probably have to occur much more frequently.
  • You will need to set up a process for managing and backing up encryption keys for ownCloud’s static file encryption. You do not have to enable encryption, but you will probably want to do so on a public site.
  • You may need to make modifications to your site’s Terms and Conditions and Privacy statements.

Addressbook and Calendar Sharing Limitations in OwnCloud

When I switched my address book to Google some time ago, I did so primarily to get access to the de-dup capability in Gmail. OwnCloud does not have this capability, and I'm sure that there are other capabilities that are missing. I have not been able to get Thunderbird to work with ownCloud at this point.

There are Several Alternatives for Joomla Web Site Cloud Services

For a Joomla business web site, there are an increasing number of alternatives for cloud services built into your web site:

  • owncloud is in the most robust alternative, but single password and single-signon configuration is not simple.
  • PH Cloud is a Joomla extension that may provide some of the services available in ownCloud. A discussion on this extension is beyond the scope of this article.
  • JoomDOC is a Joomla extension offers paid versions that support WebDAV and which may provide the some aspects of cloud storage services. A discussion of this extension is beyond the scope of this article.
  • DPCalendar is a Joomla extension that offers CalDAV support. A discussion of this extension is beyond the scope of this article.

For an up-to-date list of Joomla extensions, search the Joomla extensions directory with “webdav”, “carddav”, and “webdav”.

Unified Authentication is the Challenge

The biggest drawback to running ownCloud under your Joomla site is that users will need to log in to web interface to ownCloud separately from logging in your Joomla site. There are some ways to get this to a single password, and perhaps single signon, but the are not trivial to implement. As I experiment, this section will be revised with a recommended approach, but this may take some time as some of the ownCloud plugins that are of interest are not yet supported on ownCloud 8.2. Here are the approaches that appear to be alternatives:

  • Lightweight Directory Access Protocol (LDAP) is probably the best supported method, but this requires either a VPS or a managed server, as LDAP is configured at the server level rather thena the web-hosting level. This is not trivial to set up.
  • OwnCloud has an abandoned Joomla plugin, user_joomla_auth, that may be possible to enhance and make work for single password and single signon.
  • OwnCloud has an SQL-based plugin, user_sql, that may be able to read Joomla user tables and provide a single password solution, though not single signon.
  • There may be some Oauth solutions available, but this appears to require PHP extensions that may or may not be accessible for web hosting sites where you cannot install PHP extensions.

Preparing to Install OwnCloud on a Joomla Site

Before you begin the installation process for ownCloud, you will need to make some changes in your server to prepare for the installation. The first step is configuring your .htaccess file to allow access to the installer and to the ownCloud directory. Figure 1 shows how to enable access to the installer in Akeeba Admin Tools’ .htaccess generator, while Figure 2 shows how to enable access to the ownCloud directory. It may be possible to restrict these permissions further.

Configuring .htaccess in Akeeba Admin Tools

Figure 1. Allow owncloud installer access in Akeeba Admin Tools’ .htaccess generator.
Figure 1. Allow owncloud installer access in Akeeba Admin Tools .htaccess generator
Figure 2. Allow ownCloud directory access in Akeeba Admin Tools’ .htaccess generator.
Figure 2. Allow ownCloud directory access in Akeeba Admin Tools .htaccess generator

Installing memcached

Although it is not strictly required, there are significant performance benefits to installing and configuring memcached or some other cache manager for ownCloud to use. It is likely that this is already installed on your web host, but if it is not, you may wish to ask your hosting firm to install it.

Installing LibreOffice

If you want to provide a web-based viewing and editing platform similar to Google Docs, you will need to install LibreOffice on the server; if you have a VPS or managed host, this will be easy, but if you are on a web hosting account, getting your provider to do this might be a challenge.

Installing OwnCloud on a Shared Host

Installing ownCloud on a shared host is fairly simple. The Web installer tab on the download web page on the owncloud web site shown in Figure 3 lists instructions for installing on a shared host account, while the other tabs cover other installation scenarios. The most straight-forward for web hosting sites is to download setup-owncloud.php and upload it to the installation directory/subdomain that you have created on your site(likely owncloud). From there, bring up https://yourdomain.com/owncloud/setup-owncloud.php and follow the prompts during installation. If you encounter problems, make sure that you allowed access to setup-owncloud.php in your .htaccess file.

Figure 3. The ownCloud download panel offers several installation alternatives, including one for webhosting accounts.
Figure 3. The ownCloud download panel offers several installation alternatives, including one for webhosting accounts.

Configuring OwnCloud

Once you have installed ownCloud, you should access the administrative tools to configure your installation. To get to the admin tools, select the pull-down by your user ID in the upper right corner of the screen, as shown in Figure 4. You will probably want to do the following configuration tasks:

  • Enable encryption
  • Configure memcached
  • Install ownCloud plugins
Figure 4. To access the admin tools in ownCloud, select the pulldown by your user ID in the upper right corner.
Figure 4. To access the admin tools in ownCloud, select the pulldown by your user ID in the upper right corner

Enable Encryption

Most installations will probably choose to enable encryption, but make sure that you have a key-file backup process in place before you do so. Figure 5 shows the admin section for enabling encryption.

Figure 5. Many users will want to enable static file encryption.
Figure 5.  Many users will want to enable static file encryption.

Configure memcached

Although it is not strictly required, there are significant performance benefits to enabling memcached or some other caching service. To set this up, you will need to place the code shown in Figure 6 in the owncloud/config/config.php file–assuming that you installed into the owncloud directory. The ownCloud Administration Manual has extensive instructions on configuring memcached and other cache managers.

Figure 6. Configure memcached in owncloud/config/config.php
'memcache.local' => '\OC\Memcache\Memcached', 'mecached_servers' => array ( array('localhost',11211) ),

Installing OwnCloud Plugins

At this point, you have a working installation of ownCloud, but there are a number of additional features that you will probably want to add by enabling the respective plug-ins, as shown in Figure 7. Some of the plugins you will likely enable include:

  • Encryption
  • External storage
  • External user support
  • Documents
  • Calendar
  • Contacts
  • OwnBackup

The external storage plugin allows you to access Dropbox, Box and Google Drive accounts to get consolidate access to various cloud services. To enable a plug, choose “Apps” in the pulldown panel in the upper left, and enable plugins (apps) as shown in Figure 7.

Figure 7. There are a number of plugins for Owncloud.
Figure 7.  There are a number of plugins for Owncloud.>

Configuring External Storage

To consolidate access to multiple cloud storage accounts, you can configure external storage within ownCloud, either at the system level or at the user user level. If you set this up at the system level, this may be a way to get more collaborating users without incurring the additional cost of collaborating users in the cloud storage account. Before doing this, you should review the terms and conditions for your cloud storage account.

If you have multiple Dropbox, Box and Google Drive accounts, defining them as external storage can allow you to get simultaneous access–something that cannot generally be done with the native Dropbox, Box and Google Drive accounts. Figure 8 shows the external storage definition options; for Box, choose WebDAV.

Figure 8. Configuring external storage to Dropbox, Box, etc is simple, but does have some security exposures.
Figure 8. Configuring external storage to Dropbox, Box, etc is simple, but does have some security exposures.>

Client Side Configuration

Although there are a number of situations where you will want to use the web interface, the real power of cloud storage is through the client programs that sync accross desktops, laptops, phones and tablets. OwnCloud has applications for each of these environments. One major advantage of the ownCloud clients is that the allow access to multiple ownCloud accounts, which is a real bonus in keeping your work and personal data separated.

Installing and Configuring the Desktop Application on Windows, OS X and Ubuntu

The OwnCloud desktop applications for Ubuntu, OS X and Windows are all very similar and all have the advantage of allowing you to connect to multiple OwnCloud accounts unlike Box and Dropbox. The only significant difference is in where you add additional accounts. In the Ubuntu client, you add additional accounts on the main sync panel, while in OS X and Windows, you must go to the General Settings panel to add additional accounts. Figure 9 shows the sync panel for the Ubuntu client.

Figure 9. The Ubuntu desktop application is very similar to the Windows and OS X desktop applications, but has a easier interface for adding servers.
Figure 9. The Ubuntu desktop application is very similar to the Windows and OS X desktop applications, but has a easier interface for adding servers.

Android Applications for OwnCloud

There are several Android applications that will sync with OwnCloud. Most of the applications are forks of the open source sync application provided by ownCloud.org, while others are proprietary apps that require a free or paid ownCloud plugin. In some cases, universities and business have created apps that are hard-coded to work only with their ownCloud installation.Here are a few of the Android applications:

In whichever Android application you choose, you will probably want to update the settings to automatically upload photos from your phone, but to do so only when connected to Wi-Fi, as shown below in Figure 10.

Figure 10. In the mobile app, you will probably want to enable auto-upload of photos for Wi-Fi only.
Figure 10. In the mobile app, you will probably want to enable auto-upload of photos for Wi-Fi only.>

Configuring Single Password and Single Signon

This section will be updated as I work out the best way to configure this.