> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Registry

> Host your own Helm charts on GHCR and add the registry to Ankra so your charts appear as add-ons.

<Tip>
  Adding your own registry to Ankra enables you and your team to distribute Helm charts as add-on components that can be deployed onto a cluster as part of a stack.
</Tip>

## Create your own registry with GitHub

<Note>
  **Use any OCI Helm registry** ([GHCR](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry), [Harbor](https://goharbor.io/docs/), [JFrog Artifactory](https://www.jfrog.com/confluence/display/JFROG/Helm+Chart+Repositories), [AWS ECR](https://docs.aws.amazon.com/AmazonECR/latest/userguide/push-oci-artifact.html), [Google Artifact Registry](https://cloud.google.com/artifact-registry/docs/helm), etc.) with Ankra. This guide focuses on GitHub Container Registry (GHCR) as a free and accessible example.
</Note>

GitHub Container Registry (GHCR) provides a free and reliable way to host your own Helm charts.

### Prerequisites

Before you begin, ensure you have:

* A GitHub account
* Git installed on your machine
* Helm CLI installed ([Installation guide](https://helm.sh/docs/intro/install/))
* A GitHub Personal Access Token with `write:packages` permission

<Note>
  To create a Personal Access Token: Go to GitHub Settings > Developer settings > Personal access tokens > Generate new token, and select the `write:packages` scope.
</Note>

### Step 1: Set Up Your Repository

Create a new GitHub repository to host your Helm charts:

1. Go to GitHub and create a new repository (e.g., `my-helm-charts`)
2. Clone the repository locally:

```bash theme={null}
git clone https://github.com/YOUR_USERNAME/my-helm-charts.git
cd my-helm-charts
```

### Step 2: Create Your Helm Chart

Generate a new Helm chart or prepare an existing one:

```bash theme={null}
# Create a new chart
helm create my-sparkly-app

# Or copy an existing chart to your repository
# cp -r /path/to/existing/chart ./my-sparkly-app
```

This creates a basic chart structure:

```
my-sparkly-app/
├── Chart.yaml
├── values.yaml
├── templates/
│   ├── deployment.yaml
│   ├── service.yaml
│   └── ...
└── charts/
```

### Step 3: Configure Your Chart

Edit the `Chart.yaml` file to include proper metadata:

```yaml theme={null}
apiVersion: v2
name: my-sparkly-app
description: A Helm chart for my sparkly application
type: application
version: 1.0.0
appVersion: "1.0.0"
home: https://github.com/YOUR_USERNAME/my-helm-charts
sources:
  - https://github.com/YOUR_USERNAME/my-helm-charts
maintainers:
  - name: Your Name
    email: your.email@example.com
```

### Step 4: Package Your Chart

Package your Helm chart into a `.tgz` file:

```bash theme={null}
helm package my-sparkly-app
```

This creates a file like `my-sparkly-app-1.0.0.tgz`.

### Step 5: Login to GHCR

Authenticate with GitHub Container Registry using your Personal Access Token:

```bash theme={null}
echo $GITHUB_TOKEN | helm registry login ghcr.io -u YOUR_USERNAME --password-stdin
```

Replace `$GITHUB_TOKEN` with your actual token and `YOUR_USERNAME` with your GitHub username.

### Step 6: Push Your Chart

Push your packaged chart to GHCR:

```bash theme={null}
helm push my-sparkly-app-1.0.0.tgz oci://ghcr.io/YOUR_USERNAME/helm-charts
```

### Step 7: Verify your registry

After pushing, your chart will be available at:

```
oci://ghcr.io/YOUR_USERNAME/helm-charts/my-sparkly-app
```

You can verify the upload by checking your GitHub repository's "Packages" tab.

### Step 8: Add your registry to Ankra

Now that your chart is published, add your GHCR registry to Ankra:

<Steps>
  <Step title="Create a registry credential">
    Go to **Credentials** → **Add** → **Registry** and enter your GitHub username and the Personal Access Token (with `read:packages` scope). See [Credentials](/integrations/credentials#provider-specific-setup) for details.
  </Step>

  <Step title="Add the registry">
    Go to the **Charts** page in the main navigation, click **Manage Registries** → **Add**, and enter:

    * **URL**: `oci://ghcr.io/YOUR_USERNAME/helm-charts`
    * **Credential**: the registry credential you just created
  </Step>

  <Step title="Sync and verify">
    Ankra syncs the registry and indexes your charts. Your chart (e.g. `my-sparkly-app`) now appears in the add-on catalog, ready to drop into any stack.
  </Step>
</Steps>

## Use Your Chart in a Stack

Open the Stack Builder on any cluster, click **+ Add** → **Add-on**, and search for your chart. Configure its values, connect any dependencies, and deploy.

## Next Steps

<CardGroup cols={2}>
  <Card title="Helm Registries" icon="box" href="/integrations/helm-registries">
    Connect other registry types — Harbor, Artifactory, ECR, and more.
  </Card>

  <Card title="Stacks" icon="layer-group" href="/concepts/stacks">
    Compose your charts with manifests and dependencies into reusable stacks.
  </Card>
</CardGroup>
