---
updatedAt: 2026-06-09T06:43:07.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/artifactory/llms.txt
---

# Opkg Repositories

Opkg (Open PacKaGe) is a lightweight package manager designed for embedded Linux systems. Opkg automates the process of installing, removing, and managing software from remote repositories known as feeds. You can use Artifactory as a fully-fledged Opkg repository to generate index files that are fully compliant with the Opkg client. For more information, see the <Anchor label="Opkg documentation" target="_blank" href="https://openwrt.org/docs/guide-user/additional-software/opkg">Opkg documentation</Anchor>.

<Image alt="package_management_images_for_Opkg.png" border={false} src="https://files.readme.io/dd45c83fe93a2e2d0013c7f0e176794e3e134569645207a7092e106946382f6a-uuid-3f509b5c-4a15-901b-1b57-4d368d95828e.png" />

Artifactory fully supports Opkg repositories, including the following capabilities:

* **Unified Repository Management**: Consolidate all your `.ipk` packages by using Opkg repositories in Artifactory as a single source of truth. Set up secure local repositories, access cached versions of <Anchor label="`downloads.openwrt.org`" target="_blank" href="http://downloads.openwrt.org/">`downloads.openwrt.org`</Anchor>, and create a single access point for all sources with virtual repositories.
* **Full Automation with REST API and JFrog CLI**: Natively manage and provision `.ipk` packages from Artifactory using the `opkg` client, or automate fully with the JFrog CLI and REST API to optimize software delivery.
* **Automated Metadata Calculation**: Artifactory automatically calculates metadata for packages uploaded to local repositories, eliminating the need for manual indexing.
* **Flexible Key Management**: Sign indexes and verify packages with GPG signatures, and manage the GPG signatures using the Artifactory UI and REST API.
* **Enterprise Readiness**: Use secure, private Opkg repositories in a High Availability installation of Artifactory. Artifactory provides enterprise-ready stability, reliability, scalable storage through Cloud providers, and advanced replication options for disaster recovery.

# Get Started with Opkg

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

1. <Anchor label="Create an Opkg Repository" title="Create an Opkg Repository" href="#create-an-opkg-repository">Create an Opkg Repository</Anchor>
2. <Anchor label="Connect `opkg` to Artifactory" title="Connect opkg to Artifactory" href="#connect-opkg-to-artifactory">Connect `opkg` to Artifactory</Anchor>
3. <Anchor label="Deploy" title="Deploy Opkg Packages" href="#deploy-opkg-packages">Deploy</Anchor> and <Anchor label="resolve" title="Resolve Opkg Packages" href="#resolve-opkg-packages">resolve</Anchor> Opkg packages
   ![](https://files.readme.io/8760a905a3fd90b212359fb87185b1c68104682dc6777d4a0e42b7a640daece2-uuid-cfbc1c92-b465-a26b-9537-4b3e82b8d3c0.png)

# Create an Opkg Repository

This topic describes how to create an Opkg repository. This is required before deploying and resolving Opkg 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 Opkg feeds 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).

**Prerequisite**: 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.

**To create an Opkg repository**:

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

   <Image alt="CreateAnsibleLocal1.png" border={false} src="https://files.readme.io/276bfc9f388e528f767bac8469f7bdfbab9d760345adc3526b8a1ff505531806-uuid-e60ef585-6db7-4ba3-865e-4c76d4069261.png" />
2. Select the type of repository you want to create: local, remote, or virtual.
3. Select the **opkg** 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, `opkg-local`. For more information on local repositories and their settings, see <Anchor label="Local Repositories" target="_blank" href="/artifactory/docs/local-repositories">Local Repositories</Anchor>.
   * For remote repositories, verify the **Repository URL** and update as needed. For more information on remote repositories and their settings, see <Anchor label="Remote Repositories" target="_blank" href="/artifactory/docs/remote-repositories">Remote Repositories</Anchor>.

     You can set the repository URL to point to a specific Opkg feed, like `http://downloads.openwrt.org/chaos_calmer/15.05/adm5120/rb1xx/packages/luci`, or point to a base level like `http://downloads.openwrt.org/chaos_calmer/15.05/` and specify feeds in the client's `opkg.conf` file.
   * 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 <Anchor label="Virtual Repositories" target="_blank" href="/artifactory/docs/virtual-repositories">Virtual Repositories</Anchor>.
5. Click **Create Repository**. The repository is created and the Repositories window is displayed.

# Connect opkg to Artifactory

There is no single release of the `opkg` client, so you must manually download, compile, and configure the client according to your environment by completing these steps:

