Create a Federated Repository
Federate a Local repository in JFrog Artifactory and add members to form a Federation.
Federate a Local repository and add members to form a Federation. The repository type stays Local. After you add members, changes made to artifacts on one site are synchronized to the other JPDs in the Federation.
Who can perform this task: Platform Administrators
Prerequisites:
- All Prerequisites are met
- Self-managed customers have configured a Custom Base URL
Using the Platform UI
Federate a Local repository from the Multi-site tab. The repository type stays Local.
- In the Administration module, click Repositories.
- Click Create a Repository and select Local.
- In the Select Package Type window, select the package type.
- In the Basic tab, configure the basic repository settings, including the mandatory Repository Key. For more information, see Basic Settings for Local Repositories.
Warning
You must assign a Repository Key. Artifactory uses this key as the repository name on every Federation member.
- In the Advanced tab, configure additional repository settings as required. For more information, see Advanced Settings for Local Repositories.
- Open the Multi-site tab. Federation mode is already selected. To use replication instead, click Switch to Replication. If the repository already has Federation members, remove them before you switch.
- Click Add Repository to add members to the Federation.
- In the Add Federated Repositories dialog, add members using one of these tabs:
- Deployments (recommended): If you have JFrog Mission Control installed, select an existing repository on a connected remote JPD. If a repository with the same key doesn't exist on the remote JPD, click Create new to create and add it.
- URL: If the remote JPD isn't available on the Deployments tab, manually add the full repository URL using the syntax:
<BASE_URL>/artifactory/<repository_name>(for example,http://<ip address>:8082/artifactory/fed117). If the repository does not exist on the remote JPD, it is created automatically.
Note
JPDs appear only if you have set up bindings or established a Circle of Trust.
- Click Done. You return to the Multi-site tab.
- Click Create Local Repository.
The repository type stays Local, and the members synchronize artifacts through the Artifactory Federation Service (RTFS). To edit members later, open the Local repository and use the Multi-site tab. An existing repository stored as rclass: "federated" still uses the Federation tab.
Note
When you add a new Federation member, Xray configuration is copied from the repository on the JPD where you add the member to the new member. Configure Enable Indexing in Xray on the source repository in the Advanced tab before adding members. Changes to Xray settings on existing members are not synchronized across the Federation. For more information, see Xray Configuration Synchronization.
Note
Federated repositories have the following package-type limitations.
- Terraform Backend: You can't connect a Terraform Backend repository to a Federated repository. This limitation prevents inconsistencies in the system state, which could lead to unexpected behavior or errors.
- Cargo: Federation and virtual repositories aren't supported for Cargo without a workaround. See Cargo Package Federation Limitation and Workaround.
- Hugging Face: Machine Learning repositories can't be federated to legacy Hugging Face repositories because the layouts aren't compatible. See Hugging Face Repositories.
- NuGet: Federated peers must use the same NuGet layout type (normalized or non-normalized). See NuGet Repositories.
Using the REST API
Federate a Local repository with the Create Repository API. Send rclass: "local" and a members list. A members list enables Federation. The repository type stays Local.
PUT <JPD_URL>/artifactory/api/repositories/<REPO_KEY>
Content-Type: application/json
{
"rclass": "local",
"packageType": "generic",
"members": [
{ "url": "<MEMBER_URL>/artifactory/<TARGET_REPO_NAME>", "enabled": "true" }
]
}Where:
<JPD_URL>: The base URL of the JPD where you create the repository<REPO_KEY>: The key for the Local repository<MEMBER_URL>: The base URL of a member JPD<TARGET_REPO_NAME>: The key of the repository on the member JPD
For example:
{
"rclass": "local",
"packageType": "generic",
"members": [
{ "url": "https://member-jpd.example.com/artifactory/libs-release-local", "enabled": "true" }
]
}rclass: "federated" remains accepted for a repository that is already stored that way. Use application/vnd.org.jfrog.artifactory.repositories.FederatedRepositoryConfiguration+json only for those existing repositories.
To read Federation status, call GET /artifactory/api/v3/repositories. The response keeps the repository rclass and adds federated. Use federated=true to list federated repositories and federated=false to list the others. GET /artifactory/api/v3/repositories/batch returns the same federated field and members list. Existing rclass: "federated" repositories appear in this v3 list as rclass: "local".
These APIs also apply:
- Update Repository Configuration API
- Get Repositories API (filter by type or project)
- Delete Repository API
Warning
When working inside a specific project, the Federated repositories that comprise the Federation must all share the same project key.
Result
The Federated repositories are automatically displayed in your artifact browser after creation. Monitor their sync status on the Federation Dashboard.
Next Steps
Frequently Asked Questions
This section provides answers to frequently asked questions.
FAQs
Q: What happens to Xray configuration when I add a new Federation member?
A: Xray configuration is copied from the repository on the JPD where you add the member to the new member. Configure Xray indexing before adding members, since changes to Xray settings on existing members aren't synchronized across the Federation afterward.
Q: Can I federate a Terraform Backend, Cargo, or Hugging Face repository?
A: Terraform Backend repositories can't be connected to a Federated repository at all. Cargo and legacy Hugging Face repositories have federation limitations — see the package-type limitations note in Using the Platform UI for workarounds.
Q: Where do I manage or remove Federation members after creating the repository?
A: Open the Local repository and use the Multi-site tab. An existing repository stored as rclass: "federated" uses the Federation tab. See Add and Remove Federation Members.
Q: Do all Federated repositories in a Federation need the same project key?
A: Yes, when working inside a specific project. The Federated repositories that comprise the Federation must all share the same project key.
Related Topics
Updated about 1 month ago
