Thursday, January 17, 2013

Installing owncloud on a Raspberry Pi

Spoiler: Just follow the official installation guide and you'll be fine. Although you'll probably want to put owncloud data on external storage. Surprised? It is just another linux server!

Below are the commands I used. Those in bold are where I did something slightly different in order to change the location where files are stored. In my case I have a powered USB disk mounted on /mnt.

$ sudo -i
[sudo] password for marc:
# apt-get install apache2 php5 php5-gd php-xml-parser \
php5-intl php5-sqlite php5-mysql smbclient curl \
libcurl3 php5-curl
...a bunch of packages installed...
# cd /var/www/
# tar jxf ~marc/owncloud-4.5.5.tar.bz2
# chown -R www-data:www-data owncloud/apps
# chown -R www-data:www-data owncloud/config
# mkdir /mnt/owncloud-data
# chown www-data:www-data /mnt/owncloud-data
# ln -s /mnt/owncloud-data/ /var/www/owncloud/data

Then point a browser to http://raspberrypi.local/owncloud and take all the defaults. That is leave the file location as /var/www/owncloud/data

Finally go download the sync clients from and drag-n-drop files in your ~/owncloud.

For testing I had ~180M of files in my ~/owncloud directory and the apache2 process hammered the RPi cpu for a while for the first sync from my desktop.