Tag Archive | https

The owncloud odyssey – Part 3

This post was in draft and I never published it apparently. I just gonna leave it here, even though I can’t recall where I was going with it.

 

We got our owncloud running. Its working in the LAN network setting. You can connect with the sync client with the http://your_server_ip_here/owncloud and your previous put in login data for your newly setup owncloud user. Its working awesome on the home network. My dad can finally backup and sync all of his childhood pictures and stuff on 3 and more computers at home.
Now I brought up that it would be really easy to setup the server to respond to online requests,…. stupid me. Well, I had used a dyndns provider before and had people connect to my own minecraft server but this is a different ballgame I found out.

What we want and what we need:

1. DynDNS hoster, we gonna go with noip.com, free domain redirect, working linux ip-updater, only have to login once a month to keep the account active.
2. DynamicUpdateClient for linux/Ubuntu provided by noip.com in this case
3. owncloud iOS App
4. Apache working with ssl for https
5. quite some patience

1. We start with the acquisition and setup of the noip.com account cause we need the username and password during the installation of the dynamic-update-client. So go over to http://www.noip.com and make an account. Choose domain name of your liking, we gonna go with example.no-ip.biz – note the – between no and ip which isnt in the usually noip.com domain. This is important cause if you put in the url without the litte “-” you will end up on some other website which is not your own apache-server. The basic setup should suffice, you got some options how the redirect works but the normal method should do. And it will once we got the ssl setup properly.

2. Install the dynamic-update-client for noip.com on your server-machine by following this guide: http://www.noip.com/support/knowledgebase/installing-the-linux-dynamic-update-client/
For me the second method worked, there was no noip2 nor no-ip in the repository apparently. Meh, nevermind, the tar file worked aswell, cant go wrong if you follow the steps.
To have this service start on every boot you need to make some adjustments. Type the following in the terminal:

sudo nano /etc/rc.local

A file opens in the editor and just before the line that says: exit 0 add in /etc/init.d/noip start
CTRL+o to save and CTRL+x to leave the editor again. Reboot your machine and type the following to see if it worked:

sudo ps -aux | grep noip

Result should look like this:

Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
nobody 1724 0.0 0.0 2380 784 ? Ss 00:57 0:00 /usr/local/bin/noip2
kevdog 2076 0.0 0.0 4448 796 pts/0 S+ 00:57 0:00 grep --color=auto noip

So this means your DUC is installed and running and autostarts after boot. To check if this works go to your browser and type: http://example.no-ip.biz – It propably wont work because we havent opened any ports in your router yet, but you could try anyways.

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 127.0.0.1 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.