> 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/managing-the-caddy-container.md).

# Managing the Caddy Container

DNS Setup (AWS)

This section covers common Caddy operations for day-to-day management.

***

### Viewing Logs

**Use this to:** Check certificate status, diagnose issues, or verify Caddy is working.

**On the VM:**

```
docker logs -f caddy
```

The `-f` flag streams logs in real-time (press Ctrl+C to exit). Look for messages about certificate issuance, renewals, or errors.

***

### Restarting Caddy

**Use this to:** Apply configuration changes (e.g., after editing the Caddyfile) or restart after an issue.

**On the VM:**

```
docker restart caddy
```

**What happens:**

* Caddy stops and starts
* Configuration changes (like a domain update) take effect
* Caddy re-checks certificate status

**Expected result:** `docker ps | grep caddy` shows the container as Up within a few seconds.

***

### Stopping Caddy

**Use this to:** Temporarily disable HTTPS without removing the container (e.g., for maintenance).

**On the VM:**

```
docker stop caddy
```

**What happens:**

* Caddy stops, but the container remains
* The Hivel UI is accessible via HTTP on port 3000 only
* Certificates and configuration persist

**To restart:** `docker restart caddy`

***

### Removing Caddy Entirely

**Use this to:** Completely remove the Caddy reverse proxy.

**On the VM:**

```
docker rm -f caddy
```

**What happens:**

* The Caddy container is deleted
* HTTPS is no longer available
* The Hivel application remains reachable directly on port 3000 over HTTP

**To reinstall:** Follow Option A or Option B setup steps.

***

### Certificate Management

Certificates are stored in the `caddy_data` Docker volume and persist across:

* Container restarts
* Caddy upgrades
* VM reboots

This means renewals happen automatically without re-issuing from scratch. You don't need to manage certificates manually.

***

### Common Scenarios

**"I edited the Caddyfile and want to apply changes:"**

```
docker restart caddy
docker logs -f caddy
```

**"Something's wrong with certificates:"**

```
docker logs -f caddy
```

Look for error messages. If needed, see Troubleshooting.

**"I want to temporarily disable HTTPS for testing:"**

```
docker stop caddy
```

The UI is accessible on `http://<vm-public-ip>:3000`. Restart when done: `docker restart caddy`

**"I'm removing the deployment:"**

```
docker rm -f caddy
```

This removes Caddy but leaves certificates in `caddy_data` volume if you need them later.

<br>

{% columns %}
{% column %} <a href="/self-managed-hivel-deployment/virtual-private-cloud/aws/dns-setup-aws/setup-and-prerequisites/upgrading-from-option-b-to-option-a.md" class="button primary" data-icon="backward">Back to Upgrading B → A</a>
{% endcolumn %}

{% column %}

{% endcolumn %}

{% column %} <a href="/self-managed-hivel-deployment/virtual-private-cloud/aws/dns-setup-aws/troubleshooting.md" class="button primary" data-icon="forward">Troubleshooting</a>
{% endcolumn %}
{% endcolumns %}
