How To Install Apache Subversion on Debian 11

Install Apache Subversion on Debian 11

In this tutorial, we will show you how to install Apache Subversion on Debian 11. For those of you who didn’t know, Apache Subversion (SVN) is an open-source version control system built by Apache Foundation Team. SVN is used by Software Developers to maintain historical and current versions of source code, documentation, web pages e.t.c.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Apache Subversion on a Debian 11 (Bullseye).


  • A server running one of the following operating systems: Debian 10 or Debian 11.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Apache Subversion on Debian 11 Bullseye

Step 1. Before we install any software, it’s important to make sure your system is up to date by running the following apt commands in the terminal:

sudo apt update
sudo apt upgrade

Step 2. Installing Apache Subversion on Debian 11.

By default, SVN is available on Debian 11 base repository. So, now we install the latest stable version of Apache Subversion packages using the following command below:

sudo apt install subversion libapache2-mod-svn libapache2-svn libsvn-dev subversion-tools

After installation, enable required Apache modules and restart the Apache service:

sudo a2enmod dav 
sudo a2enmod dav_svn 
sudo service apache2 restart

Step 3. Configure Apache Subversion.

Now we edit the SVN configuration file in sudo mode with the use of the following command:

sudo nano /etc/apache2/mods-enabled/dav_svn.conf

Add the following file:

Alias /svn /var/lib/svn
<Location /svn>

   DAV svn
   SVNParentPath /var/lib/svn

   AuthType Basic
   AuthName "Subversion Repository"
   AuthUserFile /etc/apache2/dav_svn.passwd
   Require valid-user

Save and close the file, then restart the Apache service to take effect:

sudo systemctl restart apache2

Step 5. Create SVN Repository.

Now we create a new repository with the name myrepo. Also, set the required permissions on newly created directories: sudo mkdir -p /var/lib/svn/ sudo svnadmin create /var/lib/svn/myrepo sudo chown -R www-data:www-data /var/lib/svn sudo chmod -R 775 /var/lib/svn

Step 6. Create SVN Users.

We specified in the SVN Apache configuration file that user authentication information be saved on /etc/apache2/dav_svn.passwd. Let’s create our admin Subversion user:

sudo htpasswd -cm /etc/apache2/dav_svn.passwd admin

To create additional users, use the following commands:

sudo htpasswd -m /etc/apache2/dav_svn.passwd meilana 
sudo htpasswd -m /etc/apache2/dav_svn.passwd maria

Step 7. Accessing Repository in Browser.

Once successfully installed, open your web browser and access the SVN using the URL You will be redirected to the SVN repository interface page:

Install Apache Subversion on Debian 11 Bullseye

Congratulations! You have successfully installed SVN. Thanks for using this tutorial for installing the latest version of the Apache Subversion (SVN) on Debian 11 Bullseye. For additional help or useful information, we recommend you check the official SVN website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button