Guice-Cassandra installation guide



  • Java 11 SDK
  • Docker ∕ ElasticSearch 7.10.2 and Cassandra 3.11.10
  • Maven 3

Building the artifacts

An usual compilation using maven will produce two artifacts into server/container/guice/cassandra-guice/target directory:

  • james-server-cassandra-guice.jar
  • james-server-cassandra-guice.lib

You can for example run in the base of this git repository:

mvn clean install



  • Cassandra 3.11.10
  • ElasticSearch 7.10.2

James Launch

To run james, you have to create a directory containing required configuration files.

James requires the configuration to be in a subfolder of working directory that is called conf. You can get a sample directory for configuration from dockerfiles/run/guice/cassandra/destination/conf. You might need to adapt it to your needs.

You also need to generate a keystore in your conf folder with the following command:

$ keytool -genkey -alias james -keyalg RSA -keystore conf/keystore

You need to have a Cassandra and an ElasticSearch instance running. You can either install the servers or launch them via docker:

$ docker run -d -p 9042:9042 --name=cassandra cassandra:3.11.10
$ docker run -d -p 9200:9200 --name=elasticsearch --env 'discovery.type=single-node'

Once everything is set up, you just have to run the jar with:

$ java -jar target/james-server-cassandra-guice.jar


You can follow the same guide to build and run guice-cassandra-ldap artifact, except that: - The jar and libs needs to be retrieve from server/container/guice/cassandra-ldap-guice/target after compilation - The sample configuration can be found in dockerfiles/run/guice/cassandra-ldap/destination/conf - You need a running LDAP server to connect to. - You can then launch James via this command:

$ java -jar target/james-server-cassandra-ldap-guice.jar