How to Setup SVN Server on Windows

If your working environment is Windows then you can setup Visual SVN repository just in few minutes. It’s easy to use and absolutely free for commercial projects development.

Install Visual SVN server

Download Visual SVN server installer and follow simple steps to get it installed into your system.

VisualSVN installation step 1

I would recommend to have both server and Management Console components installed.

VisualSVN installation step 2

Pay attention to your repositories location directory. Avoid long paths and spaces, use different drive if possible.

If you planning to access it form outside I would highly recommend to use secure HTTPS connection. Or you can use HTTP in case if it’s for local use only or isolated in internal LAN. If you are not sure – don’t worry, this can be reconfigured at any time after installation.

As for authentication I recommend to use Subversion build in authentication.

Visual SVN setup complete

That’s all!

Create SVN user and group

Now when we have everything in place it’s time to create a user account and a repository.

Create SVN Repository user

 

Right click on Users folder in the left panel and select Create User… provide username and password and click Ok. I’ll create and account for a mysterious developer Alex. I would recommend to use lower case characters only and no special characters in usernames.

Create SVN Repository group

 

The next step is to create a group and assign Alex to it. It’s an optional step but it’s best practice to manage permissions on groups level instead of giving rights to users directly. Let’s create “developers” group.

Add user to the group

Create new SVN repository

The next step is to create a project for Alex and grant him required permissions

Create SVN repository

 

Right click on Repositories element in the left panel and select Create New Repository…

SVN Repository creation dialog

 

It’s recommended to tick Create default structure option in order to get default SVN project structure created automatically. In case you didn’t do this you always can create trunk, branches and tags directories manually. Press Ok to complete this task.

Open repositories properties

Now it’s time to fix default access rights. Right click on Repositories and select Properties… from context menu.

Everyone have read and write access by default

As you can see by default Everyone have read/write access an all repositories. This is bad practice so we’ll fix access rights removing Everyone from the list.

Change default configuration of the repository

 

Now nobody can access repositories and it’s time configure access right for our new “mega project”. Right click on your project repository and select Properties…

Grant read and write rights for developer

Add developers group with Read / Write access and confirm by pressing Ok.

 Testing configuration

The simplest way to test if everything is setup properly is to browse repository in web browser.

Test configuration

 

Select the top level element in the left panel and find Server URL in Dashboard on the right side. The server is using self signed certificate that required to be added to the browser. Normally browsers warn about such certificates and you should confirm you like to add this certificate anyway. This is how it looks like in Firefox:

Self signed certificate warning

Then confirm that you happy to add this certificate permanently and you’ll get a login dialog box.

Browser login

 

Provide your username and password in order to login.

Browser forbiden

 

Ups… Now you are logged in but getting this message because you have no rights to browse all repositories. To fix this add your project name to the end of the URL. In my case it’s https://ruslan-pc/svn/mega-project/

browser-done

 

Now everything works as expected and you can commit your project and start using the repository.

Conclusion

Now you should have your SVN repository server ready for action. However I wouldn’t recommend to use it more that for playing with configuration or learning SVN. I would highly recommend to seriously think about hosting somewhere outside your PC and the simplest (and cheapest) option is to use a hosted repository provider services. You can check the list with various subscriptions from different providers on the home page. Review it carefully, check their website and pick the option that fits for your needs.

3 Responses to “How to Setup SVN Server on Windows”

  1. Wonderful……….
    This helped me a lot to configure it in my personal laptop

    Thanks a log once again

    Thanks,
    Moganna Gowda

  2. Karthik says:

    Thank you so much. This article really helped for me alot.

  3. Sumit D says:

    Thanks A lot guys for helping me by this tutorial:-)

Leave a Reply

SVN and GIT HOSTING

Source repository hosting

FAQ

BLOG POSTS

HOT OFFERS