Metadata-Version: 2.4
Name: certbot-dns-domudns
Version: 1.0.1
Summary: Certbot DNS-01 authenticator plugin for DomU DNS
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: certbot>=1.18.0
Requires-Dist: requests>=2.25.0
Dynamic: license-file

# certbot-dns-domudns

[Certbot](https://certbot.eff.org/) DNS-01 authenticator plugin for [DomU DNS](https://gitlab.int.dbx943.de/go-programing/domudns).

Automatically creates and removes `_acme-challenge` TXT records via the DomU DNS REST API to obtain Let's Encrypt certificates.

## Installation

```bash
pip install certbot-dns-domudns
```

Or from source:

```bash
git clone https://github.com/mw7101/certbot-dns-domudns.git
cd certbot-dns-domudns
pip install .
```

## Credentials

Create a **Named API Key** in the DomU DNS dashboard:
Settings → Sicherheit → API-Schlüssel → + Neuer API-Schlüssel

Then create `/etc/letsencrypt/domudns.ini`:

```ini
dns_domudns_url = http://192.168.100.151
dns_domudns_api_key = <named api key>
```

```bash
chmod 600 /etc/letsencrypt/domudns.ini
```

## Usage

```bash
# Staging (for testing)
certbot certonly \
  --authenticator dns-domudns \
  --dns-domudns-credentials /etc/letsencrypt/domudns.ini \
  --server https://acme-staging-v02.api.letsencrypt.org/directory \
  -d example.com -d '*.example.com'

# Production
certbot certonly \
  --authenticator dns-domudns \
  --dns-domudns-credentials /etc/letsencrypt/domudns.ini \
  -d example.com -d '*.example.com'
```

## Configuration

| Credential key | Description |
|----------------|-------------|
| `dns_domudns_url` | Base URL of your DomU DNS instance (no trailing slash) |
| `dns_domudns_api_key` | Named API key from the DomU DNS dashboard |

## Requirements

- Python >= 3.8
- certbot >= 1.18.0
- requests >= 2.25.0
- A running [DomU DNS](https://gitlab.int.dbx943.de/go-programing/domudns) instance

## How it works

1. Certbot calls `_perform()` with the validation token
2. Plugin strips `_acme-challenge.` prefix and trailing dot from the FQDN
3. `POST /api/acme/dns-01/present` stores the TXT record in DomU DNS
4. DomU DNS answers `_acme-challenge.<domain> TXT` queries with the token
5. After validation, `_cleanup()` calls `POST /api/acme/dns-01/cleanup`

## License

MIT
