Using the latest version?
JFrog Platform User Guide

Skip to end of metadata
Go to start of metadata


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

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 Configuring the Database.

Page Contents


Creating the Artifactory PostgreSQL Database

Supported PostgreSQL Versions

Artifactory supports PostgreSQL 9.2 and above, 10.x, and 11.x using driver version 9.4-1202.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 artifactory TO <admin_role>; -- typically postgres;
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;

Once you have verified that the script is correct, you need to run it to create the database and proceed with configuring the database.

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). 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.

Enabling TLS Encryption

To enable Transport Layer Security (TSL) encryption for PostGreSQL, set the sslmode property to verify-full in the  JDBC connector URL.

For example, in the $ARTIFACTORY_HOME/etc/ file: 




  • No labels