owncloud-logo-150x74.png  Raspberry_Pi_Logo.png

For me, it started with a weekend trip to the cottage that was going to be an opportunity to be secluded while laying out a board in EAGLE.  I had everything well planned to be able to complete the task without an internet connection: all datasheets were saved, the schematic was complete, and I even installed the free version of EAGLE which didn't require an internet connection to verify my license.  After the sun went down I brewed some tea, turned on the stereo, and got ready to do some serious layout.  I went to open my board file …..but it was nowhere to be found in a directory that Google Drive was responsible for syncing.

 

I don't know what went wrong with the sync process that time – but I had to wait until the next day to ask someone to go to my house and email the files I needed to continue working.  I had been a loyal user of Microsoft's Live Mesh from 2006 until they discontinued it this year, and never encountered a problem.  However applying that same level of confidence to Google Drive was clearly a mistake.

 

When discussing the problem with a friend, he mentioned that a common complaint with cloud-based applications is that they are always a prototype.  Since the product is never 'delivered' to a customer, it can have bugs which will be fixed the next time the user logs in.  There are also privacy and cost concerns that make a 3rd party service seem less attractive.  Contrast that against a product which is owned by the user and can be installed and updated manually when the user deems it to be a good time.

 

After being burned, I immediately switched back to Microsoft SkyDrive, with hopes of this updated version of Mesh being as good as the predecessor that never let me down.  Still concerned about being disappointed again, I began a search for a system that I could have more control over.

 

The result? OwnCloud is a server that you own and maintain with all of the client features of other well known products like Google Drive or SkyDrive.  And the best part is that single board computers with an external hard drive can make it happen in a small, low cost, and low power solution.

 

The setup that I made involves a 2TB hard drive that is backing up and syncing files between my laptop and desktop.  This summer, I plan to make accounts for the BlueStamp Engineering staff so the hard drive can be a repository for all of the student videos.  Since the risks and maintenance of a server are non-zero, I'm considering building a second box that would act as a backup client that is housed in another location for a failsafe.  At <$150 for the entire setup, that's  some pretty cheap insurance.  It will take years to determine if it is a stable system, but with my involvement already being so deep I'll be sure to keep a close eye on things.

 

The next question for an install of ownCloud is how secure it is.  There are tutorials out there describing how to make the system secure.  For this install I'm only syncing public youtube videos so I'm content to simply change the Rpi and database passwords.  But I expect to up my game once I switch over to the system permanently.  Thankfully, setting up security on a Linux box is a well documented endeavor.

 

I admit that the reason people everywhere aren't installing their own cloud service is that it is complicated, especially for those who are unfamiliar with Linux.  All of the required information was available online, but not in one location due to the variety of the program uses.  Below are the steps I took to create my system with references for where I got the information.  If you give these steps a try, please leave feedback in the comments!

 

  1. Install Raspian on the Rpi 
  2. Install a way to SSH into the Rpi remotely
  3. Install apache2
  4. Install peripheral networking software as described in this instructable
  5. Install and setup a MySQL server
  6. Setup external HDD with a filesystem and setup automounting of the drive as described in this tutorial
  7. Install OwnCloud 
  8. Modify files and set permissions for owncloud's uses as described in this instructable
  9. Configure Owncloud server by going to https://<IP address of Rpi>/ownCloud. Using the advanced options, I set it up with the directory for my mounted external HDD and the MySQL previously configured.
  10. Set the locals to en_US.UTF-8 by running dpkg-reconfigure locales  
  11. Setup port forwarding on your home router for <IP address of Rpi> and Port 80
  12. Alter video memory allocation to the minimum 16MB on Rpi and turn off desktop-on-boot (since there is no video operations) by running sudo raspi-config 
  13. Install client on another computer and start tinkering with the web and client interface to get things setup. 

 

The following sites were also helpful in learning about creating the system:

http://www.youtube.com/watch?v=0FBjZoAfHgg

http://www.tuxfiles.org/linuxhelp/mounting.html

http://www.tuxfiles.org/linuxhelp/fstab.html

https://www.digitalocean.com/community/articles/how-to-setup-owncloud-5-on-ubuntu-12-10

http://www.glump.net/howto/web/building-a-home-file-server-with-owncloud-and-subsonic