ARTIFACTORY: How to Create a Legacy Helm Smart Remote Repository

Products
Frog_Artifactory
Content Type
User_Guide
AuthorFullName__c
Harry Van, Jeremy Leopold, Ramyashree V
articleNumber
000006133
FirstPublishedDate
2024-07-02T07:18:58Z
lastModifiedDate
2026-10-12

ARTIFACTORY: How to Create a Legacy Helm Smart Remote Repository

Introduction
This article explains how to create a legacy Helm Smart Remote repository on an Edge node that connects to a legacy Helm local repository on a main Artifactory instance. Helm clients resolve charts through an Edge virtual repository, which rewrites the chart URLs so downloads remain behind the Edge instance.


Prerequisites
  • A main Artifactory instance with a legacy Helm local repository that contains at least one chart.
  • An Artifactory Edge node.
  • Credentials or a token with permission to read the main repository.


Step-by-step
  1. On the Edge node, create a remote repository with the Helm package type.
  2. Enter a repository key for the Smart Remote.
  3. Set the URL to the legacy Helm package endpoint of the main repository:
 https://<main-host>/artifactory/api/helm/<main-repository>
  1. Enter credentials or a token with permission to read the main repository.
  2. Click Test and confirm that the connection succeeds. 
Note:

On some versions of Artifactory, the test connection will return a 404. If the connection fails, verify the credentials and ensure the URL includes /artifactory/api/helm/<main-repository>. Additionally another way to test is to remove /api/helm/ from the URL and try the Test again. Once the Test Succeeds set the URL back to  /artifactory/api/helm/<main-repository>
  1. Confirm that Artifactory recognizes the repository as a Smart Remote.
  2. Leave Enable External Dependency Rewrite cleared. It is not required when the Smart Remote points to a legacy Helm local repository on the main instance.
  3. Save the Smart Remote repository.
  4. On the Edge node, create a virtual repository with the Helm package type.
  5. Add the Smart Remote to the virtual repository and save the configuration.
  1. Add the Edge virtual repository to the Helm client:
  helm repo add <edge-repository-alias> \
    "https://<edge-host>/artifactory/api/helm/<edge-virtual>" \
    --username <USERNAME> \
    --password <TOKEN>
  1. Refresh the repository index:
helm repo update <edge-repository-alias>
  1. Pull a chart through the Edge virtual repository:
helm pull <edge-repository-alias>/<chart-name> --version <chart-version>


Advanced Topology & External Dependency Rewrites
In standard setups where a downstream Smart Remote directly targets a Local Repository on an upstream JPD, external dependency rewrites are not required. However, for topologies where the upstream target involves Remote Repositories, Virtual Repositories, or Multi-Tier Smart Remotes, special configurations are necessary to ensure metadata calculation and dependency URL rewrites function correctly across all nodes.


Important Architecture Note:
As a general rule across most package types in Artifactory, pointing a Smart Remote repository directly to a Virtual repository on another instance is not recommended to avoid redundant metadata aggregation and unexpected behaviors.
Helm is an exception to this rule. Because Helm chart resolution relies on virtual index generation (index.yaml) and dependency URL rewrites across multiple sites or Edge nodes, pointing a Smart Remote to an upstream Virtual repository is the required pattern for multi-tier Helm topologies.


Use Case Scenarios: When to Enable "Enable External Dependency Rewrite"
  • Targeting a Local Repository (Upstream): Disabled. External dependency rewrite is not required when pointing directly to a Local Repository.
  • Targeting a Virtual/Remote Repository (Upstream): Enabled. Must be checked on the Smart Remote repository. Additionally, any upstream Virtual Repository aggregating a Remote or Smart Remote must have the system flag artifactoryRequestsCanRetrieveRemoteArtifacts: true enabled to allow downstream Smart Remotes to resolve, fetch, and calculate virtual metadata for remote artifacts.