1. <Anchor label="Compile and Install the opkg Client" title="Compile and Install the opkg Client" href="#compile-and-install-the-opkg-client">Compile and Install the opkg Client</Anchor>
2. <Anchor label="Configure `opkg` to Work with Artifactory" title="Configure opkg to Work with Artifactory" href="#configure-opkg-to-work-with-artifactory">Configure `opkg` to Work with Artifactory</Anchor>
3. <Anchor label="Configure Signature Verification" title="Configure Signature Verification" href="#configure-signature-verification">Configure Signature Verification</Anchor>

**Next steps:**

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

## Compile and Install the opkg Client

**Prerequisite**: Before connecting `opkg` to Artifactory, you must have an existing Opkg repository in Artifactory. For more information, see <Anchor label="Create an Opkg Repository" title="Create an Opkg Repository" href="#create-an-opkg-repository">Create an Opkg Repository</Anchor>.

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

  This task includes universal commands for Unix-like systems. Commands for your environment may vary. Treat this workflow as a template, and use relevant commands that serve the specified purpose.
</Callout>

**To compile and install the `opkg` client:**

1. Install the compilation dependencies using one of the following commands based on your environment:

   * Debian/Ubuntu using APT:

     ```
     sudo apt-get update && sudo apt-get install -y gcc libtool autoconf pkg-config libarchive-dev libcurl4-gnutls-dev libssl-dev libgpgme-dev
     ```
   * Red Hat/Fedora using DNF:

     ```
     sudo dnf install -y gcc libtool autoconf pkgconf libarchive-devel libcurl-devel openssl-devel gpgme-devel
     ```
   * macOS using Homebrew:

     ```
     brew install autoconf automake libtool pkg-config libarchive curl openssl gpgme
     ```
2. Download and extract the source code of the latest stable release of the `opkg` client:

   ```
   wget https://downloads.yoctoproject.org/releases/opkg/opkg-<VERSION>.tar.gz && tar -zxvf opkg-<VERSION>.tar.gz
   ```

   Where:

   * `<VERSION>`: The version number of the latest stable release

   For example:

   ```
   wget https://downloads.yoctoproject.org/releases/opkg/opkg-0.7.0.tar.gz && tar -zxvf opkg-0.7.0.tar.gz
   ```
3. Navigate to the extracted directory:

   ```
   cd opkg-<VERSION>
   ```

   Where:

   * `<VERSION>`: The version number of the latest stable release

   For example:

   ```
   cd opkg-0.7.0
   ```
4. Run the configuration script, making sure to add `--enable-gpg` and `--enable-curl` to support signature verification and HTTPS authentication:

   ```
   ./configure --with-static-libopkg --disable-shared --enable-gpg --enable-curl --prefix=/usr/local --sysconfdir=/etc
   ```
5. Compile and install the client:

   ```
   make && sudo make install
   ```
6. If needed, manually create the client configuration file:

   ```
   mkdir -p /etc/opkg && touch /etc/opkg/opkg.conf
   ```

**Next steps:**

* <Anchor label="Configure `opkg` to Work with Artifactory" title="Configure opkg to Work with Artifactory" href="#configure-opkg-to-work-with-artifactory">Configure `opkg` to Work with Artifactory</Anchor>
* <Anchor label="Configure Signature Verification" title="Configure Signature Verification" href="#configure-signature-verification">Configure Signature Verification</Anchor>

## Configure opkg to Work with Artifactory

In order for your `opkg` client to work with Artifactory, you need to add Artifactory Opkg feeds and credentials to your `opkg.conf` file.

**To configure the opkg client to work with Artifactory:**

1. Run the following command to add an Artifactory feed to your client:

   ```
   echo 'src <FEED_NAME> [JFrogPlatformURL]/artifactory/<REPO_NAME>/<PATH_TO_FEED>' >> /etc/opkg/opkg.conf
   ```

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

  To install the `.gz` variant of the Package index file, replace `src` with `src/gz`.
</Callout>

Where:

* `<FEED_NAME>`: The name of the feed
* `[JFrogPlatformURL]`: The base URL of your JPD
* `<REPO_NAME>`: The name of the target repository in Artifactory
* `<PATH_TO_FEED>`: The path to the index file in the target repository

For example:

```
# Default connection using hostname and port
src artifactory-feed http://prod.mycompany:8080/artifactory/opkg-virtual/my-distro/1.0/i386 >> /etc/opkg/opkg.conf
# Secure connection using a standard HTTPS URL
src/gz artifactory-feed https://company.jfrog.io/artifactory/opkg-virtual/my-distro/1.0/armv7a >> /etc/opkg/opkg.conf
```

