Page tree
Skip to end of metadata
Go to start of metadata

Follow the steps below to connect CrowdID to PostgreSQL.

1. Configure PostgreSQL

  1. Create a database user which CrowdID will connect as (for example, crowduser).
  2. Create a database for CrowdID to store data in (for example, crowdiddb). (warning) This must be a different database to the one used by Crowd.
  3. Ensure that the user has permission to connect to the database and to create and populate tables.

2. Copy the PostgreSQL Driver to your Application Server

  1. Download the PostgreSQL JDBC driver from and save it locally for later use.
    (warning) Internet Explorer may rename the file extension from '.jar' to '.zip' when you download it. If you are using Internet Explorer, please rename the file so that it has a '.jar' extension after downloading it.
  2. Add the PostgreSQL JDBC driver JAR to the following directory:
    • For Crowd distribution:
      • Crowd 2.0.2 or later: {CROWD_INSTALL}/apache-tomcat/lib/.
      • Crowd 2.0.1 or earlier: {CROWD_INSTALL}/apache-tomcat/common/lib/.
    • For Crowd WAR distribution, copy the driver JAR to your application server. For example, on Tomcat:
      • Tomcat 5.5.x: common/lib/.
      • Tomcat 6.x: lib/.

3. Configure your Application Server to Connect to PostgreSQL

  1. Edit the file apache-tomcat-X.X.XX/conf/Catalina/localhost/openidserver.xml and customise the username, password, driverClassName and urlparameters for the datasource.

    <Context path="/openidserver" docBase="../../crowd-openidserver-webapp" debug="0">
    <Resource name="jdbc/CrowdIDDS" auth="Container" type="javax.sql.DataSource"
    username="[enter db username here]"
    password="[enter db password here]"
    url="jdbc:postgresql://host:port/crowdiddb" [ see also ]"
    [ delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive params here ]
    <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>
  2. Delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive attributes. (These are only needed for HSQL database, and degrade performance otherwise.)

4. Configure CrowdID to use PostgreSQL

  1. Edit the file located in the root of the Crowd distribution, and modify the hibernate.dialectto the following

  2. Run ./ or build.bat. This will configure Crowd to use the PostgreSQL dialect.

If you do not wish to edit this file and run the build script, you can edit the (which the above script modifies) directly. The file is located here: crowd-openidserver-webapp\WEB-INF\classes\ Modify the file to the following:

# - Crowd Configuration Options



Next Steps

You should now have an application server configured to connect to a database, and CrowdID configured to use the correct database. Start up CrowdID and watch the logs for any errors.