MONOTONE-SERVER(7)

NAME
monotone-server - guide to set up a monotone server

DESCRIPTION
The monotone-server package provides a rc.d(8) script, called ‘monotone’, that aids in the configuration of a monotone server. This script follows the normal conventions of other rc.d(8) scripts, but adds a few extra commands to ease the configuration process from scratch.

  Typical configuration procedure
In order to configure a monotone server using the monotone-server package, follow these instructions:

1.  Check that the home directory of the ‘monotone’ user points to the directory you want to use to keep your database in. If it is not what you want, change it before initializing the server.

2.  Copy /usr/pkg/share/examples/rc.d/monotone to /etc/rc.d/monotone if the latter does not exist.

3.  Set ‘monotone=YES’ in rc.conf(5).

4.  Use the ‘init’ subcommand to generate an empty monotone database for the server.

5.  Use the ‘genkey’ subcommand to generate a new key pair for the monotone server.

6.  Edit the /usr/pkg/etc/monotone-server/read-permissions and the /usr/pkg/etc/monotone-server/write-permissions to adjust the users that are allowed to read from and to write to the server.

7.  Use the ‘read’ subcommand to import the public keys needed to fulfill the permissions configured in the previous step.

8.  Learn how to back up the server data as described in Backing up your server. Back the new files up now.

9.  Start the server as usual (with the ‘start’ subcommand)!

  Backing up your server
In order to back up a monotone server configured by this package, you need to copy the server database, the key pair for the server and the passphrase to identify such key pair, in a safe place. The exact location of these files is shown below in the FILES section.

  Available subcommands
The list below describes all the non-standard subcommands provided by the monotone rc.d(8) script. For the sake of completeness, some standard commands are also included:

genkey [keyname]
    Generates a new key pair to authenticate the server. A random password is automatically generated for this key and the server is configured to use it.

    If keyname is not provided, the key name defaults to ‘monotone@your-domain’.

init
    Initializes the server by creating an empty monotone database. This database is created in the home directory of the ‘monotone’ user, and this directory is previously created if it does not exist.

migrate
    If the database schema has changed during an update of monotone, migrates the database to the new version.

read [file ...]
    Imports public keys into the server database. Keys can be provided on the standard input or, if they reside in files, as arguments.

start
    Starts the server.

stop
    Stops the server.

FILES
/etc/rc.d/monotone
    The rc.d(8) startup script.
/var/monotone/
    Default location of the server database, unless the home directory of the ‘monotone’ user has been changed.
/usr/pkg/etc/monotone-server/keys/
    Location of server private keys.
/usr/pkg/etc/monotone-server/monotonerc
    Configuration file (lua hooks) for the monotone server.
/usr/pkg/etc/monotone-server/passphrases
    List of passphrases of the private keys.
/usr/pkg/etc/monotone-server/read-permissions
    Configuration of the users allowed to read specific branches.
/usr/pkg/etc/monotone-server/write-permissions
    Configuration of the users allowed to write to the database.
/var/log/monotone.log
    Log file for the server.

SEE ALSO
rc.conf(5), rc.d(8)

HISTORY
The monotone-server package first appeared in pkgsrc-2005Q1 and was composed of a simple startup script and a separate interactive script for initial configuration of the server.

The monotone-server package was completely rewritten in pkgsrc-2010Q1 to provide a single startup script that bundles the traditional behavior of an rc.d(8) script alongside the configuration and management of the server. These changes were inspired by the monotone-server package from Fedora.

AUTHORS
The monotone-server package and its accompanying scripts were written by Julio Merino <jmmv@NetBSD.org>.