Multi-Tier Smart Remote Topology (Cascade Setup)
In multi-node environments (e.g., Client -> JPD-C -> JPD-B -> JPD-A -> Public Upstream), Helm chart dependency rewrites happen at the Virtual Repository metadata calculation level at each hop. To ensure seamless resolution across all nodes, construct the topology such that every intermediate Smart Remote points to a Virtual Repository on its upstream JPD.
Configuration Breakdown by Node
Node / JPD
Component
Target Endpoint
Key Settings / Configuration Required
JPD-C (Edge/Downstream)
Virtual JPD-C
Aggregates Smart Remote JPD-C
Endpoint used by Helm clients. Performs final chart URL rewriting.
Smart Remote JPD-C
Point to Virtual JPD-B
• Enable External Dependency Rewrite: true
JPD-B (Intermediate)
Virtual JPD-B
Aggregates Smart Remote JPD-B
• artifactoryRequestsCanRetrieveRemoteArtifacts: true
Smart Remote JPD-B
Point to Virtual JPD-A
• Enable External Dependency Rewrite: true
JPD-A (Source)
Virtual JPD-A
Aggregates Helm Upstream Remote
• artifactoryRequestsCanRetrieveRemoteArtifacts: true
Helm Upstream Remote
Upstream Helm Registry URL
• Enable External Dependency Rewrite: true
* Only strictly required if the public upstream index.yaml contains third-party absolute URLs (e.g., S3/CDNs). Turning it ON serves as a safeguard against broken chart downloads in isolated environments.


Important: Smart Remote URL Must Exactly Match the Upstream's Index URLs
A common cause of mismatch is a reverse proxy (Apache or Nginx) in front of the upstream Artifactory. The proxy sets the X-JFrog-Override-Base-Url header, which the upstream uses when generating chart URLs in its index.yaml. Many default configurations explicitly include :443 in this header:
# Apache
RequestHeader set X-JFrog-Override-Base-Url https://upstream.example.com:443
# Nginx
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
This causes the upstream's index.yaml to contain chart URLs like:
urls:
  - 
https://upstream.example.com:443/artifactory/api/helm/my-helm-virtual/argo-cd-9.4.14/argo-cd-9.4.14.tgz
If the downstream Smart Remote URL is configured without :443:
https://upstream.example.com/artifactory/api/helm/my-helm-virtual
These are semantically identical but not identical as strings. The dependency rewrite silently fails, and the downstream's virtual index.yaml will contain the upstream's raw URLs instead of the downstream's.
To resolve this, confirm your upstream reverse proxy configuration and add the explicit :443 port to the Smart Remote URL on the downstream so it matches exactly:
https://upstream.example.com:443/artifactory/api/helm/my-helm-virtual


The helm repo add URL Must Also Match
The same :443 that appears in the upstream's index will also appear in the downstream's rewritten index.yaml if the downstream's own reverse proxy includes :443 in X-JFrog-Override-Base-Url. For example, after a successful rewrite the downstream's virtual index.yaml may contain:
urls:
  - 
https://downstream.example.com:443/artifactory/api/helm/my-helm-virtual/argo-cd-9.4.14/argo-cd-9.4.14.tgz
Helm matches stored repository credentials against the download URL's host and port. If the repository was added without :443:
helm repo add my-repo https://downstream.example.com/artifactory/api/helm/my-helm-virtual 
--username ...
Helm will not attach credentials to download URLs that include :443, resulting in 403 Forbidden on chart pulls. To avoid this, include :443 in the helm repo add URL so it matches the chart URLs in the index:
helm repo add my-repo https://downstream.example.com:443/artifactory/api/helm/my-helm-virtual 
--username ...


Verification
  1. Fetch index.yaml from the Edge virtual repository:

Shell

 curl -u "<USERNAME>:<TOKEN>" \
"https://<edge-host>/artifactory/api/helm/<edge-virtual>/index.yaml"
  1. Inspect the urls entry for the chart. It should use the Edge virtual repository endpoint:
 urls: - https://<edge-host>/artifactory/api/helm/<edge-virtual>/<chart-name>-<chart-version>.tgz
The direct Smart Remote index can retain a local:// chart URL from the main local repository. This is expected; Helm clients should use the Edge virtual repository, where the URL is rewritten to the Edge endpoint.
  1. Confirm that the chart package was downloaded and appears in the Smart Remote cache on the Edge node.


Related resources