ownCloud progress

It turns out Ubuntu does not make it as easy as I expected. I was confronted with this non descriptive error message on the client when I launched and tried to sync.

There wasn’t much more to the error message on the clients. The ubuntu server apache logs sheds some more light on the issue.

[Wed Aug 14 11:58:03 2013] [error] [client w.x.y.z] script ‘/usr/share/owncloud/remote.php’ not found or unable to stat

The remote.php file is actually in another directory, but it still fails even if I link the file. The ownCloud forum has a post that indicates that the ubuntu package is broken and to rather use the downloaded package from their site, so that is what I did…

I followed the instructions on ownCloud doc installation. In summary the following is important.

Make sure all the dependencies are met, apache2, php5 etc. Most of it will likely already be on your system. If you’re not sure, you can take the easy route, apt-get install owncloud, and then remove the package. The dependencies will remain.

# tar -xjf owncloud-x.x.x.tar.bz2

# cp -r owncloud /var/vhosts/

# chown -R www-data:www-data /var/owncloud/ /var/vhosts/owncloud

I decided to host the data and web server in two difference locations in the example above. You can always choose another path or use the defaults.

Also perform the following:

# a2enmod rewrite

# a2enmod headers

You will also need to add a vhost for your site or use the default landing. Make sure AllowOverride is set to All to enable .htaccess.

Thats all there is to it. Point the client to your ownCloud service and voilĂ . In the background we have my browser opened to my ownCloud server, the local folder with the text file and the open text file.

Cloud storage

I experienced a small bit of frustration recently when Dropbox thought it was a good idea to delete about a third of my about 10 GB of data. Fortunately, with a bit of effort I could perform a restore on the lost data, one file at a time.

Now we use services such as Dropbox because of the convenience, however, if it is no longer convenient, or even safe, then perhaps it is time to investigate alternative diy options. Don’t get me wrong though, I will probably never get rid of Dropbox, however, I will still want to use my own service for items I consider a security risk, such as work documents.

I have been toying with the idea of hosting a backup service for my data, specifically the stuff I usually backup manually and keep in sync between my various desktops and laptop. So why not just spin up something that will replace all the cloud storage I currently use on my own server.


In comes ownCloud promising many features:

  • File sync through a webdav interface,
  • sync contacts, calendars and bookmarks,
  • web access to said services,
  • and an api to build your own apps around ownCloud.


It seems simple enough. For the server on ubuntu it’s as simple as

apt-get install owncloud

This installs the server environment on your server, in my case, a droplet in Amsterdam.


On your workstation their instructions are simple enough to add the ppa to your repository.

# echo ‘deb http://download.opensuse.org/repositories/isv:ownCloud:devel/xUbuntu_12.04/ /’ >> /etc/apt/sources.list.d/owncloud-client.list


# wget http://download.opensuse.org/repositories/isv:ownCloud:devel/xUbuntu_12.04/Release.key


# apt-key add – < Release.key

# apt-get update

# apt-get install owncloud-client

The above is valid for 12.04 LTS, so just change the 12.04 in the first instruction to your version, e.g. xUbuntu_12.04 becomes xUbuntu_13.04. Now you have both a client and server installed. There are also windows and mobile clients – I’m not that concerned with them for the moment.

Using ownCloud

Its a breeze to use ownCloud as Ubuntu has already done all the work for you. Just point to your domain, http(s)://yourdomain/owncloud

First step is to create your administrator account, but that will fail. The database needs to be configured.

# mysql -u root -p


GRANT ALL ON owncloud.* TO ‘owncloud’@’localhost’ IDENTIFIED BY ‘some_password’;

Under the advanced selection you can enter the db details as configured above. Choose a suitable username and password and Bobs your uncle, you have an ownCloud server.

I’m not sure yet where the data is stored, must be somewhere sensible. I also expect to be able to change the target folder once I add more storage to the system. We’ll explore that in a follow up post.