ownCloud + BoxGrinder + PageKite: ownCloud Appliance

by Amit

UPDATE: This post may possibly be inaccurate (partiually/fully) for newer ownCloud/Fedora/BoxGrinder releases.

UPDATE:  ownCloud 4 installation is pretty much similar to ownCloud 3 installation and this shell script here will do the job for you on Fedora. One nit: I ran into error messages as this:

As you can see (on opening the screenshot), there is missing header error from ‘/var/www/html/owncloud/apps/files_odfviewer/appinfo/app.php’.  This post here told me that it could be due to a empty line. So that;s it. I went to the file and removed the line no. 8 which was an empty line! And it works fine.


In this post, I shall talk about my experiments about creating an ownCloud appliance so that you can have an ownCloud installation running off a virtual machine . This appliance is based on Fedora Linux and I created it using BoxGrinder. To make it visible to the “outside” world, instead of going through the hassle of port-forwarding, I used the awesome PageKite service. Let’s get started:

Understanding ownCloud Installation  (on Fedora)

ownCloud3 installation is simple. On Fedora Linux (Fedora 16), these are the steps you would need to follow: (Soon I think there will be a ownCloud package itself, till then, that is.)

UPDATE: This shell script here does the job for you.

  1. Install the following packages: ($ sudo yum install)
    • httpd
    • php
    • php-mysql
    • php-mbstring
    • php-devel
    • mysql
    • mysql-server
    • zlib
    • zlib-devel
    • pcre-devel
    • phpmyadmin
  2. Install the php-zip module as outlined here
  3. Download ownCloud3 sources from here
  4. Extract and copy the resultant owncloud/ directory to /var/www/html
  5. ‘cd’ to /var/www/html and set appropriate permission to owncloud directory so that apache can read/write from/to it: $sudo  chown -R apache:apache owncloud/
  6. Start Apache server: $ sudo service httpd start
  7. Start MySQL server: $ sudo service mysql start and change the root password using $mysqladmin -u root password PASSWORD
  8. Create a MySQL database that you want ownCloud to use by going to: http://localhost/phpmyadmin (This step is optional if you want to use SQLite database)
  9. Start ownCloud: http://localhost/owncloud and setup other users or simply start using for storing files
  10. Use PageKite to make your cloud publicly accessible as detailed here

ownCloud appliance with BoxGrinder

BoxGrinder is a tool to create software appliances for different virtual machine applications and cloud computing providers. It requires an appliance definition file (.appl file) where the base operating system, the software to be installed and other configuration of the appliance is specified.

Next, we shall follow our earlier steps to install ownCloud on Fedora to create an ownCloud appliance based on Fedora with BoxGrinder.  The appliance definition file is here.

Most of it is self-explanatory if you have familiarized yourself with the appliance definition structure. Here I shall talk about the last two sections of the appliance definition file:

    – “http://pecl.php.net/get/zip”
    – “http://owncloud.org/releases/owncloud-3.0.0.tar.bz2”

If you refer to the steps 2 and 3 of the installation steps, you will understand the reason for downloading these two files in /opt.

    – “cd /opt;/bin/tar -zxvf zip;cd zip-1.10.2;phpize;./configure;make;make install;/bin/echo ‘extension=zip.so’ >> /etc/php.ini”
    – “cd /opt;bunzip2 -d owncloud-3.0.0.tar.bz2; /bin/tar xvf owncloud-3.0.0.tar;cp -r owncloud /var/www/html/;”
    – “cd /var/www/html;chown -R apache:apache owncloud/”
    – “/usr/bin/curl -s https://pagekite.net/pk/ | /bin/bash”

The first three lines carry out the steps 2-5 of the installation instructions. The last line installs PageKite to enable setting up a public access

Next,  we shall build the appliance. We shall build this appliance for use with VirtualBox. Here is the command: 

$ boxgrinder-build -p virtualbox f16-owncloud.appl -d local –delivery-config path:/home/gene/builds

This command will build the appliance and place the gzipped .vmdk file (about 1.4G) in /home/gene/builds. The next step is to create the virtual machine with this as the storage media.

Getting Ready to Serve

Once you have created the virtual machine, boot it and login as the root user (the default password is ‘boxgrinder’. (Enable PAE support from Settings->System->Processor). Then carry out steps 6 and 7 from the installation instruction.

Once that is done, setup PageKite: $pagekit.py –signup and follow the steps. Once the sign up is done, setup your kite using $pagekit.py 80 <yourname>.pagekite.me

Next, carry out steps 8 and 9 from ANYWHERE on the web by replacing localhost by: <yourname>.pagekite.me

ownCloud appliance in VirtualBox

And you have your very own ownCloud instance running from a Virtual machine. I hope to experiment with creating appliances for EC2 and others.

Thank you for reading. Kindly let me know if something didn’t work the way it should, or something could be improved here.


I faced a couple of issues while building this appliance. I have posted my query to the BoxGrinder forum here.