---
updatedAt: 2026-08-17T05:07:52.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/artifactory/llms.txt
---

# Alpine Linux Repositories

Alpine Linux is a lightweight, security-oriented Linux distribution built around musl libc and BusyBox. This makes Alpine significantly smaller and more resource-efficient than other distributions. You can use Alpine Linux repositories in Artifactory to create secure, centralized storage and access for your `.apk` packages. This gives you precise control over your development and deployment processes. For more information, see the <Anchor label="Alpine documentation" target="_blank" href="https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper">Alpine documentation</Anchor>.

<Image alt="package_management_images_for_Alphine.png" border={false} src="https://files.readme.io/d3f2a9ca0c9fc8c19c51602d339723bad4a13a926bde69fb349cb4b5ec2242a8-uuid-a9c631b5-feb0-422f-fc9a-6198fb8e70fd.png" />

Artifactory fully supports Alpine Linux repositories, including the following capabilities:

* **Unified Repository Management**: Consolidate all your `.apk` packages by using Alpine Linux repositories in Artifactory as a single source of truth. Set up secure local repositories, access cached versions of <Anchor label="`https://pkgs.alpinelinux.org/packages`" target="_blank" href="https://pkgs.alpinelinux.org/packages">`https://pkgs.alpinelinux.org/packages`</Anchor>, and create a single access point for all sources with virtual repositories.
* **Support for Alpine Linux CLI**: Natively manage and provision Alpine packages from Artifactory using the `apk` client.
* **Automated metadata calculation**: Artifactory automatically calculates metadata for packages uploaded to local repositories, eliminating the need for manual indexing.
* **Flexible Key Management**: Manage multiple RSA key pairs and assign different keys to each Alpine repository. This allows you to sign the package indexes in your local and virtual repositories, ensuring package integrity and authenticity.

# Get Started with Alpine Linux

To get started working with Alpine, complete the following main steps:

