Confluence 3.3 has reached end of life
Check out the [latest version] of the documentation
This document provides instructions for setting up Confluence for use with a PostgreSQL database. Please check the Known Issues for PostgreSQL before you start.
On this page:
To install PostgreSQL, To create a PostgreSQL user and database, Creating a User and Database via UNIX command-line If you are on UNIX and do not have the above pgAdmin III administration tool, you can use the command line interface instead. Assuming that you are using the default installation directory of Once you have installed and set up PostgreSQL, you will need to configure Confluence to use the PostgreSQL database. To configure Confluence to use PostgreSQL, PostgreSQL JDBC Drivers bundled with Confluence * If you're not sure which connection you're using, it's most likely JDBC. A JNDI resource must be configured manually, as described in Configuring a MySQL Datasource in Apache Tomcat. Note: Confluence only bundles the JDBC 3 driver which will work under the 1.6 JVM. However, if you are using Java 6 and want to use the JDBC 4 driver, you can download it via Database JDBC drivers and install it as described below. You will need to remove the existing PostgreSQL JDBC 3 driver (e.g. postgresql-8.4-701.jdbc3), if you do want to use the JDBC 4 driver. If the server that is hosting the PostgreSQL database is not the same server as Confluence, then please ensure that the confluence server can contact the database server and also refer to the PostgreSQL documentation on how to set up pg_hba.conf If the pg_hba.conf file is not set properly, remote communication to the PostgresSQL server will fail. Running SQL Queries For ongoing maintenance of your server, you can continue to use PGAdmin as your SQL browser.1. Install PostgreSQL
2. Create a User and a Database
All screenshots below are taken from a PostgreSQL configuration on a Windows machine.
#* Enter a name and password for the new user.
#* Enter a name for the new database.
/opt/PostgreSQL/8.3/bin/
, enter the following commands:sudo -s -H -u postgres
# Create the Confluence user:
/opt/PostgreSQL/8.3/bin/createuser -S -d -r -P -E confuser
# Create the Confluence database:
/opt/PostgreSQL/8.3/bin/createdb -O confuser confluence
exit
3. Configure Confluence to use the PostgreSQL Database
<confluence install>
/WEB-INF/lib
(for Confluence 2.10 onwards) or <confluence install>/common/lib
(for earlier versions). Information and links to the appropriate database drivers are available on Database JDBC drivers.
Windows renames .jar extensions to .zip! Just rename it back to .jar. You'll have to set your folder options to view hidden file extensions if you can't rename it without changing the file type (Tools >> Folder Options >> View >> Uncheck "Hide Extensions for known file types."
Troubleshooting