Setting up Subversion on Windows Home Server
Friday, November 21, 2008 – 10:08 AMI’ve been thinking of other ways to put my Windows Home Server to good use and my recent trip to Florida got me exploring ways I could work on a couple of personal coding projects while traveling. Eventually much of this code may well get published on CodePlex but for now it’s very incomplete and I need somewhere to work on it.
I’ve been using Subversion for a while. It’s small and simple enough to run on my development machine at home to give me source code control on small personal coding projects (read more about the development tools I use). I needed to expose a server so I could access it remotely. Windows Home Server already supports this, all I had to do was get Subversion running on it.
I ended up installing Subversion on my Home Server box using the VisualSVN Server installer. VisualSVN Server has a nice setup that installs the Apache web server and Subversion. The downside of this is I now have two web servers running on my Home Server box but the low friction install makes up for that at the moment.
Some notes on the setup:
- Overall the install process is very similar to installing the Squeezebox software I up on WHS last month.
- Remember to install everything into a \Program Files\ folder on the D: drive and not into the WHS system drive, which is very small and will quickly fill up.
- I created a D:\Repositories folder to store my Subversion repositories. The other alternative is to create a folder under D:\Shared but to turn off duplication for that folder, otherwise you’ll get file locking issues (according to this post).
- Assuming you already have your WHS setup to share folders and allow remote access all you have to do is reconfigure your firewall(s) to open a port for Subversion. By default this will be 8443.
You should now be able to open https://myserver.homeserver.com:8443/svn/ in a web browser and see you repository you created.
For a client I’m using TortoiseSVN and AnkhSVN, a Visual Studio plug-in for VS solution integration. I rarely have to resort to the Subversion console client.
VisualSVN also makes a VS client plug-in which I’m considering taking a look at although it’s $49 a seat.
Update 1st Dec: A friend here at Microsoft just pinged me to say they’ve set something similar up using Visual Studio Team Foundation Server 2008. I’ll probably be adding another blog post on how to set this up.
11 Responses to “Setting up Subversion on Windows Home Server”
Just want to say, thank you for cluing me in to VisualSVN. Just got it up and running, and am impressed so far. At first I was getting “405 Method Not Allowed” errors when attempting to browse the repository with TortoiseSVN, but then I enabled sharing of the Repositories folder and that seemed to have worked.
Question regarding remote access (from non-intranet). Is this possible? What needs to be done to enable secure remote svn access?
By pek on Dec 22, 2008
Pek,
Non-intranet access is definitely possible. You just have to setup your WHS to allow remote/web access. You do this from the WHS console. Click on the Settings button and open the remote access tab.
Ade
By Ade Miller on Dec 24, 2008
How exciting! Only one thing, is there any way to get the home server to back up the respositories since you have to turn duplication off? I want to have the security of knowing if the drive containing my repositories fails I can recover them.
By Jim Tomasko on Feb 1, 2009
Jim,
You have to do this with a separate backup script that shuts down SVN and then copies the repository to a WHS folder that is duplicated. I keep meaning wo write a script to do this but haven’t gotten around to it. I have my whole repository sync’ed on several machines so the code, but not the version history, is duplicated.
Ade
By Ade Miller on Feb 2, 2009
Thanks for this post. Saved me a LOT of time and gave great value!
I am very interested in learning how a script that backs up the repository could be written, so that SVN is stopped while backing up, and started after completion.
By Anders on May 23, 2009
Anders,
All you need to do is write a batch file and execute it using the Windows scheduler. It should use NET STOP/START to shutdown the SVN service before doing an XCOPY of the data from the repository root into a backed up share and then restart the service. If I get time I’ll write an example script at some point.
Ade
By Ade Miller on May 27, 2009
I just set up home server and VisualSVN. I can reach my home server and VisualSVN from home. When not at home, I can reach my home server using https://myserver.homeserver.com but cannot reach VisualSVN using https://myserver.homeserver.com:8443/svn/
I did set it up with port 8443. Where do I go from here?
By jeff on Dec 26, 2009
Jeff,
Have you configured your firewall to allow access to the additional port? I have port 8443 added to my persistent port forwarding list.
Ade
By Ade Miller on Dec 28, 2009
I’ve got svn working over internet (on port 8443), but I get the invalid cert warning. I know WHS creates an SSL cert, which is copied to clients when the connector is run. Is it possible to set VisualSVN to use that certificate and get rid of the warning (at least from client computers)?
Thanks,
Brett
By Brett on Jan 28, 2010