Archiva User DB on Derby Network Server

Archiva is known to work with embedded Derby, so the Derby Network Server is a natural first choice for moving Archiva's user store to an "external" database.


  1. Download and unpack db-derby- (or .zip)
  2. Set the DERBY_INSTALL environment variable to /path/to/db-derby-
  3. Set the DERBY_SERVER_HOST environment variable to the hostname/IP address that will be used for connections. (Optional, it defaults to localhost)
  4. navigate to /path/to/derby-db-
  5. execute the 'setNetworkServerCP' script to set the CLASSPATH
  6. execute the 'startNetworkServer' script
  • If JAVA_HOME contains a space, you may get an error. Make sure $JAVA_HOME/bin is on your PATH, and edit the start script to execute 'java' rather than '$JAVA_HOME/bin/java'

The Derby Network Server should now be listening on port 1527.

The default userid is 'user1'. The default password is also 'user1'. (Using 'sa' with no password did not work.)

On the Archiva side,

1. place 'derbyclient.jar' in archiva/core
2. edit /archiva/conf/plexus.xml


Then start Archiva.

Derby Database File Locations

With the configuration given above, the 'archiva-users' directory containing the database files will be created in $DERBY_INSTALL/frameworks/NetworkServer/bin.

As described in the Derby docs, you can set derby.system.home and provide a path relative to that, or give the full path in the jdbc connection url.


How do you add another user to the external Derby database, and delete the default 'user1' account? (Are there any other default accounts?)

  • No labels