Artifactory
Author: m | 2025-04-25
JFrog Artifactory Plugin Configuration REST API. Upgrading Firewall for Artifactory plugin. Uninstalling the Firewall for Artifactory Plugin; Firewall for Artifactory Release Notes; JFrog Artifactory Plugin Configuration REST API. Upgrading Firewall for Artifactory plugin. Uninstalling the Firewall for Artifactory Plugin; Firewall for Artifactory Release Notes
JFrog Artifactory announces Artifactory Community Edition
Comes with self signed SSL certificates that can be overwrittenArtifactory Pro exposed on port 8081PostgreSQL database serving Artifactory exposed on port 5432Run Artifactory Pro with PostgreSQL### Linux$ sudo ./prepareHostEnv.sh -t pro -c$ sudo docker-compose -f artifactory-pro-postgresql.yml up -d### MAC OSX$ ./prepareHostEnv.sh -t pro -c$ sed -i.bk "s,/data/,~/.artifactory/,g" artifactory-pro-postgresql.yml$ docker-compose -f artifactory-pro-postgresql.yml up -dThis example starts the following containersArtifactory Pro exposed on port 80PostgreSQL database serving Artifactory exposed on port 5432Artifactory uses the PostgreSQL database running in another container.Upgrade Artifactory Pro with PostgreSQL### Linux1. Edit the artifactory-pro-postgresql.yml file and change the artifactroy image version to the version you would like to upgrade to2. $ sudo docker-compose -f artifactory-pro-postgresql.yml stop3. $ sudo docker-compose -f artifactory-pro-postgresql.yml up -d### MAC OSX1. Edit the artifactory-pro-postgresql.yml file and change the artifactroy image version to the version you would like to upgrade to2. $ docker-compose -f artifactory-pro-postgresql.yml stop3. $ docker-compose -f artifactory-pro-postgresql.yml up -dThis example upgrades Artifactory and starts the following containersArtifactory Pro exposed on port 80PostgreSQL database serving Artifactory exposed on port 5432Artifactory uses the PostgreSQL database running in another container.Run Artifactory Pro with Derby and Nginx for Docker registry support$ sudo ./prepareHostEnv.sh -t pro -c$ sudo docker-compose -f artifactory-pro-nginx-derby.yml up -dThis example starts the following containersNginx exposed on ports 80 (http) and 443 (https)You can disable port 80 in Nginx's configuration filesNginx comes with self signed SSL certificates that can be overwrittenArtifactory Pro exposed on port 8081Artifactory uses the embedded Derby as its database.Artifactory HAArtifactory HA with PostgreSQL and Nginx for Docker registry and load balancing support### Linux$ sudo ./prepareHostEnv.sh -t ha -c$ sudo docker-compose -f artifactory-ha.yml up -d### MAC OSX$ ./prepareHostEnv.sh -t ha -c$ sed -i.bk "s,/data/,~/.artifactory/,g" artifactory-ha.yml$ docker-compose -f artifactory-ha.yml up -dThis example starts the following containersNginx exposed on ports 80 (http) and 443 (https)You can disable port 80 in Nginx's configuration filesNginx comes with self signed SSL certificates that can be overwrittenNginx is configured to load balance between the two Artifactory instancesArtifactory primary exposed on port 8081 using its own data storageArtifactory node exposed on port 8082 using its own data storagePostgreSQL database serving ArtifactoryArtifactory data is stored on a binary store provider and no shared NFS is needed.In this example, the HA nodes use their local storage and sync data between the nodes.NOTE: You must complete the onboarding process to have a fully functional Artifactory HA cluster!Artifactory HA with PostgreSQL and Nginx for Docker registry and load balancing support with shared data storage (NFS)### Linux$ sudo ./prepareHostEnv.sh -t ha-shared-data -c$ sudo docker-compose -f artifactory-ha-shared-data.yml up -d### MAC OSX$ ./prepareHostEnv.sh -t ha-shared-data -c$ sed -i.bk "s,/data/,~/.artifactory/,g" artifactory-ha-shared-data.yml$ docker-compose -f artifactory-ha-shared-data.yml up -dThis example starts the following containersNginx exposed on ports 80 (http) and 443 (https)You can disable port 80 in Nginx's configuration filesNginx comes with self signed SSL certificates that can be overwrittenNginx is configured to load balance the two Artifactory instancesArtifactory primary exposed on port 8081Artifactory node exposed on port 8082PostgreSQL database serving ArtifactoryArtifactory data is shared on a common NFS mount.NOTE: You must complete the onboarding process to have a JFrog Artifactory Plugin Configuration REST API. Upgrading Firewall for Artifactory plugin. Uninstalling the Firewall for Artifactory Plugin; Firewall for Artifactory Release Notes; JFrog Artifactory Plugin Configuration REST API. Upgrading Firewall for Artifactory plugin. Uninstalling the Firewall for Artifactory Plugin; Firewall for Artifactory Release Notes Artifactory requires a certificate to run. From the main menu, select Resources > Certificates. In the resulting page, supply the Private Key and Certificate, and assign the Name as artifactory-ha-tls.When complete, click Save.Step 4: Add a ConfigMapArtifactory will require a ConfigMap for general configuration information needed by its load balancer.The following example ConfigMap should be used for a standard setup:## add HA entries when ha is configure.upstream artifactory { server artifactory-ha-artifactory-ha-primary:8081; server artifactory-ha:8081;}## add ssl entries when https has been set in configssl_certificate /var/opt/jfrog/nginx/ssl/tls.crt;ssl_certificate_key /var/opt/jfrog/nginx/ssl/tls.key;ssl_session_cache shared:SSL:1m;ssl_prefer_server_ciphers on;## server configurationserver { listen 443 ssl; listen 80 ; server_name ~(?.+)\.jfrog.team jfrog.team; if ($http_x_forwarded_proto = '') { set $http_x_forwarded_proto $scheme; } ## Application specific logs ## access_log /var/log/nginx/jfrog.team-access.log timing; ## error_log /var/log/nginx/jfrog.team-error.log; rewrite ^/$ /artifactory/webapp/ redirect; rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect; rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2; chunked_transfer_encoding on; client_max_body_size 0; location /artifactory/ { proxy_read_timeout 2400s; proxy_pass_header Server; proxy_cookie_path ~*^/.* /; if ( $request_uri ~ ^/artifactory/(.*)$ ) { proxy_pass } proxy_pass proxy_next_upstream http_503 non_idempotent; proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port/artifactory; proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }}From the main menu, select Resources > Config Maps, then click Add Config Map.In the Name field, enter art-nginx-confIn the Namespace field, enter the name of the created namespace.In the Key field, enter artifactory-ha.confCopy the example ConfigMap and paste it into the Value field.Click SaveThe ConfigMap will be used when Artifactory is installed.Step 5: Install ArtifactoryOnce you have a cluster, project, and namespace that Artifactory can run in, you can install it easily through Rancher’s catalog of applications.Comments
Comes with self signed SSL certificates that can be overwrittenArtifactory Pro exposed on port 8081PostgreSQL database serving Artifactory exposed on port 5432Run Artifactory Pro with PostgreSQL### Linux$ sudo ./prepareHostEnv.sh -t pro -c$ sudo docker-compose -f artifactory-pro-postgresql.yml up -d### MAC OSX$ ./prepareHostEnv.sh -t pro -c$ sed -i.bk "s,/data/,~/.artifactory/,g" artifactory-pro-postgresql.yml$ docker-compose -f artifactory-pro-postgresql.yml up -dThis example starts the following containersArtifactory Pro exposed on port 80PostgreSQL database serving Artifactory exposed on port 5432Artifactory uses the PostgreSQL database running in another container.Upgrade Artifactory Pro with PostgreSQL### Linux1. Edit the artifactory-pro-postgresql.yml file and change the artifactroy image version to the version you would like to upgrade to2. $ sudo docker-compose -f artifactory-pro-postgresql.yml stop3. $ sudo docker-compose -f artifactory-pro-postgresql.yml up -d### MAC OSX1. Edit the artifactory-pro-postgresql.yml file and change the artifactroy image version to the version you would like to upgrade to2. $ docker-compose -f artifactory-pro-postgresql.yml stop3. $ docker-compose -f artifactory-pro-postgresql.yml up -dThis example upgrades Artifactory and starts the following containersArtifactory Pro exposed on port 80PostgreSQL database serving Artifactory exposed on port 5432Artifactory uses the PostgreSQL database running in another container.Run Artifactory Pro with Derby and Nginx for Docker registry support$ sudo ./prepareHostEnv.sh -t pro -c$ sudo docker-compose -f artifactory-pro-nginx-derby.yml up -dThis example starts the following containersNginx exposed on ports 80 (http) and 443 (https)You can disable port 80 in Nginx's configuration filesNginx comes with self signed SSL certificates that can be overwrittenArtifactory Pro exposed on port 8081Artifactory uses the embedded Derby as its database.Artifactory HAArtifactory HA with PostgreSQL and Nginx for Docker registry and load balancing support### Linux$ sudo ./prepareHostEnv.sh -t ha -c$ sudo docker-compose -f artifactory-ha.yml up -d### MAC OSX$ ./prepareHostEnv.sh -t ha -c$ sed -i.bk "s,/data/,~/.artifactory/,g" artifactory-ha.yml$ docker-compose -f artifactory-ha.yml up -dThis example starts the following containersNginx exposed on ports 80 (http) and 443 (https)You can disable port 80 in Nginx's configuration filesNginx comes with self signed SSL certificates that can be overwrittenNginx is configured to load balance between the two Artifactory instancesArtifactory primary exposed on port 8081 using its own data storageArtifactory node exposed on port 8082 using its own data storagePostgreSQL database serving ArtifactoryArtifactory data is stored on a binary store provider and no shared NFS is needed.In this example, the HA nodes use their local storage and sync data between the nodes.NOTE: You must complete the onboarding process to have a fully functional Artifactory HA cluster!Artifactory HA with PostgreSQL and Nginx for Docker registry and load balancing support with shared data storage (NFS)### Linux$ sudo ./prepareHostEnv.sh -t ha-shared-data -c$ sudo docker-compose -f artifactory-ha-shared-data.yml up -d### MAC OSX$ ./prepareHostEnv.sh -t ha-shared-data -c$ sed -i.bk "s,/data/,~/.artifactory/,g" artifactory-ha-shared-data.yml$ docker-compose -f artifactory-ha-shared-data.yml up -dThis example starts the following containersNginx exposed on ports 80 (http) and 443 (https)You can disable port 80 in Nginx's configuration filesNginx comes with self signed SSL certificates that can be overwrittenNginx is configured to load balance the two Artifactory instancesArtifactory primary exposed on port 8081Artifactory node exposed on port 8082PostgreSQL database serving ArtifactoryArtifactory data is shared on a common NFS mount.NOTE: You must complete the onboarding process to have a
2025-04-21Artifactory requires a certificate to run. From the main menu, select Resources > Certificates. In the resulting page, supply the Private Key and Certificate, and assign the Name as artifactory-ha-tls.When complete, click Save.Step 4: Add a ConfigMapArtifactory will require a ConfigMap for general configuration information needed by its load balancer.The following example ConfigMap should be used for a standard setup:## add HA entries when ha is configure.upstream artifactory { server artifactory-ha-artifactory-ha-primary:8081; server artifactory-ha:8081;}## add ssl entries when https has been set in configssl_certificate /var/opt/jfrog/nginx/ssl/tls.crt;ssl_certificate_key /var/opt/jfrog/nginx/ssl/tls.key;ssl_session_cache shared:SSL:1m;ssl_prefer_server_ciphers on;## server configurationserver { listen 443 ssl; listen 80 ; server_name ~(?.+)\.jfrog.team jfrog.team; if ($http_x_forwarded_proto = '') { set $http_x_forwarded_proto $scheme; } ## Application specific logs ## access_log /var/log/nginx/jfrog.team-access.log timing; ## error_log /var/log/nginx/jfrog.team-error.log; rewrite ^/$ /artifactory/webapp/ redirect; rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect; rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2; chunked_transfer_encoding on; client_max_body_size 0; location /artifactory/ { proxy_read_timeout 2400s; proxy_pass_header Server; proxy_cookie_path ~*^/.* /; if ( $request_uri ~ ^/artifactory/(.*)$ ) { proxy_pass } proxy_pass proxy_next_upstream http_503 non_idempotent; proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port/artifactory; proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }}From the main menu, select Resources > Config Maps, then click Add Config Map.In the Name field, enter art-nginx-confIn the Namespace field, enter the name of the created namespace.In the Key field, enter artifactory-ha.confCopy the example ConfigMap and paste it into the Value field.Click SaveThe ConfigMap will be used when Artifactory is installed.Step 5: Install ArtifactoryOnce you have a cluster, project, and namespace that Artifactory can run in, you can install it easily through Rancher’s catalog of applications.
2025-04-15DEPRECATEDJFrog Artifactory is now distributed with an official Docker-compose installer.The current Docker-compose examples will not be maintained anymore.This directory provides some examples that show different ways to run Artifactory with Docker Compose.To learn more about Docker and how to set it up, please refer to the Docker and Docker Compose documentation.Artifactory Docker ImagesArtifactory is available as different Docker images for:Artifactory ProArtifactory OSSThese images are available for download from JFrog Bintray.Docker-Compose UsageTo run any of the examples, you should execute: ">$ docker-compose -f compose-file> options>Docker Compose Control CommandsNOTE: On MAC OSX, you should omit the sudo from all your docker-compose commandsStart up -d # Create and start containers">$ sudo docker-compose -f compose-file> up -d # Create and start containersStop stop # Stop services">$ sudo docker-compose -f compose-file> stop # Stop servicesRestart restart # Restart services">$ sudo docker-compose -f compose-file> restart # Restart servicesStatus ps # List containers">$ sudo docker-compose -f compose-file> ps # List containersLogs logs # View output from containers">$ sudo docker-compose -f compose-file> logs # View output from containersRemove rm # Remove stopped containers">$ sudo docker-compose -f compose-file> rm # Remove stopped containersPersistent StorageFor persistent storage, all volumes are mounted from the host.All examples default to the host's /data directoryIMPORTANT: You should create the directories on the host before running docker-compose.Artifactory data: /data/artifactoryIn the case of HA, you need to create a data directory for each node: /data/artifactory/node1 and /data/artifactory/node2In the case of HA with shared data storage, you need to create the shared data and backup directories: /data/artifactory/ha and /data/artifactory/backupPostgreSQL data: /data/postgresqlNginXLogs: /data/nginx/logSSL: /data/nginx/sslTo help with setting up of directories and files for Artifactory Pro and HA, there is a helper script prepareHostEnv.sh you should run.This script prepares the needed directories on the host and populates them with example files.Get the usage by running it with -hsudo ./prepareHostEnv.sh -hAfter executing the script, the needed set of data directories for Artifactory Pro or HA will be created under /data (on Mac it defaults to ~/.artifactory).Database DriverThe database used in these examples is PostgreSQL.The PostgreSQL database driver comes pre-loaded into the Artifactory Docker image, but you can still use other databases without any conflicts.Using Different DatabasesArtifactory can run with other databases. For more details on supported databases and how to set them up for use with Artifactory, please refer to Changing the Database in the JFrog Artifactory Use Guide.Docker Compose ExamplesBelow is a list of included examples. You are welcome to contribute.IMPORTANT: The files under the files directory included in this repository are for example purposes only and should NOT be used for any production deployments !Artifactory ProRun Artifactory Pro with PostgreSQL and Nginx for Docker registry support### Linux$ sudo ./prepareHostEnv.sh -t pro -c$ sudo docker-compose -f artifactory-pro.yml up -d### MAC OSX$ ./prepareHostEnv.sh -t pro -c$ sed -i.bk "s,/data/,~/.artifactory/,g" artifactory-pro.yml #Backup the config file and changes the home directory to MAC OS default $ docker-compose -f artifactory-pro.yml up -dThis example starts the following containersNginx exposed on ports 80 (http) and 443 (https)You can disable port 80 in Nginx's configuration filesNginx
2025-04-14