• svnserve

    svnserve allows access to Subversion repositories using Subversion's custom network protocol.

    You can run svnserve as a standalone server process (for clients that are using the svn:// access method); you can have a daemon such as inetd or xinetd launch it for you on demand (also for svn://), or you can have sshd launch it on demand for the svn+ssh:// access method.

    Regardless of the access method, once the client has selected a repository by transmitting its URL, svnserve reads a file named conf/svnserve.conf in the repository directory to determine repository-specific settings such as what authentication database to use and what authorization policies to apply. See the section called “svnserve, a custom server” for details of the svnserve.conf file.

    svnserve Options

    Unlike the previous commands we've described, svnserve has no subcommands–svnserve is controlled exclusively by options.

    --daemon (-d)

    Causes svnserve to run in daemon mode. svnserve backgrounds itself and accepts and serves TCP/IP connections on the svn port (3690, by default).

    --listen-port=PORT

    Causes svnserve to listen on PORT when run in daemon mode. (FreeBSD daemons only listen on tcp6 by default–this option tells them to also listen on tcp4.)

    --listen-host=HOST

    Causes svnserve to listen on the interface specified by HOST, which may be either a hostname or an IP address.

    --foreground

    When used together with -d, this option causes svnserve to stay in the foreground. This option is mainly useful for debugging.

    --inetd (-i)

    Causes svnserve to use the stdin/stdout file descriptors, as is appropriate for a daemon running out of inetd.

    --help (-h)

    Displays a usage summary and exits.

    --version

    Displays version information, a list of repository back-end modules available, and exits.

    --root=ROOT (-r=ROOT)

    Sets the virtual root for repositories served by svnserve. The pathname in URLs provided by the client will be interpreted relative to this root, and will not be allowed to escape this root.

    --tunnel (-t)

    Causes svnserve to run in tunnel mode, which is just like the inetd mode of operation (both modes serve one connection over stdin/stdout, then exit), except that the connection is considered to be pre-authenticated with the username of the current uid. This flag is automatically passed for you by the client when running over a tunnel agent such as ssh. That means there's rarely any need for you to pass this option to svnserve. So if you find yourself typing svnserve --tunnel on the command line, and wondering what to do next, see the section called “Tunneling over SSH”.

    --tunnel-user NAME

    Used in conjunction with the --tunnel option; tells svnserve to assume that NAME is the authenticated user, rather than the UID of the svnserve process. Useful for users wishing to share a single system account over SSH, but maintaining separate commit identities.

    --threads (-T)

    When running in daemon mode, causes svnserve to spawn a thread instead of a process for each connection (e.g. for when running on Windows). The svnserve process still backgrounds itself at startup time.

    --listen-once (-X)

    Causes svnserve to accept one connection on the svn port, serve it, and exit. This option is mainly useful for debugging.


    The Version Control with Subversion book is licensed under the Creative Commons Attribution License v2.0.
    To submit comments, corrections, or other contributions to the text, please visit http://www.svnbook.com.