DIY Dropbox

I've been a Dropbox user for a long time. When I signed up, I wanted an easy, off-site backup, a way to share select files with others, and to be able to access my files from my other machines and my phone. For a while, everything was great. The client software worked flawlessly on Windows, MacOS, and Linux. Even the UI is excellent. But, I noticed that Dropbox started making it harder for people to access the files I shared with them.

It started by putting up optional sign up forms with a cleverly hidden opt-out link. Over time, sign up became mandatory. Now I can only share files with other Dropbox users. That's not what i signed up for. I understand that Dropbox needs to make money. Today, they do that by showing investors that they are growing. One key measure of growth is the number of user accounts they have. So, it makes sense to make every effort to get people to sign up. But, in this case, they are not gaining users through the value of their service – they are using the value of my relationships and my data to force people to sign up. Not cool, guys.

My plan was to substitute my VPS for the Dropbox service. Initially, I did some experiments with rsync. It's actually quite powerful and well-documented, but it doesn't handle deleted files very well. After a little more searching, I set up Bitpocket. It's a script that extends rsync with sophisticated handling of deleted files. It also keeps backup information and provides a synchronization log. Bitpocket runs on my desktop and syncs changes with a set of folders on my VPS. This is the foundation of my DIY Dropbox solution and serves to backup my files. Next, I need to share files with others and access my files from my phone.

To access these files from my phone, I needed a file transfer app. I installed vsftpd on my VPS and installed a secure ftp client on my phone. I had to put a copy of my key file on my phone so that the sftp client could connect to my VPS. Now I can easily transfer files between my VPS and my phone.

There are two ways I share files with other people. One is to share a file with a specific person or people. The other is to make a file available publicly. In the first case, I can download a file to my phone or desktop and then attach it to an email. This can be cumbersome or impossible for very large files, but does the job for smaller files like PDFs and images. I haven't worked out how to privately share very large files. This could be accomplished using a simple web application that generates a unique key that is associated with a given file. This application would just need to stream the file associated with a requested key. Alternatively, I could encrypt the file with the intended recipient's public key and share the encrypted file publicly.

To publicly share files, I set up Apache web server on my VPS. I drop the files I want to share into a folder that is symlinked from a folder accessible to Apache. Once the file is in place, I can just publish a link to the file. If someone wants to go hunting, that's fine, they will only find files that I've chosen to share with everyone.

That's it! I have, more or less, replaced Dropbox with Apache and vsftpd on my VPS, rsync/Bitpocket on my desktop, and an sftp client on my phone. That said, this doesn't replace any of the collaboration features of Dropbox, but the reason I signed up with Dropbox in the first place was to share files with people without requiring them to sign up for something they may not want or need. In addition, I'm sure there are a lot of interesting things I can do with such a loosely-coupled solution.