Using svnserve for my local svn repositories

At some point in history, I switched from using my own LAMP setup to using Xampp for my local development projects. Overall, I’ve been happy with Xampp. I’ve even been able to get XDebug working and access my local Subversion repositories via Xampp’s Apache server (by building my own mod_authz_svn and mod_dav_svn Apache modules).

Unfortunately, in a recent upgrade of Xampp (from 1.6.3 to 1.6.6) my hand-built Apache *_svn modules became incompatible with the newer version of Apache in Xampp. Since my copy of Subversion (1.4.4) had become slightly outdated, I rebuilt a newer version of Subversion (1.4.6) to get the needed modules.

Compile it yourself

That’s when the problem’s began. Although, I had configured the Subversion build scripts by doing the following:

./configure –with-axps=/opt/lampp/bin/axps

The resulting mod_authz_svn and mod_dav_svn were not compatible with my version of Apache.

Just use svnserve

My solution: use svnserve instead of the Apache modules. The fact is, it was easy to get it working, and I needed to get back to work.

Starting svnserve using the -d option worked the first time. I just had to switch my repository to use a URL like this:


(When I get time, I’ll try to get svnserve to load through inetd.)

Restricting the repositories

Even though my server is not accessible outside my home network, I still like to be secure. So, the first thing I did was restrict svnserve to a certain repository path:
svnserve -d -r /path/to/my/repositories

To access a repository in this case, we just use a relative path:

Authentication and Authorization

Using svnserve, I’d like to allow read-only access to anyone and write access only to authenticated users. So, we first create an svnserve.conf file (in our repository’s conf directory) like this:

anon-access = read
auth-access = write
password-db = /path/to/my/password/file
realm = Greg’s development repository

By the way, the path to the password-db is either relative to your conf directory or a full path. Using a full path allows you to use a single password file for multiple repositories (which is good for personal use).

The password file takes the following form:

username = password

The only annoyance is that the password is not encrypted in any way – it is plain text. So, be sure to restrict access to your password file.