Originally published on 2014-09-25; fully revised and updated.
If you need a lightweight Subversion server for a team or internal project, svnserve is the fastest path to get running. This guide walks administrators through installation, repository creation, access control, daemon startup, and first client operations with practical commands you can adapt to your environment.

What this guide sets up
By the end, you will have a working SVN repository served over svn:// with user authentication and basic authorization controls.
- Install and verify Subversion tools (
svn,svnadmin) - Create a repository at a server path you control
- Configure
svnserve.conf,passwd, andauthz - Start
svnserveas a daemon - Import source and run checkout/commit from clients
SVN server setup workflow
flowchart TD
A[Install Subversion] --> B[Create repository]
B --> C[Configure auth and access]
C --> D[Start svnserve daemon]
D --> E[Import initial code]
E --> F[Client checkout]
F --> G[Daily commit and update cycle]
Install and verify Subversion
Package commands vary by Linux distribution. Install Subversion, then verify both client and admin tools are available.
# Debian/Ubuntu
sudo apt update
sudo apt install subversion
# RHEL/CentOS Stream/Fedora
sudo dnf install subversion
# Older RHEL/CentOS
sudo yum install subversion
# Verify installation
svn --version
svnadmin --versionCode language: PHP (php)
Create repository storage
Use a dedicated root directory for repositories. In this example, a single project repository is created at /srv/svn/myproject.
sudo mkdir -p /srv/svn
sudo svnadmin create /srv/svn/myproject
# Inspect repository layout
ls /srv/svn/myprojectCode language: PHP (php)
You should see standard Subversion repository directories such as conf, db, hooks, and locks.
Configure users and permissions
Edit svnserve.conf
Enable authenticated access and point svnserve to the password and authorization files.
# /srv/svn/myproject/conf/svnserve.conf
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = myprojectCode language: PHP (php)
Define users and path-based authorization
# /srv/svn/myproject/conf/passwd
[users]
alice = ChangeMeStrong1
bob = ChangeMeStrong2
# /srv/svn/myproject/conf/authz
[/]
alice = rw
bob = rCode language: PHP (php)
The original post used anonymous write access. For most environments, disable anonymous writes and require authenticated users.
Start svnserve and connect a client
Start the daemon and set repository root with -r. This keeps client URLs clean.
# Run svnserve in daemon mode with repository root
svnserve -d -r /srv/svn
# Client checkout example
svn checkout svn://SVN_SERVER_IP/myproject myprojectCode language: PHP (php)
If you do not use -r, clients usually need a longer URL path (for example, svn://SVN_SERVER_IP/srv/svn/myproject).
| Access method | Example URL | Best for | Notes |
|---|---|---|---|
| file:// | file:///srv/svn/myproject | Local admin operations on server | No network service required |
| svn:// | svn://SVN_SERVER_IP/myproject | Lightweight remote access via svnserve | What this guide configures |
| https:// | https://svn.example.com/repos/myproject | TLS and web-integrated auth | Requires Apache-based SVN setup, not covered here |
Import code and run basic SVN operations
Import your existing source once, then have users work from checked-out working copies.
# Initial import from server or a machine with repository access
svn import /path/to/source file:///srv/svn/myproject -m "Initial import"
# Developer workflow
svn checkout svn://SVN_SERVER_IP/myproject myproject
cd myproject
svn status
svn add newfile.txt
svn commit -m "Add new file"
svn updateCode language: PHP (php)
Common pitfalls and best practices
- Avoid anonymous write access unless you explicitly want an open repository.
- Keep one clear repository layout to avoid mixing repository root and project subfolders.
- Use strong passwords and rotate them periodically.
- Back up repository data (especially
db) on a scheduled basis. - Prefer service management (systemd/init) for production daemon startup instead of ad-hoc shell sessions.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals