Need help with other JFrog products?
Using the latest JFrog Artifactory version? See the documentation here.
Creating the Artifactory PostgreSQL Database
Supported PostgreSQL Versions
Artifactory supports PostgreSQL 9.2 and above 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:
Once you have verified that the script is correct, you need to run it to create the database and proceed with configuring the database.
We recommend providing Artifactory with full privileges on the database.
Configuring Artifactory to use PostgreSQL
$ARTIFACTORY_HOME/etc/db.properties(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.
- Adjust the connection definitions in the
$ARTIFACTORY_HOME/etc/db.propertiesfile 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.
Download the JDBC driver corresponding to your PostgreSQL version from the PostgreSQL JDBC Driver Download site and copy the
postgresql-9.x-xxx.jdbc4.jarfile into the server's shared lib directory.
$TOMCAT_HOME/libwhen installed as a service or
$ARTIFACTORY_HOME/tomcat/libin the standalone version.
Make sure your driver has the same permissions as the rest of the files in the shared lib directory.
- 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
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