1. [Create an Alpine Repository](#create-an-alpine-repository)
2. <Anchor label="Connect apk to Artifactory" title="Connect apk to Artifactory" href="#connect-apk-to-artifactory">Connect apk to Artifactory</Anchor>
3. <Anchor label="Deploy" title="Deploy Alpine Packages" href="#deploy-alpine-packages">Deploy</Anchor> and <Anchor label="resolve" title="Resolve Alpine Packages" href="#resolve-alpine-packages">resolve</Anchor> Alpine packages
   ![](https://files.readme.io/27581ff321e2e1b0e4bc7a5dfbfe67dedadeef67bfe096cefae1dd8d2c8cd601-uuid-333b0ff2-0c1d-7d2b-5215-7b01537326cf.png)

# Create an Alpine Repository

This topic describes how to create an Alpine repository. This is required before deploying and resolving Alpine packages. There are three primary types of repositories:

* **Local repositories**: Store and share first- and second-party packages with your organization
* **Remote repositories**: Download packages from `https://pkgs.alpinelinux.org/packages` and other remote locations or Artifactory instances
* **Virtual repositories**: Aggregate remote and local repositories, enabling your organization to scale by providing a single URL that provides access to multiple repositories and types

For more information on JFrog repositories, see [Repository Management](https://docs.jfrog.com/artifactory/docs/repository-management).

**Prerequisites**:

* You need Admin or Project Admin permissions in Artifactory to create a repository. If you don't have Admin permissions, the option will not be available.

* Alpine Linux requires RSA keys by default. For more information on adding RSA keys, see [RSA Key Pairs](/installation/docs/rsa-key-pairs). If you do not configure RSA keys, you must use the `--allow-untrusted` flag.

<Callout icon="📘" theme="info">
  **Note**

  When running apk commands with the `--allow-untrusted` flag against a local or virtual Alpine repository, you may see the following warning:

  `This apk-tools is OLD! Some packages might not function properly.`

  This is an expected security warning from the Alpine package manager that appears only when package signature verification is disabled via the `--allow-untrusted` flag. The message has no impact on your system and can be safely ignored.
</Callout>

**To create an Alpine repository**:

1. In the **Administration** tab, click **Repositories | Create a Repository**.

   <Image alt="CreateAnsibleLocal1.png" border={false} src="https://files.readme.io/d1ea5cbb882eb98c2a8069b5f65d5adc1defe254a6d48724e5ecea5adf1d3efe-uuid-1b9056d4-9a20-7991-37c4-529beb337460.png" />
2. Select the type of repository you want to create: local, remote, or virtual.
3. Select the **Alpine** package type.
4. Configure the required fields for the repository:

   * For local repositories, in the **Repository Key** field, type a meaningful name for the repository. For example, `alpine-local`. For more information on local repositories and their settings, see [Local Repositories](https://docs.jfrog.com/artifactory/docs/local-repositories).

     In the **Advanced** tab, select an RSA key from the list to sign the `APKINDEX.tar.gz` index file.
   * For remote repositories, verify the **Repository URL** and update as needed. For more information on remote repositories and their settings, see [Remote Repositories](https://docs.jfrog.com/artifactory/docs/remote-repositories).

     To avoid manually managing keys for remote repositories, place them inside a virtual repository. Assign a key pair to the virtual repository, and Artifactory will re-sign all remote metadata. This way, your client only needs to trust the virtual repository's single public key.
   * For virtual repositories, select one or more local or remote repository types to include in the virtual repository. For more information on virtual repositories and their settings, see [Virtual Repositories](https://docs.jfrog.com/artifactory/docs/virtual-repositories).

     The RSA key pair defined for the virtual repository will be used to sign the virtual index file. If local repositories are defined with RSA key pairs, these keys will be ignored.
5. Click **Create Repository**. The repository is created and the Repositories window is displayed.

# Connect apk to Artifactory

You can connect the Alpine Package Keeper client, or `apk`, to Artifactory to deploy and resolve packages from Artifactory repositories.

**Prerequisite**: Before connecting `apk` to Artifactory, you must have an existing Alpine repository in Artifactory. For more information, see [Create an Alpine Repository](#create-an-alpine-repository).

<Callout icon="📘" theme="info">
  **Note**

  To configure `apk` for Artifactory, inject credentials, collect build-info, and upload packages with JFrog CLI, see [Use apk with JFrog CLI](https://docs.jfrog.com/artifactory/docs/jf-apk). Use `jf setup apk` to write `/etc/apk/repositories` and the repository RSA public key, then run `jf apk add`, `jf apk upgrade`, or `jf apk upload`.
</Callout>

**To connect the Alpine Package Keeper client to Artifactory:**

Run the following command set Artifactory as an Alpine Linux repository in your `/etc/apk/repositories` file:

```
sudo sh -c "echo 'https://<USERNAME>:<AUTH_TOKEN>@[JFrogPlatformURL]/artifactory/<REPO_NAME>/<BRANCH>/<REPOSITORY>'" >> /etc/apk/repositories
```

Where:

* `<USERNAME>`: Your Artifactory username
* `<AUTH_TOKEN>`: Your Artifactory identity token
* `[JFrogPlatformURL]`: The base URL of your JPD
* `<REPO_NAME>`: The name of the Alpine repository in Artifactory
* `<BRANCH>`: The specific release branch of Alpine Linux you want to use
* `<REPOSITORY>`: The collection or component within the Alpine branch, typically `main` or `community`

For example:

```
sudo sh -c "echo 'https://jeffry:AKCp89XxY7wLPqL6vK3Dds7Hgjd981n0@company.jfrog.io/artifactory/alpine-prod-virtual/v3.20/main' >> /etc/apk/repositories"
```

<Callout icon="📘" theme="info">
  **Note**

  You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information, see <Anchor label="Use Artifactory Set Me Up for Configuring Package Manager Clients" title="Use Artifactory Set Me Up for Configuring Package Manager Clients" href="/docs/use-artifactory-set-me-up-for-configuring-package-manager-clients">Use Artifactory Set Me Up for Configuring Package Manager Clients</Anchor>.
</Callout>

## Verify Index Signature

To use RSA keys, you must add the keys into your `/etc/apk/keys` folder to verify the index signature.

**To verify the index signature:**

Run this command:

```
wget -O /etc/apk/keys/rsa_tst.rsa.pub https://<USERNAME>:<AUTH_TOKEN>@[JFrogPlatformURL]/artifactory/api/security/keypair/public/repositories/<REPO_NAME>
```

Where:

* `<USERNAME>`: Your Artifactory username
* `<AUTH_TOKEN>`: Your Artifactory identity token
* `[JFrogPlatformURL]`: The base URL of your JPD
* `<REPO_NAME>`: The name of the Alpine repository in Artifactory

For example:

```
wget -O /etc/apk/keys/rsa_tst.rsa.pub https://jeffry:AKCp89XxY7wLPqL6vK3Dds7Hgjd981n0@company.jfrog.io/artifactory/api/security/keypair/public/repositories/alpine-local
```

<Callout icon="📘" theme="info">
  **Note**

  You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information, see <Anchor label="Use Artifactory Set Me Up for Configuring Package Manager Clients" title="Use Artifactory Set Me Up for Configuring Package Manager Clients" href="/docs/use-artifactory-set-me-up-for-configuring-package-manager-clients">Use Artifactory Set Me Up for Configuring Package Manager Clients</Anchor>.
</Callout>

**Next steps:**

* <Anchor label="Deploy Alpine Packages" title="Deploy Alpine Packages" href="#deploy-alpine-packages">Deploy Alpine Packages</Anchor>
* <Anchor label="Resolve Alpine Packages" title="Resolve Alpine Packages" href="#resolve-alpine-packages">Resolve Alpine Packages</Anchor>

# Deploy Alpine Packages

Run the following command:

```
curl -L -u <USERNAME>:<AUTH_TOKEN> -XPUT "https://[JFrogPlatformURL]/artifactory/<REPO_NAME>/<BRANCH>/<REPOSITORY>/<ARCHITECTURE>/<PACKAGE>" -T <PATH_TO_FILE>
```

Where:

* `<USERNAME>`: Your Artifactory username
* `<AUTH_TOKEN>`: Your Artifactory identity token
* `[JFrogPlatformURL]`: The URL of your JPD
* `<REPO_NAME>`: The name of the Alpine repository in Artifactory
* `<BRANCH>`: The specific release branch of Alpine Linux you want to use
* `<REPOSITORY>`: The collection or component within the Alpine branch, typically `main` or `community`
* `<ARCHITECTURE>`: The CPU architecture that the Alpine package is built for
* `<PACKAGE>`: The package filename
* `<PATH_TO_FILE>`: The location of the `.apk` package file on your computer

For example:

```
curl -L -u jeffry:AKCp89XxY7wLPqL6vK3Dsfdh4fe887SguYnm90x -XPUT "https://company.jfrog.io/artifactory/alpine-local/v3.20/main/x86_64/my-app-1.0.0-r1.apk" -T ~/builds/my-app-1.0.0-r1.apk
```

<Callout icon="📘" theme="info">
  **Note**

  You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information, see <Anchor label="Use Artifactory Set Me Up for Configuring Package Manager Clients" title="Use Artifactory Set Me Up for Configuring Package Manager Clients" href="/docs/use-artifactory-set-me-up-for-configuring-package-manager-clients">Use Artifactory Set Me Up for Configuring Package Manager Clients</Anchor>.
</Callout>

# Resolve Alpine Packages

Run the following command:

```
apk add <PACKAGE>
```

Where:

* `<PACKAGE>`: The name of the target package in your Artifactory repository, optionally specifying a package version

For example:

```
apk add my-app=1.0.0-r1
```

<Callout icon="✅" theme="okay">
  **Tip**

  If RSA keys are not configured for your repository, add the `--allow-untrusted` flag.
</Callout>

## Upgrade Alpine Packages

You can use the `-u` flag with the `apk add` command to upgrade an installed package to the latest available version from the repository.

**Prerequisite**: Run the `apk update` command to sync your package index with the repository and make sure your system is aware of the latest available versions.

**To upgrade a package:**

Run the following command:

```
apk add -u <PACKAGE>
```

Where:

* `<PACKAGE>`: The name of the target package in your Artifactory repository

For example:

```
apk add -u my-app
```

# Additional Alpine Information

The following pages provide additional information about using Alpine with Artifactory:

* <Anchor label="Alpine Artifact Metadata" title="Alpine Artifact Metadata" href="#alpine-artifact-metadata">Alpine Artifact Metadata</Anchor>
* <Anchor label="Alpine Linux Repository Structure" title="Alpine Linux Repository Structure" href="#alpine-linux-repository-structure">Alpine Linux Repository Structure</Anchor>
* <Anchor label="Alpine REST API Support" title="Alpine REST API Support" href="#alpine-rest-api-support">Alpine REST API Support</Anchor>

## Alpine Artifact Metadata

Artifactory writes several entries from the Alpine Linux package's metadata as properties on all of the artifacts.

These properties can be used to search for Alpine Linux packages more efficiently using the **Artifacts Search**, by **Package** type **Alpine**.

Alpine Linux package properties are the following:

* `alpine.name`
* `alpine.version`
* `alpine.branch`
* `alpine.repository`
* `alpine.architecture`

## Alpine Linux Repository Structure

An Alpine Linux repository is a directory with a collection of `.apk` packages, and an Alpine Linux repository consists of the following three main coordinates:

* branch
* repository
* architecture

Artifactory uses the same convention of the directory layout as the Alpine Linux repository uses. For example:

```
├── 3.9 (branch)
│    └─ main (repository)
│      └─ aarch64 (architecture)
│        └── APKINDEX.tar.gz (index file)
│        └── a2ps-4.14-r7.apk
│        └── ...apk
│      └─ x86
│        └── APKINDEX.tar.gz (index file)
│        └── a2ps-4.14-r7.apk
│        └── ...apk
│      └─ ...
├── ...
```

<Callout icon="📘" theme="info">
  **Deployment Structure**

  All deployment of Alpine Linux packages into Artifactory must be under the `<BRANCH>/<REPOSITORY>/<ARCHITECTURE>/` structure.

  If packages are not deployed under this structure, **they will not be included in any index file**.
</Callout>

## Alpine REST API Support

The Artifactory REST API enables the recalculation of the repository index, as described in [Calculate Alpine Repository Metadata](https://docs.jfrog.com/artifactory/reference/calculatealpinerepositorymetadata).

# Alpine Limitations in Artifactory

The following are the limitations of Alpine in Artifactory:

* **Supported clients**: Artifactory supports Alpine Linux version 3.9.6 and above and the apk-tools client version 2.10.3 and above.
* **`APKINDEX` signing**: Artifactory signs the repository metadata file, or the index, not individual Alpine packages themselves.
* **Path structure requirements**: All Alpine packages must be deployed to a specific path structure, `<BRANCH>/<REPOSITORY>/<ARCHITECTURE>`, in order to be correctly indexed by Artifactory. For more information, see <Anchor label="Alpine Linux Repository Structure" title="Alpine Linux Repository Structure" href="#alpine-linux-repository-structure">Alpine Linux Repository Structure</Anchor>.