Working with SVN and DropBox without a dedicated SVN server

Posted in Productivity | SVN | DropBox at Wednesday, 24 March 2010 16:41 GMT Standard Time

What is DropBox?

DropBox is a service that keeps a certain folder in your computer sincronized with other computers (your laptop, desktop, dev server, your team`s dev machines, etc). Whatever file you put or change on your DropBox folder, it will be changed and syncronized across all your computers, whatever they are running Windows, Linux or Macintosh.

From web site:

  • 2GB of online storage for free, with up to 100GB available to paying customers.
  • Sync files of any size or type.
  • Sync Windows, Mac and Linux computers.
  • Automatically syncs when new files or changes are detected.
  • Work on files in your Dropbox even if you're offline. Your changes sync once your computer has an Internet connection again.
  • Dropbox transfers will correctly resume where they left off if the connection drops.
  • Efficient sync - only the pieces of a file that changed (not the whole file) are synced. This saves you time.
  • Doesn't hog your Internet connection. You can manually set bandwidth limits.

[read more about DropBox features on their web site...]

Ok, we are software developers, what about using DropBox as a code repository?

Some folks use DropBox as a code repository. DropBox allows file versioning and maintains the history of every change made on your code (see screenshot):

Using DropBox as source code repository
[Image: Using DropBox as code repository]

Yeah, but I prefer SVN for managing code (merging, tagging, branching...)

This DropBox thing is ok, but you sure prefer all the power behind SVN: merging, branching, tagging, etc... and of course, you may feel better knowing that SVN is open source (what if suddenly DropBox closes business and you lose all the history of your source code??).

In the other hand, you are a freelancer or a small team of developers and DON'T need or want to maintain a dedicated SVN server 24x7 on the internet.

The solution is pretty simple, keep reading:

How to work with SVN and DropBox checking code across computers with a global repository URL?

  1. Install DropBox in every machine you use for development. DropBox is multi-platform (Windows, Linux and Mac so far). If you use this link, we both get an extra 250Mb of free space.
  2. Install the proper SVN Server for your O.S, pointing the SVN repository to the DropBox folder, so it will be sincronized across all computers.
    Visual SVN Server for Windows

    Using DropBox as source code repository
  3. If you want to use a global SVN URL across machines (ex:, you need to modify hosts file so it points to localhost. The hosts file is used by your computer in the first attempt to resolver a name into an IP adress. You need to edit it, and add a line like this (make sure you open the file with the right permissions)  #whatever domain or subdomain you choose will work.
    Editing HOSTS file

    Cheching out from SVN using the global URL
    If you add the above line to HOSTS file in every computer, you could checkout a project like, no matter in which computer you are at, since every computer will resolve that to localhost, and will connect to the local repository sincronized with DropBox.

And you got it, you have just created a SVN environment that will be online 24x7 without a dedicated SVN server using DropBox!

AddThis Social Bookmark Button

Thursday, 25 March 2010 03:13:29 (GMT Standard Time, UTC+00:00)
While i like the idea of this, i don't believe it is "a SVN environment that will be online 24/7 without a dedicated SVN server.

There is a steep implimentation requirement (you still have to install a SVN on each target machine using this)

meaning this is not a server - just a backup of the repository (and this is scary as it is not a guaranteed that all the repo files will be HEAD version) - this is comparable to using visual source safe and this risks corrupting the REPO if a machine doesn't successfully synch everything.
Thursday, 25 March 2010 08:20:48 (GMT Standard Time, UTC+00:00)
Hi Doug, thanks for the contribution.

Since this is based in syncronizing repositories across machines, yes, there is a certain risk of the sync process failed (it never happen to me yet) that increases with the number of developers and machines involved. Well, if that happen, you can go to the DropBox history and see what failed and recover/fixe it, but it would be a pain.

I wouldn't use for larger teams (in that case you sure can afford a dedicated SVN server), but it works perfect for a freelancer that switch frecuently between laptop, linux/windows, desktop, etc.. and also will work really well for a small team of developers.

About having to install it in every machine, it is better saying that you need to install it in every work environment (ex: one SVN server on your home computer, and you commit from your laptop when you are in there, other SVN server in your office, also other SVN server in your laptop if you wan to commit on the way, etc...)

Friday, 09 April 2010 11:50:55 (GMT Daylight Time, UTC+01:00)
I have seen many posts about sharing an SVN repos to a dropbox. The only problem with this approach is redundancy: actually both SVN and dropbox are doing the same think about versioning (keeping history of files), except SVN is more source oriented and thus has many more options and knows how to manage conflicts etc.. what is annoying is that dropbox will keep a history of a repository that akready contains your files history, thus this is an enormous amount a wasted space after your respository grows: a "cumulative" waste of space I would say. It would be better idea if you could disable versioning in your dropbox account: your repository already contains all the history.

Saturday, 10 April 2010 21:07:25 (GMT Daylight Time, UTC+01:00)
I understand your point, but It does not bother me to have duplicated data on that way.

With more than 2Gb of free DropBox space (to start with), and being source code basically text, I don't think I will get to fill that limit ever "wasting" space in that way.
Thursday, 24 June 2010 16:16:08 (GMT Daylight Time, UTC+01:00)
While this seems like a great idea I can't get it to work. I setup VisualSVN on my laptop and have the repository in my Dropbox and it is working. I installed VisualSVN on my work PC and attempted to use the repository in Dropbox but the server won't start. If I choose another directory, either local or in Dropbox, the server starts fine. The laptop is off so the VisualSVN server is not running on it concurrently. Is there something I have overlooked?

Thursday, 24 June 2010 21:34:53 (GMT Daylight Time, UTC+01:00)

Did you check if the right file access permissions are set on the SVN rep folder on your work PC?
I also found that if you let VisualSVN manage folder access permission, DropBox processs user may not be able to read the files and update them.
Comments are closed.