Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Firstly thank you to everyone who responded to my earlier question -

As much as I would prefer to use a web based solution, the svn server is to be implemented in the office.

We are currently running FreeBSD on our server, I am currently looking for information on setting up a SVN repository on the server with the command prompt.

I have used terminal commands on Ubuntu in the past so I have some idea but I am nowhere near a expert. I have come across a handful of tutorials however they seem quite different and seem to skip a few bits. Im really looking for a step by step guide on setting up a repository and its users. Ideally a beginners guide so I know exactly whats happening.

I would really appreciate any hints or pointers in the right direction.

Thank you for your time.

share|improve this question

migrated from Sep 11 '09 at 2:31

This question came from our site for professional and enthusiast programmers.

4 Answers 4

I advise you at first try to use svnserve daemon which comes with subversion. It uses its own protocol over TCP, so for all operations with repository you'll be using a svn:// URL scheme, for example:

% svn checkout svn://localhost/myproject

So, after installing devel/subversion port:

# cd /usr/ports/devel/subversion

you will get a fresh empty repository in /home/svn/repos. The Port also will create svn user and svn group (check for both of them in /etc/passwd and /etc/group files to be sure).

Then, add this lines to yous /etc/rc.conf:

svnserve_flags="-d --listen-port=3690 --listen-host"

Change to another IP, accessible from other machines, if you need that. Start daemon with the command:

# /usr/local/etc/rc.d/svnserve start

If no errors occurred, check running daemon:

# /usr/local/etc/rc.d/svnserve status
svnserve is running as pid 65968.


# sockstat | grep svn
svn      svnserve   65968 3  tcp4        *:*

OK. Now you'll need to create a per-user authentication for svnserve. This is done by editing /home/svn/repos/conf/passwd file, for example:

bob = password
joe = another_password
alex = yet_another_password

Then, make sure that in /home/svn/repos/conf/svnserve.conf file exists this lines:

anon-access = none
auth-access = write
password-db = passwd

That's it. Now you can import your sources into this repository. For more information please read

share|improve this answer
just a note, im not sure why, but the installer for me used the user 'www' and group 'www' –  Christopher Chase Nov 16 '10 at 1:26

Version Control with Subversion is the source I usually turn to for Subversion information. Chapters 5 and 6 look like they might get you in the right direction.

share|improve this answer

I recommend accessing the repository with HTTP, which will simplify many things for the clients (specially if they are behind a firewall). I like going the Apache way.

share|improve this answer
$ su -
$ cd /usr/ports/devel/subversion
$ make install clean

Answer the questions asked during installation, and you should get a working subversion installation.

If you don't get the dialog asking for configuration options type

$ make config

To allow enabling the apache module, svnserve and a few other options.

share|improve this answer
But no server, as far as I know... –  bortzmeyer Sep 14 '09 at 8:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.