---
title: Charmhub | Deploy LEGO using Charmhub - The Open Operator Collection
description: Deploy the latest version of LEGO on any cloud.
url: https://charmhub.io/lego/docs/h-reference-dns-agent
---

# LEGO

[Canonical Telco](https://charmhub.io/publisher/telco-charmers "View all packages from Canonical Telco")

* [Canonical Telco](https://charmhub.io/publisher/telco-charmers "View all packages from Canonical Telco")

Platform:

24.04

22.04

4/stable 510

```
juju deploy lego --channel 4/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://charmhub.io/lego)

---

#### Contacts

* [Submit a bug](https://github.com/canonical/lego-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

# The LEGO DNS Agent

When using the ***httpreq*** plugin, the Lego client requires an HTTP Endpoint of a custom challenge solver. This Challenge Solver or DNS Agent should be able to solve the DNS-01 challenge by automating the creation and removal specific DNS records.

The DNS Agent will create a TXT DNS record that contains the ***value*** provided by the ACME Server on the ***fqdn*** required by the ACME Server. The agent should be able to do this upon request from the Lego Client on its API.

The agent should expose two endpoints, ***present*** and ***cleanup***

To learn more on how to write a custom challenge solver for your DNS provider refer to [LEGO documentation on writing a challenge solver](https://go-acme.github.io/lego/usage/library/writing-a-challenge-solver/).

---
