Install Artifactory on Windows

JFrog Installation & Setup Documentation

Content Type
Installation & Setup

Installing Artifactory on Windows involves manually downloading the .zip file, extracting its contents, and then configuring the extracted directories. While it doesn't use the operating system's native package manager for installation, Artifactory can still be configured to run as an OS-managed service (for example, using the Windows Services manager).

Here you'll find step-by-step instructions for installing JFrog Artifactory on a Windows system, covering both single-node and high-availability (HA) configurations.

Prerequisites

Install Artifactory Windows Package

The following steps cover the installation process for both single-node and HA.

  1. Create JFrog Home Directory and Set JFROG_HOME Variable

    1. Create Dedicated Directory:

      Create a dedicated directory for your JFrog installation. This can be any directory of your choice (for example, C:\Program Files\jfrog, D:\Artifactory or a custom path).

      # Replace <path to your directory> with your chosen directory
      mkdir <path to your directory> 
      cd <path to your directory> 
    2. Move Downloaded Archive:

      Move the downloaded Artifactory installer archive (.zip file) into this newly created directory.

      move jfrog-artifactory-<pro|oss|cpp-ce>-<version>-windows.zip <path to your directory>
      # For Example,
      move jfrog-artifactory-pro-7.111.11-windows.zip <path to your directory>
    3. Set JFROG_HOME Variable:

      Set the JFROG_HOME environment variable to easily refer to this path in your Command Prompt or PowerShell. This must match the directory you created in the previous step.

      set JFROG_HOME=<path to your directory>
      # Example: set JFROG_HOME=<path to your directory> 
      

    For more information, see JFrog Product Directory Structure.

  2. Download and Extract Artifactory Windows Archive

    1. Download Artifactory Windows Archive:

      To download a specific version, replace [RELEASE] with the exact version number (for example, 7.111.11) in the command below. The placeholders <pro|oss|cpp-ce> signify the different editions of JFrog Artifactory that you can choose to install.

      # Example for Artifactory Pro (replace with your desired version)
      wget https://releases.jfrog.io/artifactory/artifactory-pro/org/artifactory/pro/jfrog-artifactory-pro/[RELEASE]/jfrog-artifactory-pro-[RELEASE]-windows.zip
      
      # For example, to download Artifactory Pro 7.111.11
      wget https://releases.jfrog.io/artifactory/artifactory-pro/org/artifactory/pro/jfrog-artifactory-pro/7.111.11/jfrog-artifactory-pro-7.111.11-windows.zip
      
    2. Extract and Rename Folder:

      Extract the contents of the compressed archive into your $JFROG_HOME directory. Then, move or rename the extracted folder to a simpler artifactory name.

      # Go into your JFROG_HOME directory if you're not already there
      cd %JFROG_HOME%
      
      # Extract jfrog-artifactory-<pro|oss|cpp-ce>-<version>-windows.zip into jfrog folder
      # You might need a tool like 7-Zip or use PowerShell's Expand-Archive
      
      # Move the extracted directory (e.g., 'artifactory-pro-7.111.11') to a simpler 'artifactory' name.
      move artifactory-<pro|oss|cpp-ce>-<version> artifactory
      # Example: 
      move artifactory-pro-7.111.11 artifactory
      
  3. Add system.yaml File:

    Ensure the system.yaml file exists under %JFROG_HOME%\artifactory\var\etc\. This file is crucial for Artifactory's core configuration.

  4. Install Artifactory Manually or as a Service:

    You have two options for running Artifactory:

    • As a Windows service (recommended for production)

    • Manually (for temporary use)

    Option A: Service Installation (Recommended for Production):

    This method installs Artifactory as a Windows service, ensuring it runs reliably in the background and starts automatically with the system.

    1. Browse to the bin Directory:

      cd %JFROG_HOME%\artifactory\app\bin
    2. Execute the Installation Script:

      You must run your Command Prompt or PowerShell with Run as administrator privileges for this script to succeed.

      InstallService.bat

    This script will set up the necessary service files for Artifactory.

    Option B: Manual Installation

    This method runs Artifactory as a foreground process. The console will be locked, and closing the console window will stop Artifactory.

    1. Browse to the bin Directory:

      cd %JFROG_HOME%\artifactory\app\bin
    2. Execute the Artifactory Batch File:

      Depending on Windows security settings, you might need to run the artifactory.bat command using Run as administrator.

      artifactory.bat
  5. 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.

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

  7. 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. Stop Artifactory Service (if already started)

      If you started Artifactory during the initial installation (for example, manual test run or service installation), stop it now before proceeding with HA configuration.

      To do so, run the following command:

      sc stop artifactory
    2. 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
      
    3. Ensure the database section (as configured in Step 4) is also present and identical on all nodes.

  8. Start First Artifactory Node (for Single-Node and HA)

    Note

    For High Availability installations, it is crucial to ensure the first Artifactory node is fully up and running, and its generated masterKey is copied and its generated masterKey is copied to all other nodes before starting any subsequent Artifactory services. Failure to do so will prevent the cluster from forming correctly and lead to startup failures.

    To start the Artifactory service on the first node, run the following command:

    sc start artifactory 

    For HA setup,

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

    2. Start Remaining Nodes for HA:

      Once the masterKey is synchronized across all nodes, start the Artifactory service on the remaining nodes by running the following command:

      sc start artifactory 

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

  9. Monitor Artifactory

    To check the Artifactory service status, run the following command in a Command Prompt window:

    sc query artifactory

    You can also check the Artifactory log in the %JFROG_HOME%\artifactory\var\log\artifactory-service.log file for detailed information.

  10. Access Artifactory UI

    After starting Artifactory, open your browser and go to http://<SERVER_HOSTNAME>:8082/, 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.

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