> 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/aws/dns-setup-aws/setup-and-prerequisites/upgrading-from-option-b-to-option-a.md).

# Upgrading from Option B to Option A

### Step 1: Update Caddyfile

**On the VM:**

Replace `hivel.yourcompany.com` with your actual domain:

```
cat > ~/caddy/Caddyfile <<'EOF'
hivel.yourcompany.com {
    reverse_proxy localhost:3000
}
EOF
```

This removes the `tls internal` directive, telling Caddy to use Let's Encrypt instead of a self-signed certificate.

***

### Step 2: Restart Caddy

**On the VM:**

```
docker restart caddy
```

Caddy detects the configuration change and automatically requests a trusted Let's Encrypt certificate on restart.

***

### Step 3: Verify the Upgrade

**Check Caddy logs for successful certificate issuance:**

```
docker logs -f caddy
```

**Look for:** A line confirming `certificate obtained successfully`.

**In your browser, navigate to:**

```
https://hivel.yourcompany.com
```

**Expected result:** The page loads with a trusted certificate and no browser warning.

**If it fails:** See Certificate Not Issued in [Troubleshooting](/self-managed-hivel-deployment/virtual-private-cloud/aws/dns-setup-aws/troubleshooting.md).

<br>

{% columns %}
{% column %} <a href="/self-managed-hivel-deployment/virtual-private-cloud/aws/dns-setup-aws/setup-and-prerequisites/advanced-temporary-option-b-no-domain-yet-self-signed.md" class="button primary" data-icon="backward">Back to Option B: Self-Signed</a>
{% endcolumn %}

{% column %}

{% endcolumn %}

{% column %} <a href="/self-managed-hivel-deployment/virtual-private-cloud/aws/dns-setup-aws/managing-the-caddy-container.md" class="button primary" data-icon="forward">Managing the Caddy Container</a>
{% endcolumn %}
{% endcolumns %}
