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


By using PostgreSQL you can benefit from features in PostgreSQL infrastructure such as backup, restore and high availability.

For Artifactory to run with PostgreSQL you must create a dedicated PostgreSQL database instance and then configure Artifactory to use it as described in the following sections.

Before You Continue

Before proceeding with the steps below, please make sure you have read and followed the steps described in Changing the Default Storage.

Page Contents


Creating the Artifactory PostgreSQL Database

Supported PostgreSQL Versions

Artifactory supports PostgreSQL 9.2 and above using driver version 9.2-1002.jdbc4 and above.

The commands below create artifactory user and database with appropriate permissions.

Use the commands below to create an Artifactory user and database with appropriate permissions. Modify the relevant values to match your specific environment:

Creating an Artifactory User and Database
CREATE USER artifactory WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;

Artifactory privileges

We recommend providing Artifactory with full privileges on the database.


Configuring Artifactory to use PostgreSQL

  1. Copy $ARTIFACTORY_HOME/misc/db/ to $ARTIFACTORY_HOME/etc/
    (If you do not have this file you can take it from the standalone zip distribution or directly from the JFrog domain). For a full explanation on the contents of this file please refer to The Bundled Storage Configurations.

  2. Adjust the connection definitions in the $ARTIFACTORY_HOME/etc/ file to match the attributes of the Artifactory database you created.
    You must configure the database URL and username/password to use. The schema and tables are created first time Artifactory is run using the new database.

  3. Download the JDBC driver corresponding to your PostgreSQL version from the  PostgreSQL JDBC Driver Download site and copy the postgresql-9.x-xxx.jdbc4.jar file into the server's shared lib directory.
    For example $TOMCAT_HOME/lib when installed as a service or $ARTIFACTORY_HOME/tomcat/lib in the standalone version. 


    Make sure your driver has the same permissions as the rest of the files in the shared lib directory.

  4. Start Artifactory.

Storing BLOBs inside PostgreSQL is not recommended

The above recommended configuration keeps all artifact information in PostgreSQL while storing the artifact binary data on the file system (under $ARTIFACTORY_HOME/data/filestore).

While it is possible, to store BLOBs inside PostgreSQL we do not recommended it. This is important because the PostgreSQL driver doesn't support streaming BLOBs with unknown length to the database. Therefore, Artifactory will temporarily save deployed files to the filesystem and only then save the BLOB to the database.

  • No labels