SVN server on Synology DSM 5.0

It’s pretty easy to set up the SVN server together with WebSVN feature. I’m running DSM 5.0 on Synology DiskStation DS214se. Thanks to tagd from this forum post I managed to integrate WebSVN without hassle.

  1. Install SVN package through DSM Package Center
  2. Using the SVN diskstation package UI, create a repository and user who can access it
  3. Enable Web Station in DSM Control Panel and create new Virtual Host let’s say ‘websvn’ on port 80
  4. (Optional) Set up WebSVN
    1. Download WebSVN zip and extract it into a web/websvn folder we created through Virtual Host
    2. Make a copy of web/websvn/include/distconfig.php and rename it to config.php
    3. In config.php add one line somewhere around line 100 as follows:
      $config->addRepository('<repository name>','svn://<diskstation hostname or IP>/<repository name from step 2>',null,'<user from step 2>','<password>');
    4. If you wish to restrict access to the WebSVN page, follow this tutorial with the following updates to it.
      1. It is slightly outdated so if you use DSM 5.0 and later, substitute the /usr/syno/apache/ folder with /etc/httpd/.
      2. To have diff listing working add the following line to config.php somewhere around line 484:
  5. If you want to work with the repository from outside your local network, set up port forwarding for port 3690 (svn) and port 80 (websvn). If your router supports UPnP, enable the port forwarding easily in Control Panel -> Info Center -> Service.

It worked for me having installed DSM 5.0-4458 Update 1, SVN package v1.8.5-0024 and WebSVN v2.3.3.

4 responses to “SVN server on Synology DSM 5.0”

  1. Alfred says:

    Hi Michal,
    I’m using a DS216play since yesterday. Before I used a RaspberryPi for things like SVN, MySQL and so on. Now I want to use these services on my NAS.
    I have a big problem: access!
    I’ve created a repository and forwarded the port 3690 on my router to the NAS. After that I have access to the repository, but: everyone has access.. I’m using TortoiseSVN on my Windows PC and it asks no username/pass. Even if I do not set anonymous permissions.
    Commit it not possible (Authorization failed), because there is no username/pass asked before.
    Are you familiar with those problems? May you help me? Thanks a lot!

    • Alfred says:

      By the way: I’m using DSM 6.0.2-8451 Update 7

    • Michal Bocek says:

      Hi Alfred,
      I’m running also the latest DSM 6.0.2-8451. And it seems that what I set up in DSM 5 doesn’t work the same in the DSM 6. Strange. When I enter the websvn URL, it also does not require any credentials to get in to my repos and everything is viewable by anybody. I haven’t tried commits though. It seems to be a bug.
      My setup is like this and with DSM 5, when I entered the websvn URL I was forced to enter the credentials. Now it goes straight to the websvn UI with everything available.
      If you find out how to make it work, please let me know.

    • Michal Bocek says:

      Actually the access to WebSVN and to the SVN repositories are two different things. I had /volume1/web/websvn/.htaccess file created which restricts access to the WebSVN page. But with DSM 6.0 the backend for my WebSVN virtual host has been switched to some Nginx instead of Apache. So I switched it back to Apache and it works again.

      Anyway, try to edit the SVN repository as per, so you set up the users that have access to the repository. Let me know if it helps with your problem.

Leave a Reply

Your email address will not be published. Required fields are marked *