Archive | January 2014

The owncloud odyssey – Part 2

Ok, lets cut to the core here. This is how I installed and set up the owncloud on my dad’s server pc. I assume you got a running linux os, preferably one that works with owncloud without having slow sync speed!

Open terminal

sudo apt-get update
sudo apt-get upgrade

Make sure you got a up2date installation.

sudo apt-get install owncloud

BAM! That’s basically it, well at least from an installation point of view. Now you gonna see alot of stuff going on on the screen, including php, mysql and apache2 being installed. Those are required for owncloud to run properly or run at all. You could go through the “hassle” and install the “LAMP-Server” on its own before hand, but why would you if it is this easy anyway?!

You will be asked for a mysql password and that kinda stuff and it might take some additional steps afterwards but if you follow the basic lines of this guide you should be good to go. It wasn’t that complicated. The apache runs pretty much straight out of the box.
Go open Firefox and type “http://localhost ” in the addressbar, or go check it out on another computer on the network with the IP address of your machine that is running the apache. If you see an “It works” kinda webpage, it’s all cool and the apache is working for now.

Now to go on with the owncloud installation, we need to configure mysql. Well, at least I did that pre-owncloud configuration, don’t know if you really need it.
Still in terminal type the following:

mysql -u root -p

This will enter the mysql console in which the commands from here: – really help!
To create a new database for your later owncloud installation type:




to leave the mysql console and be back at the bash. Basically you are now set to go for the owncloud easy configuration via the webfrontend.
Go to your browser of choice, preferably the one you checked your apache server with, maybe the “It works” page is still open, and append /owncloud to the previous address. It should look something like this:


or with an ip (example)

You should see a configuration inputmask. The top segment with the username and the password, and the second segment below for your database configuration and where the owncloud should store the main data which is uploaded. Choose a username and a password of your liking. The folder where owncloud stores the uploaded data will be


for me, since I configured xubuntu on installation to have the /home/ folder on a seperate harddrive. For me, I had to create the /home/username/owncloud/ folder beforehand and grant rights so owncloud can create files and folders within. To do that simply type the following into the terminal:

sudo chown -R www-data:www-data /path/to/your/owncloud/data

In my case:

sudo chown -R www-data:www-data /home/username/owncloud/data

Helpful link:

Fill in the database details as you previously created a user and the database:

"dbtype" => "mysql",
"dbname" => "owncloud",
"dbuser" => "username",
"dbpassword" => "password",
"dbhost" => "localhost",

I didn’t create an extra user, which is probably a horrible mistake I heard, but that’s not to matter now.
Click the button and after a couple of seconds you should be able to see the main owncloud file-manager interface with an add which points you to the existence of iOS and Android apps of owncloud, more on that matter later. For now you just successfully installed and configured your own cloud on a private server pc.


The owncloud odyssey – Part 1

The last couple of weeks have been on and off for me. I was busy doing all sorts of stuff and didnt really get going on the xubuntu laptop of mine to work things out and test things out and so forth.

I tried installing and setting up an email server on my xubuntu system but so far just got it installed but sadly not running,…oh well, maybe it is running but I can’t really access it via a webinterface nor do I know how to access it with a proper email client like Thunderbird or something alike. So the email project has to wait. Instead I had the wonderful idea of introducing my father to owncloud.

There’s nothing wrong with my father but the home network structure is just wack. I had to set that up “properly” couple of weeks ago, still didn’t manage to sketch a blueprint of it for later use and adjustment. So, they got a couple of pcs in the building. Mainly a macbook connected via wifi and three computers on the office LAN, of which 2 are the main pcs we take into the equation. Owncloud would be an awesome solution for this setup to fulfill all my fathers wildest “Data Backup Dreams” – there is a bit of chaos involved in working on a couple of computers on basically the same files but they are never in sync and you have em backuped like 10 times not including the real backup where they are also stored like 10 additional times. So in the spirit of spring house cleaning we set out to breakdown this backup chaos into little bits of merging things together.

To cut all the story, we are now set out with the plan:

1. Get the Macbook data to be cleaned and streamlined, no double files.

2. Get the PC1 data to be cleaned and streamlined, no double files.

3. Setup the owncloud server on PC2 to make the merging and syncing of data easy.

4. Optional goal that developed from working on things: Get the owncloud accessible online via webbrowser and/or iphone app – at best via https (ssl)

Since I am not involved in cleaning my fathers data and because its not really a part of this blog I cut right to the core now. Point 3 and 4 shall be of our interest.

We installed Ubuntu 12.04 LTS on PC2, from now on called “the server”. It’s a pretty old machine, single core, maybe 1.6ghz and 768MB RAM, but it was spare and we have some 250GB HDD + 60GB for the System on it. Installing Ubuntu isn’t really much of a hassle if you got no special plans but we wanted to have the owncloud data stored in the home folder of the main user. I configured the 60GB HDD as ext4 and made it root and added a couple of gigs as swap from the same hdd. The 250GB drive was mounted /home/ (dont know if that makes sense, I am a noob) so the home-folder would have all the space it needed with the owncloud data folder in it. This is the basic setup I made out to work. And it did and does but sadly Ubuntu doesn’t really work well with owncloud it seems. After setting up everything it turned out the sync speed was slow as hell with clients on windows and macosx. This seems to be a common problem since almost over a year now and there is no real solution to the problem it seems. It has to do with a huge amount of small files it seems.

Switching from SQLite to MySql helped resolve this issue for some people. Installing php5-apc has helped some other people resolve the issue. Configuring MySql to have db_host be instead of localhost has helped some other people. Unfortunately nothin of the above helped in our case. Gladly I stumbled upon a thread in which a user hinted that the problem might come from Debian based distros, he switched from Ubuntu to ArchLinux and the sync speed increased tremendously. I checked my own Xubuntu to Windows7 syncspeed and everything seemed to work fine.

So we deleted Ubuntu on the server and installed Xubuntu 12.04.3 LTS on it with the same HDD mounting setup. Turned out this resolved the issue for us. Why, we, I dont know but it works now and I like it to stay that way. The old machine runs way better anyway with lightweight xubuntu instead of Ubuntu. And I even got the cloud being accessible from the internet.

But more on all the details in the next post.