Setting up Subversion (SVN) on Windows Home Server
Having my Windows Home Server quietly running in the closet and backing up all home computers, it would seem natural to use its storage for something more than keeping a couple of pictures and songs. Installing a Subversion server is both easy and useful. Using SVN to manage your projects, even the smaller part time ideas, is a good way to discover some of the intricacies of using source control. And, as some people say, learning the details of source control is a must.
Installation
Log in to your Windows Home Server box using Remote Desktop and download the latest installer binaries from the Subversion website. There are many different versions of SVN available. This may sound confusing, but the package you should most likely install is the one with Apache bindings, even if you won't use the source control server with Apache.
After installing the Subversion software, you should now have the installation folder listed in your PATH environment variable. The following commands should work if you open a command prompt after the installation (otherwise, simply navigate to your SVN installation folder).
Creating a repository
In order to setup your first source repository, that will be managed by Subversion, you'll have to create a new folder for it somewhere on your hard drive. You could use a shared folder on your server, but some argue that the replication feature would cause conflicts and could potentially corrupt your files as they are written by the SVN service. The safest option therefore seems to be a simple folder on the server's D: drive (without replication). In this case we'll use D:\Svn as root for the entire Subversion server and the subfolder D:\Svn\repository as first code base.
When the folders have been created, open a command prompt and use the svnadmin create command to add the folder as a repository:

You may want to customize access to the repository by editing the files in the \conf folder. For instance, the \conf\svnserve.conf file contains general settings that determine how clients can access and authenticate. In order to restrict access to a selected list of users, your svnserve.conf file should contain:
[general] ### ... anon-access = none auth-access = write ### ... password-db = passwd
The \conf\passwd file contains the list of allowed users and their respective passwords. Add your user account in order to gain access to the repository once it is started.
Remember that you can repeat those steps to create other repositories with entirly different access credentials.
Subversion as a service
The subversion server can be run as a Windows service: this means that it will not need to interact with the user to run and it will autostart when the operating system botts, even if no user is logged in.
Launch the following command on a command prompt to install SVN as a service:
sc create svnserver binpath= "C:\Program Files\Subversion\bin\svnserve.exe --service -r D:\Svn" displayname= "Subversion server" depend= Tcpip start= auto
After the command has executed successfully (you must be extremely careful with the "equals" signs and the space characters, since the sc command seems very picky about the command line formatting), you should find your "Subversion server" service in the Windows service list.
Before letting the service run, you should change the user account running the service for security reasons (it's never a great idea to let something run with Administrator privileges). This can be done very easily by accessing the service's properties on the Windows service list.
Now reboot or start the server with the command:
net start svnserver
Accessing the Subversion server
Your SVN server should be up and running now. The client computers on your subnet will have to access the server using the Home Server's IP address.
However, if you use your router's port forwarding feature and install the Windows Home Server box as a "virtual server" for the 3690 TCP port (the only port used by Subversion) you will be able to access your code repository from all around the planet as long as you have a working internet connection (and your server is still up).
Fortunately Windows Home Server already presents a dynamic DNS feature out of the box, which will let you choose a <username>.homeserver.com domain if you want to. Therefore, accessing:
svn://<username>.homeserver.comwill redirect directly to your repository.




Hi Thank you very much for this tutorial there is only one problem in the section subversion as a service you have got the path wrong. looks like a type so should be easy to fix.
atm it is
sc create svnserver binpath= "C:\Program Files\Subversion\insvnserve.exe --service -r D:\Svn" displayname= "Subversion server" depend= Tcpip start= auto
it should be
sc create svnserver binpath= "C:\Program Files\Subversion\bin\svnserve.exe --service -r D:\Svn" displayname= "Subversion server" depend= Tcpip start= auto
you where missing the \bin part once again ty very much for the tut