2. To access Artifactory feeds that require authentication, run this command to add credentials to your client:

   ```
   echo 'option http_auth <USERNAME>:<AUTH_TOKEN>' >> /etc/opkg/opkg.conf
   ```

   Where:

   * `<USERNAME>`: Your Artifactory username
   * `<AUTH_TOKEN>`: Your Artifactory identity token

   For example:

   ```
   echo 'option https_auth jeffry:akcp_aL9k4jPq7bE2C8QmZcV8nF3mG5hJ1yX9mI8oPzAsDtFgHjKlM' >> /etc/opkg/opkg.conf
   ```

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

  You can also use an encrypted plaintext password as described in [Centrally Secure Passwords](/administration/docs/centrally-secure-passwords).
</Callout>

<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="Configure Signature Verification" title="Configure Signature Verification" href="#configure-signature-verification">Configure Signature Verification</Anchor>

## Configure Signature Verification

You can configure the `opkg` client to verify signatures created with your private GPG key pair.

**Prerequisites**:

* Generate and upload GPG keys to Artifactory. For more information, see [Manage Signing Keys](/administration/docs/security-keys-management).
* Make sure `gnupg` is installed.

**To configure signature verification:**

1. Import your GPG keys to the `opkg` keychain:

   * 0.3 legacy versions:

     ```
     opkg-key add key.pub
     ```
   * 0.4 versions and newer:

     ```
     mkdir -p /etc/opkg/keys
     opkg-key add key.pub
     ```
2. Run the following command to add the `check_signature` option to your `opkg.conf` file:

   ```
   echo 'option check_signature true' >> /etc/opkg/opkg.conf
   ```

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

  If resolving fails with this error:

  ```
  "opkg_verify_gpg_signature: No sufficiently trusted public keys found."
  "pkg_src_verify: Signature verification failed for <repoName>."
  ```

  The trust level of the `key.pub` may not be high enough. Upgrade the trust level.
</Callout>

# Deploy Opkg Packages

Run the following command:

```
curl -L -u <USERNAME>:<AUTH_TOKEN> -XPUT "https://[JFrogPlatformURL]/artifactory/<REPO_NAME>/<PATH_TO_FEED>/<IPK_PACKAGE_NAME>" -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 Opkg repository in Artifactory
* `<PATH_TO_FEED>`: The path to the feed in the repository
* `<IPK_PACKAGE_NAME>`: The name of the `.ipk` package file
* `<PATH_TO_FILE>`: The local path to the file you want to upload

For example:

```
curl -L -u jeffry:AKCp89XxY7wLPqL6vK3Dsfdh4fe887SguYnm90x -XPUT "https://company.jfrog.io/artifactory/opkg-local/feeds/armv7a/my-app.ipk" -T ~/builds/my-app.ipk
```

<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 Opkg Packages

Run the following command:

```
opkg install <PACKAGE>
```

Where:

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

For example:

```
opkg install my-app
```

# Additional Opkg Information

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

* <Anchor label="Deploy an Opkg Package Using the UI" title="Deploy an Opkg Package Using the UI" href="#deploy-an-opkg-package-using-the-ui">Deploy an Opkg Package Using the UI</Anchor>
* <Anchor label="REST API Support for Opkg" title="REST API Support for Opkg" href="#rest-api-support-for-opkg">REST API Support for Opkg</Anchor>

## Deploy an Opkg Package Using the UI

To deploy an Opkg package to Artifactory, go to the **Artifactory Repository Browser** and click the![](https://files.readme.io/35599ae54436a84e1ec8757cfd6075926690b974207e77b2962b03d0d45ae070-uuid-adc729a3-ee94-6cac-0042-9d29d30db69a.jpg) icon.

Select your Opkg repository as the **Target** Repository, and upload the file you want to deploy.

<Image alt="Deploy Opkg package.jpg" border={false} src="https://files.readme.io/38be42b71416c604a2b097d7b821ba49877c8a3ab6ca968695442f53bd982a8b-uuid-19e07e94-7aae-17e4-e54e-4993877a0094.jpg" />

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

  After you deploy the artifact, you need to wait about one minute for Artifactory to recalculate the repository index and display your upload in the Repository Browser.
</Callout>

## REST API Support for Opkg

The Artifactory REST API provides extensive support for signing keys and recalculating the repository index as follows:

* [Set the public key](/administration/reference/setgpgpublickey)
* [Get the public key](/administration/reference/getgpgpublickey)
* [Set the private key](/administration/reference/setgpgprivatekey)
* [Set the pass phrase](/administration/reference/setgpgpassphrase)
* [Recalculate the index](/reference/calculatedebianrepositorymetadata)

# Opkg Limitations in Artifactory

The following are the limitations of Opkg in Artifactory:

* **Package index signing**: Artifactory signs the repository metadata file, or the index, not individual Opkg packages themselves.