> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/self-managed-hivel-deployment/virtual-private-cloud/azure/hivel-on-premises-deployment-guide-azure/ecr-access-configuration.md).

# ECR Access Configuration

On-Prem Deployment Guide (Azure)

Hivel's Docker images are stored in AWS ECR at:

```
730335373269.dkr.ecr.ap-south-1.amazonaws.com
```

Choose one option below based on your organization's requirements.

## Option A: Use Hivel's ECR (Recommended)

Use this option if you want to pull images directly from Hivel's ECR repository.

### **Step 1: Get credentials from Hivel**

* AWS Access Key ID
* AWS Secret Access Key

### **Step 2: Configure AWS CLI with Hivel's credentials**

Run on your VM: *(if not already done during AWS CLI configuration)*

```
aws configure
# Enter Hivel's Access Key ID
# Enter Hivel's Secret Access Key
# Region: ap-south-1
# Output: json
```

### **Step 3: Test ECR access**

Run on your VM to confirm your credentials work:

```
# Test ECR login
aws ecr get-login-password --region ap-south-1 | \
  docker login --username AWS --password-stdin \
  730335373269.dkr.ecr.ap-south-1.amazonaws.com
 
# Should show: Login Succeeded
```

**Expected result:** `Login Succeeded`

**If login fails**, see ECR pull failed in [Troubleshooting](/self-managed-hivel-deployment/virtual-private-cloud/azure/hivel-on-premises-deployment-guide-azure/troubleshooting.md).

**Note:** The deployment script (deploy.sh) will automatically handle ECR authentication using these credentials during normal deployments.

## Option B: Use Your Own AWS ECR (Custom Setup)

Use this option if your organization requires hosting Hivel's images in your own AWS account instead of pulling from Hivel's ECR directly. This requires initial setup and ongoing maintenance (re-pushing images on every Hivel update).

### **Step 1: Create ECR repositories in your AWS account**

* Create repositories in your AWS ECR for the Hivel services
* Push Hivel images to your repositories
* Note your ECR registry URL (e.g., `123456789.dkr.ecr.us-east-1.amazonaws.com`)

### **Step 2: Update docker-compose.yml**

File to edit: `services/vm/docker-compose.yml`

Replace all image URLs from:

```
image: 730335373269.dkr.ecr.ap-south-1.amazonaws.com/hivel/...
```

To your ECR URLs:

```
image: YOUR_ACCOUNT.dkr.ecr.YOUR_REGION.amazonaws.com/hivel/...
```

### **Step 3: Update deploy.sh**

File to edit: `deploy.sh`

Find this line:

```
ECR_REGISTRY="730335373269.dkr.ecr.ap-south-1.amazonaws.com"
```

Update to your ECR registry:

```
ECR_REGISTRY="YOUR_ACCOUNT.dkr.ecr.YOUR_REGION.amazonaws.com"
```

Update the region if different:

```
AWS_REGION="YOUR_REGION"  # e.g., "us-east-1"
```

### **Step 4: Configure AWS CLI with your credentials**

Run on your VM:

```
aws configure
# Use your own AWS credentials
```

### **Step 5: Test your ECR access**

Run on your VM:

```
aws ecr get-login-password --region YOUR_REGION | \
  docker login --username AWS --password-stdin \
  YOUR_ACCOUNT.dkr.ecr.YOUR_REGION.amazonaws.com
```

Expected result: `Login Succeeded`

## Summary: Files to Update for Custom ECR

If using your own ECR, update these files:

* `services/vm/docker-compose.yml` - Update all `image:` lines
* `deploy.sh` - Update `ECR_REGISTRY` and `AWS_REGION` variables

**Next Step:** Environment Configuration.

{% columns %}
{% column %} <a href="/self-managed-hivel-deployment/virtual-private-cloud/azure/hivel-on-premises-deployment-guide-azure/project-setup.md" class="button primary" data-icon="backward">Back to Project Setup</a>
{% endcolumn %}

{% column %}

{% endcolumn %}

{% column %} <a href="/self-managed-hivel-deployment/virtual-private-cloud/azure/hivel-on-premises-deployment-guide-azure/environment-configuration.md" class="button primary" data-icon="forward">Environment Configuration</a>
{% endcolumn %}
{% endcolumns %}
