Using the config.sh Script

JFrog Installation & Setup Documentation

Content Type
Installation & Setup

This is the recommended method, which automates the creation of necessary folders and sets permissions, streamlining the setup process for both single-node and HA.

  1. Download and Extract the Artifactory Docker Compose Archive:

    1. Download the Artifactory Docker Compose Package:

      Download the specific Artifactory Docker Compose package you wish to install. To download a specific version, replace [RELEASE] with the exact version number (for example, 7.111.11) in the command below:

      curl -g -L -O -J 'https://releases.jfrog.io/artifactory/artifactory-<pro|oss|jcr>/org/artifactory/<pro|oss|jcr>/docker/jfrog-artifactory-<pro|oss|jcr>/[RELEASE]/jfrog-artifactory-<pro|oss|jcr>-[RELEASE]-compose.tar.gz'
      
      # For example, to download Artifactory Pro 7.111.11:
      curl -g -L -O -J 'https://releases.jfrog.io/artifactory/artifactory-pro/org/artifactory/pro/docker/jfrog-artifactory-pro/7.111.11/jfrog-artifactory-pro-7.111.11-compose.tar.gz'
    2. Extract the Archive and Navigate:

      Extract the contents of the downloaded compressed archive (.tar.gz file) and then navigate into the extracted folder.

      tar -xvf jfrog-artifactory-<pro|oss|jcr>-<version>-compose.tar.gz
      # Example:
      # tar -xvf jfrog-artifactory-pro-7.111.11-compose.tar.gz
      # Navigate into the extracted folder
      cd artifactory-<pro|oss|jcr>-<version>/
      

    Note

    An .env file is included within the Docker Compose archive. This file is used by Docker Compose and is updated during installations and upgrades. Some operating systems do not display dot files by default. If you make any changes to this file, remember to back it up before an upgrade.

  2. Run the Interactive config.sh Script

    1. Execute the Script:

      Run the config.sh script with root user permissions to set up folders with the required ownership. This script is crucial for correct functioning, especially in HA.

      sudo bash ./config.sh

      Note

      The config.sh script is used at the beginning of the installation process to create the necessary folder structure on each node and assign the appropriate ownership. This step is crucial for the correct functioning of Artifactory HA. If you opt to use Docker Compose instead, be aware that you will need to manually set up the folder structure and permissions as specified in the .env file.

    2. Follow Script Prompts:

      The script will prompt you for:

      • Installation Directory: (Default: /root/.jfrog/artifactory). Press Enter for default or enter a custom path.

      • Machine IP Address: (Default: 0.0.0.0). Press Enter to use the machine's detected IP. For IPv6, use [<ipv6_address>].

      • Additional Node (for HA): Are you adding node to an existing product cluster? [y/N]: Choose y if setting up an HA node.

      • Install PostgreSQL (for initial setup/demo): Do you want to install PostgreSQL? [Y/n]: For production, select n to use an external database.

  3. Configure Host ID and IP for Container Installations:

    For Podman and other Container Installations, verify that the host's ID (shared.node.id) and IP (shared.node.ip) are explicitly added to the system.yaml. If these are not manually added, they are automatically resolved as the container's IP, meaning other nodes and services will not be able to reach this instance.

    shared:
      node:
        ip: host-ip # Actual IP of the host machine
        id: host-id
  4. Follow the steps mentioned in Docker Compose Next Steps to complete the setup.