Selecting a PostgreSQL Configuration

JasperReports Server requires a database. The installer is pre-configured to run with the PostgreSQL database. You have two options:

Use the bundled PostgreSQL
Use an existing PostgreSQL

Choosing the Bundled PostgreSQL

If you install the bundled PostgreSQL, the installer puts PostgreSQL onto your system. The default PostgreSQL port is 5432. If port 5432 is in use, the installer will prompt you to pick an alternate port.

The installer sets the PostgreSQL administrator password to postgres and creates a PostgreSQL database user with administrator privileges and the credentials jasperdb/password.

The following table summarizes the parameters set during installation of the bundled PostgreSQL:


Default Value and Description

Binary Directory

The directory where the PostgreSQL and pgAdmin binaries are located.


The port number PostgreSQL uses (default is 5432). Choose an alternate port if 5432 is in use.

IP or Host Name

The IP address or name of the machine where PostgreSQL is installed. The default value is

PostgreSQL Administrative Password

Password of the database administrative user: password.

The installer cannot handle special characters at the end of a password string. Incompatible characters include: & ; $

Database User Name

Hard coded default: jasperdb - The installer creates this user which is used to connect to the JasperReports Server database

Database User Password

Hard coded default: password - The installer uses this password for the jasperdb user.

Additional notes for Linux

If your Linux installation does not have a locale setting that supports UTF-8 encoding, your bundled PostgreSQL instance will be initialized using a temporary locale (--locale=C). This will allow the PostgreSQL initdb to succeed with the desired UTF-8 database encoding.

Choosing an Existing PostgreSQL on a Local Host

If you choose to use an existing PostgreSQL database, you'll be prompted for the location of PostgreSQL and the port to use. If you have an instance of PostgreSQL installed locally, accept the default, which is, the localhost. Accept the default location for the PostgreSQL \bin directory, or click Browse to select another location. You'll also be prompted for the default administrative account password of the PostgreSQL administrative user. The database administrative user account name postgres is used by default. Enter the database administrative user password and click Enter.

If the installer displays an error message saying FATAL: password authentication failed for user postgres, try reentering the administrative password for your PostgreSQL database.

The following table summarizes the parameters set during the installation of an existing PostgreSQL.

Defaults Used Hard-coded Default Values Used or Created

PostgreSQL Administrative User Name

postgres - The default administrative database user.

jasperserver Database User Name

jasperdb - The installer creates this database user to connect to jasperserver database.

jasperserver Database User Password

password - The installer creates this password for the jasperdb database user.

To improve system security, Jaspersoft recommends that you change the default password for jasperdb as soon as possible. To change the jasperdb connection password in JasperReports Server, edit: <js-install>/apache‑tomcat/jasperserver/META-INF/context.xml. (And delete: <js-install>/apache-tomcat/conf/Catalina/localhost/jasperserver.xml, if it exists.) Then make the same change in PostgreSQL using pgAdmin or psql.

Using an Existing PostgreSQL on a Remote Host

If you're installing to a remote instance of PostgreSQL, you need to have the PostgreSQL client tools on your local machine. The client tools version should match the version of your remote PostgreSQL. You can check the version of PostgreSQL instance by entering this command on the computer where it’s installed:

psql --version


<path-to-postgresql-bin-folder>/psql --version

For instance: C:/Jaspersoft/PostgreSQL/9.0/bin/psql --version

To verify that you can connect to the target remote PostgreSQL from the local installation machine:

Using your local PostgreSQL client tools, enter this command:

psql -U postgres -h <remote-host> -d postgres


<path-to-postgresql-bin-folder>/psql -U postgres -h <remote-host> -d postgres

You might also need to enable connections as described below.

Enabling Connections to a Remote Host

On most platforms, the default PostgreSQL installation doesn’t allow remote connections for security reasons. You need to enable remote connections as described in this documentation:

The PostgreSQL configuration documentation on the PostgreSQL web site
The \docs directory of your PostgreSQL installation

To enable connections from the installation machine to the remote PostgreSQL server:

1. Locate the following PostgreSQL host-based authentication (hba) configuration file on the remote PostgreSQL server instance:

Windows: C:\Program Files\PostgreSQL\X.X\data\pg_hba.conf (where X.X is the version number)

Linux: /var/lib/pgsql/data/pg_hba.conf

2. Add the IP address of your local JasperReports Server installation machine to this file. For example, to allow the local installation machine with address to connect to the PostgreSQL server, add this entry to the pg_hba.conf file:

host all trust

3. Allow TCP/IP connections to the remote PostgreSQL server instance by making the following change to the postgresql.conf file on the remote machine:

From: listen_addresses = 'localhost'

To: listen_addresses = '*'

4. Restart PostgreSQL.
5. Using your local PostgreSQL client tools, verify that you can connect to the target remote PostgreSQL from the local installation machine, as described in Using an Existing PostgreSQL on a Remote Host.