Docker Compose Next Steps

JFrog Installation & Setup Documentation

Content Type
Installation & Setup

These steps apply after your chosen installation method has been completed. For HA installations, these steps are performed on each node.

  1. Set up Artifactory Database

    Artifactory requires an external database for production. JFrog highly recommends using PostgreSQL for all products in the JFrog Platform, although Artifactory supports additional databases. For more information, see Database Configuration.

    1. Configure Artifactory to Use PostgreSQL:

      On each Artifactory node, edit $JFROG_HOME/artifactory/var/etc/system.yaml to point Artifactory to your external database.

      shared:
        database:
          type: postgresql
          driver: org.postgresql.Driver
          url: jdbc:postgresql://<DB_SERVER_IP_OR_HOSTNAME>:5432/artifactory_db
          username: artifactory_user
          password: your_secure_password

      The database configuration in system.yaml must be identical on all Artifactory nodes, and all nodes must have reliable network access to the single shared external database instance.

    2. Configure Other Supported Databases (Optional):

      To utilize databases other than PostgreSQL, you'll need to set shared.database.allowNonPostgresql to true in your system.yaml and configure the database details. Here's an example for MySQL:

      shared:
        database:
          allowNonPostgresql: true
          type: mysql
          driver: com.mysql.jdbc.Driver
          url: jdbc:mysql://<your db url, for example: localhost:3306>/artdb?characterEncoding=UTF-8&elideSetAutoCommits=true&useSSL=false
          username: artifactory
          password: password

    For more information about creating and configuring databases, see Set up Database.

  2. Set up Supported Filestores

    The filestore is where Artifactory physically stores the binaries.

    • Single-Node: A local filesystem is the default, but externalizing it (for example, to a dedicated volume) is recommended for easier management and potential migration.

    • High Availability (HA): A shared filestore is mandatory. This can be NFS, S3, Azure Blob Storage, Google Cloud Storage, or another supported object storage solution. All Artifactory nodes in the cluster must have unified and reliable network access to this single shared filestore.

    For more information about configuring filestores, see Set up Filestore.

  3. Configure HA (On Each Artifactory Node)

    For HA (Multi-Node) Installations, you'll configure each server in your Artifactory HA cluster similarly. A High Availability (HA) installation typically requires at least three or more nodes.

    1. Configure system.yaml for HA

      Edit $JFROG_HOME/artifactory/var/etc/system.yaml on each node.

      • In the node section, set haEnabled to true.

      • taskAffinity set to any indicates that all the nodes in the HA can act as primary nodes.

      shared:
        node:
          haEnabled: true
          taskAffinity: any
      
    2. If using an external database, ensure the database section (as configured in Step 1) is also present and identical on all nodes.

  4. Start Artifactory

    Before starting Artifactory, if your docker-compose.yaml includes a PostgreSQL service (for example, from docker-compose-postgres.yaml), you'll need to start it first.

    • Start PostgreSQL (if managed by Docker Compose)

      Starting from Artifactory 7.8.x, PostgreSQL needs to be started before starting the other services.

      docker compose -p rt-postgres -f docker-compose-postgres.yaml up -d
    • Start Artifactory (main services)

      Run the following command to start Artifactory. On the first HA node, Artifactory will initialize the database and potentially generate the master.key if it doesn't already exist.

      docker compose -p rt up -d

    For HA setup,

    1. Add the License:

      Once the first Artifactory node (for example, artifactory_1) is fully up and running, add the license through its UI.

    2. Copy master.key to Other Nodes:

      Copy the master.key file from $JFROG_HOME/artifactory/var/etc/security/ of the first node to the identical path on all other nodes.

    3. Update system.yaml in Other Nodes

      Your system.yaml on subsequent nodes should look like this (with the copied values):

      shared:
        security:
          masterKey: <copied_master_key_from_first_node>
      
    4. Start Remaining Nodes for HA:

      Once the masterKey is synchronized across all nodes, start the Artifactory service on the remaining nodes:

      docker compose -p rt up -d

      For HA setup, remember to add the license to the first node once it's up.

  5. Monitor Artifactory

    To check the Artifactory status, run the following command:

    docker compose -p rt logs
  6. Access Artifactory UI

    After starting Artifactory, open your browser and go to http://<SERVER_HOSTNAME>:8082/ui/, replacing <SERVER_HOSTNAME> with your server's actual IP address or hostname.

    For HA setup, you will typically access Artifactory through a load balancer that distributes traffic across your HA nodes. Configure your load balancer to direct traffic to http://< ARTIFACTORY_NODE_IP>:8082/ on each node.

  7. Initial Setup

    Upon first access, you'll be guided through an onboarding wizard:

    • Change Default Admin Password: The default credentials are admin/password. Change this immediately.

    • Configure Base URL: Configure the Base URL.

    • Apply Licenses: If you have an Artifactory Pro or Enterprise license, apply it.