Your Own Private Dropbox
Ever wanted to have a dropbox? Ever wanted to have a place where you could store, access and search through your local files held on one computer all over the world and don´t have to worry about data recovery again?
The definition of the dropbox service is that you have access to a web-based file hosting service that is operated by Dropbox, Inc. that uses cloud computing to enable users to store and share files and folders with others across the internet using file synchronization.
So firstly let’s go into a bit of background on the service. It was originally founded in 2007 by Drew Houston and Arash Ferdowsi, there are two service based plans. There is a free and a paid service, each with varying options or conditions. Based on the free service you are allowed to privately host anything up to 2GB in files which can be accessed on a number of differing platforms; everything from Windows, Mac OS X, linux and also a range of mobile devices including Android, Windows, IOS and Blackberry. Now because this is fully hosted on the cloud you can also access any of your files using the internet browser when there is no local client for you to use.
What I am going to detail below is an accurate and thorough guide to running your own private dropbox service without any of the limitations you could encounter while access it through a paid service. You could say that this is true cloud computing and the only limit, is the size of hard drive you store the files on to.But you can also search online for a carbonite offer code
Now before I begin to go into details, I will warn you, this guide will be quite technical. For post people you will not feel the need to ever use this guide or use any of the features out of it. For everyone else technically based or that has an interest in doing something really cool and exciting, join me as we go through how to make something wonderful for yourself and you family to enjoy!
Requirements:
- Preferably your own dedicated server with ssh access, or access to one at least
- A Windows, Linux or Mac OSX client (whatever machine you want to test on)
- Unison server and client software
- Glade/Gtk+
- freesshd
Another introduction to make. Unision is the handler that we will be using to deal with the task that we have in hand. It is a file synchronization toolkit that can be installed on multiple different file systems to sync files and directories across multiple platforms. In a sense it forms the same attributes as rsync in the way that it can manipulate, update and sync files where there are specific differences within a file structure. However it can also deal with something rsync cannot deal with, the deletion of files and directories. I have seem this happen myself many a time where rsync can’t deal with delete commands and therefore you need to run “rm -f foo.bar†to remove the file before being able to proceed.
We will rely on Unison to handle and manage the connections and security including the authentication during transfer.
Step One:
Install the Unison server on the host, in my case Ubuntu 11.04
sudo apt-get install unison
Simple as that….
If you wish you can unpack and build from source, but seeing as it is a properly developed package I see no reason to muck around with configurations when it is already all set up for you.
Step Two:
Identify the client machine that you are going to be using, in my case a brand new HP Laptop running Windows 7.
Install GTK for Windows– after a lot of hunting around I was able to find a suitable installer as part of a project called “Glade†follow this link Installer .
Step Three:
Install an ssh server on your windows machine to connect to the host – freeSSHd is what I used here, allowing you to technically run an ssh command from your cmd.exe shell allowing you to connect directly to your linux box.
Once unpacked move to the Windows directory and run the GUI that goes with it. You will be required to set up a user for this system to actually work and so that it can use the shell.
Ensure that it is installed as a service, verify that the ports are open on your firewall application and that you restart your machine for them all to take effect.
Step Four:
Configure your environmental variables – Unison expects to find “Homeâ€, but as you are running in windows you will need to configure this as “$C†for your C: drive.
Step Five:
Download and install PuTTY and Plink.exe, put these into your Windows directory and download the Unison-ssh wrapper and verify it is in you Windows directory as well – The ssh wrapper will be what determines how to direct the ssh calls that will be made by unison on the command line.
Step Six:
Download and unpack the Unison binaries for windows. At this point your best move is to rename them to “unison-gui†and “unisonâ€. Ensure that these are in your path and that the text version is called “unison†as that is what the server will be looking for.
N.B. Ensure that you install the same binary version as what you are running on the host server, otherwise there will be a mas-match and although there is documentation to say you can use the version no flag it doesn’t work. I went round in circles chasing my tail trying to find the problem when it was the version number.
Step Sever:
Test out your ssh connection – You should be able to open up a command prompt and enter
“ssh -l username -pw password server “unison-version†“
This should return the current version of unison hosted on your server.
Step Eight:
Test your unison connection – you can do this by adding in the “-testserver†parameter:
“ssh -testserver -sshargs “-l username -pw password†c: ssh://server//â€
It should give you the response something like: “Connected [//server1/c:/ → //server2/c:/]
Step Nine:
At this point in the process I would encourage you to run “plink.exe†in your command prompt window as it saves any uncontrollable problems when unison does its initial sync.
Step Ten:
Run PuTTY and set up the host configuration with your username and save the configuration so that Unison will automatically connect. I would also encourage you to set up private key authentication, which would eliminate the need for you to enter a password every time you wanted to perform a sync. There are plenty of guides on the internet, so I won’t go into details it is pretty simple to do, you just need to find an easy explanation.
Step Eleven:
Run the Unison-GUI to configure your “share†directory and the user that will be syncing with the server. The menu here is pretty self explanatory. When you are setting up the host details ensure that you set it to use ssh as the method and detail the user name and also instead of using the full server address you can use what you have got it saved in PuTTY as.
Step Twelve:
Perform your first sync and thats it. Done! You are now the proud owner of a fully functional drop box servive that you control what you can do with. The world is in your hands, open you mind up free your soul and go do something you have never done before!! Live!
For mobile device synchronization I would suggesting finding a client that can run rsync, and for accessing files through the browser you will need to install a file explorer front end onto your server and ensure that port 80 is open to your server from the firewall/router.