To configure the PostgreSQL database, perform the following tasks:
Step 1. Create a database user
PaperCut NG/MF requires a user to connect to the database. Ensure that you have a database user set up in the PostgreSQL database that has full permissions to create/drop tables and has full access to any created tables.
This user will often be created by the PostgreSQL administrator when the PostgreSQL database is created.
Step 2. Download the PostgreSQL JDBC driver
Version 25.0 and later
If you are running PaperCut NG/MF version 25 and later you will find our endorsed PostgreSQL JDBC drivers in the Application Server file system, under [app server install dir]/server/repository/database-drivers/postgresql.
In this case you don't need to download the driver unless you need to use a specific version of the Postgres JDBC driver.
Version 24.x and earlier (or if you require a specific driver version)
If you are running a PaperCut version prior to version 25.0, or if you require a specific driver version which is not included in the [app server install dir]/server/repository/database-drivers/postgresql folder, follow these steps to download a suitable PostgreSQL JDBC driver.
- Visit the PostgreSQL JDBC Driver download page.
- Download the driver version you require.
If you need to use a more recent version or specific version due to environment specific requirements, we highly recommend testing beforehand.
Step 3. Configure the database driver
There are some important differences between PaperCut NG/MF versions 24.x and earlier, and PaperCut NG/MF version 25.x and later:
- PaperCut NG/MF versions 25 and later include a
newer PostgreSQL JDBC driver
(PostgreSQL JDBC driver 42.7.5 is included with version 25.0), however it is included in the
server/repository/database-drivers/postgresqlfolder, and needs copying to the correct location to actively use it. - PaperCut NG/MF versions 24 and earlier come with the PostgreSQL JDBC version 42.6.0 driver. If you’re currently using PaperCut NG/MF version 24.x or earlier, or if you’ve upgraded from a pre-25.0 version to 25.0 or later, you’re likely using this version by default.
Installing or upgrading the JDBC Driver with Version 25.0 and later (brand new installation)
Copy the
postgresql-42.x.x.jarfile:
from[app server install dir]/server/repository/database-drivers/postgresql
to[app server install dir]/server/lib-ext/
Upgrading the JDBC Driver with Version 25.0 and later (after an upgrade from a 24.x or earlier version)
Stop the PaperCut Application Server Service.
Navigate to
[app server install dir]/server/lib/.Move any existing Postgres JDBC .jar files (e.g.
postgres*.jar) out of this location into a temporary folder that can be used to roll back the changes if necessary. Make sure this folder is on the desktop, for example,C:\Users\[username]\Desktop\, or other location outside of the PaperCut NG/MF installation directory structure entirely.Navigate to
[app server install dir]/server/lib-ext/.Move any existing Postgres JDBC .jar files (e.g.
postgres*.jar) out of this location into a temporary folder that can be used to roll back the changes if necessary. Make sure this folder is on the desktop, for example,C:\Users\[username]\Desktop\, or other location outside of the PaperCut NG/MF installation directory structure entirely.Copy the
postgresql-42.x.x.jarfile:
from[app server install dir]/server/repository/database-drivers/postgresql
to[app server install dir]/server/lib-ext/.
What’s next?
If you’re migrating to the external database for the first time, continue with the steps (Step 5. Change the PaperCut NG/MF connection details) from our Upsize to an external database (RDBMS) article.
If you’ve already migrated (and changed the connection details as documented in Upsize to an external DB ) and are looking to confirm that the PaperCut Application Server is pointing to the external database successfully, you can check this using the system information in the PaperCut admin interface.
Navigate to the About tab > System info > Database, and you’ll see the type of database server listed. Database: Internal indicates that the App Server is still using the Internal ‘derby’ database, whereas Database: PostgreSQL indicates it’s using an PostgreSQL Server.
Comments