Saturday, August 24, 2013

Installing ownCloud on Raspberry Pi

Presenting a ready-to-install image of ownCloud for Raspberry Pi 

A small introduction to ownCloud
ownCloud is an application which enables users to share their data without giving control to any third party posing as a facilitator. While sharing the data without loosing control is the main objective, ownCloud is much more than that. It can also rapidly sync the data, contacts, calendar events etc from several devices. It can work with several custom backends and it is highly flexible.

Many of us have a Raspberry Pi with us and we love playing with it. In past I have written posts on how to install Arch Linux on it and how to install OpenELEC to convert the Raspberry Pi into a Media Centre. This time I plan to go a little further. This time I have made a custom image which comes preinstalled with ownCloud and some tweaks to improve the ownCloud experience with Raspberry Pi. This image is based on Raspbian Wheezy.

Just follow the steps below and you'll be good to go in no time:
  1. Download the archived image from in either zip format (usually for Windows) or gunzip format (usually for Linux and Unix like platforms)
    Since I am running on Linux, I would download gunzip format.
  2. Extract it and put it on a SD card using dd or any other tool or command. Check out this article on elinux if you need any help for this. Although 2 GB SD card would be fine but I would recommend using 4 GB or more.
    I would run the following commands:
    $ gunzip owncloud-raspberrypi-0.1.img.gz # to extract the gz archive
    $ sudo dd bs=1M if=owncloud-raspberrypi-0.1.img of=/dev/mmcblk0 # to write to the SD card. /dev/mmcblk0 can be obtained by the output of df command.
  3. Put this SD card in your Raspberry Pi and boot. The default credentials are:
    user: pi
    password: owncloud
  4. Run raspi-config and follow the directions to expand the filesystem to enjoy maximum disk space. Reboot, if required.
  5. Run ifconfig to get the ip address of the Raspberry Pi.

That is it. Just open http://<ip_address>/owncloud and create the admin user and explore ownCloud on Raspberry Pi.

This image PHP execution time increased to 60 seconds and the upload limit has been bumped up to 500M. The Apache is set to allow .htaccess for the protection of data directory. Also SSH has been enabled by default.

The official page for the image can be found at ownCloud on Raspberry Pi. A Hacker News discussion is also going on here.

If you like this image and you are interested in knowing more about ownCloud, then please consider buying my book, Getting Started with ownCloud. It is available from Amazon.com, Amazon.co.uk, Barnes & Nobles and on Kindle.