A Caddy v2 DNS provider plugin that enables ACME DNS-01 challenge validation through the GoDaddy DNS API to obtain TLS certificates from Let's Encrypt or other ACME CAs.
- DNS-01 ACME challenge validation support
- Wildcard domain certificate support
- Automatic DNS TXT record creation and deletion
- Configurable API timeout
- Environment variable configuration support
Caddy now supports dynamic plugin installation. Simply run:
caddy add-package github.com/xcaddyplugins/caddy-dns-godaddyThis command will automatically download, compile, and replace the current Caddy binary with a version that includes the GoDaddy DNS plugin.
If you prefer to build manually or need custom build options:
First, install xcaddy:
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latestThen build Caddy with the GoDaddy DNS plugin:
xcaddy build --with github.com/xcaddyplugins/caddy-dns-godaddyCreate a Dockerfile:
FROM caddy:builder AS builder
RUN xcaddy build \
--with github.com/xcaddyplugins/caddy-dns-godaddy
FROM caddy:latest
COPY --from=builder /usr/bin/caddy /usr/bin/caddy- Log in to the GoDaddy Developer Portal: https://developer.godaddy.com/
- Create a new API key
- Record the API Key and API Secret
{
email your-email@example.com
}
example.com {
tls {
dns godaddy {
api_key {env.GODADDY_API_KEY}
api_secret {env.GODADDY_API_SECRET}
http_timeout 30s # Optional, defaults to 30 seconds
}
}
respond "Hello World!"
}export GODADDY_API_KEY="your_api_key_here"
export GODADDY_API_SECRET="your_api_secret_here"If you're using JSON format for Caddy configuration:
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [":443"],
"routes": [
{
"match": [{"host": ["example.com"]}],
"handle": [
{
"handler": "static_response",
"body": "Hello World!"
}
],
"terminal": true
}
]
}
}
},
"tls": {
"automation": {
"policies": [
{
"subjects": ["example.com"],
"issuers": [
{
"module": "acme",
"challenges": {
"dns": {
"provider": {
"name": "godaddy",
"api_key": "{env.GODADDY_API_KEY}",
"api_secret": "{env.GODADDY_API_SECRET}"
}
}
}
}
]
}
]
}
}
}
}| Option | Required | Default | Description |
|---|---|---|---|
api_key |
Yes | None | GoDaddy API Key |
api_secret |
Yes | None | GoDaddy API Secret |
http_timeout |
No | 30s | HTTP request timeout |
example.com {
tls {
dns godaddy {
api_key {env.GODADDY_API_KEY}
api_secret {env.GODADDY_API_SECRET}
}
}
respond "Single domain"
}*.example.com {
tls {
dns godaddy {
api_key {env.GODADDY_API_KEY}
api_secret {env.GODADDY_API_SECRET}
}
}
respond "Wildcard domain"
}example.com, www.example.com, api.example.com {
tls {
dns godaddy {
api_key {env.GODADDY_API_KEY}
api_secret {env.GODADDY_API_SECRET}
}
}
respond "Multiple domains"
}-
API Authentication Failed
- Verify that your API key and secret are correct
- Ensure the API key has necessary DNS management permissions
-
Domain Mismatch
- Confirm the domain is managed in your GoDaddy account
- Check domain spelling for accuracy
-
Network Timeout
- Increase the
http_timeoutvalue - Check network connectivity
- Increase the
Enable Caddy debug logging:
caddy run --config Caddyfile --adapter caddyfile --debugIf DNS challenges are failing:
- Wait for DNS propagation (can take up to 10 minutes)
- Verify TXT records are being created correctly
- Check GoDaddy DNS management interface
GoDaddy imposes rate limits on their API:
- Production: 60 requests per minute
- OTE (testing): 60 requests per minute
The plugin automatically handles rate limiting with appropriate delays.
- Store API credentials securely using environment variables
- Use production API keys only in production environments
- Regularly rotate API credentials
- Monitor API usage in GoDaddy developer dashboard
go test ./...Set up test environment variables:
export GODADDY_API_KEY="test_key"
export GODADDY_API_SECRET="test_secret"
export TEST_DOMAIN="yourdomain.com"
go test -tags=integration ./...- Go 1.21 or later
- Valid GoDaddy domain and API credentials
- Internet connectivity for ACME and DNS API access
- Caddy v2.7.0 and later
- libdns v0.2.1 and later
- Go modules support
The plugin is optimized for:
- Minimal API calls during certificate issuance
- Efficient DNS record cleanup
- Concurrent certificate requests handling
- Low memory footprint
Enable structured logging to monitor plugin activity:
{
"logging": {
"logs": {
"default": {
"level": "INFO",
"writer": {
"output": "stdout"
}
}
}
}
}Contributions are welcome! Please ensure:
- Code follows Go coding standards
- Include appropriate tests
- Update documentation as needed
- Follow semantic versioning for releases
- Fork the repository
- Clone your fork
- Install dependencies:
go mod download - Make changes
- Run tests:
go test ./... - Submit a pull request
This project is licensed under the MIT License. See the LICENSE file for details.
For support:
- Check this README documentation
- Search existing GitHub Issues
- Create a new Issue with detailed information
- Join the Caddy Community Forum for general Caddy questions
- Initial release
- Basic GoDaddy DNS provider functionality
- ACME DNS-01 challenge support
- Wildcard certificate support
- Caddy - The web server this plugin extends
- libdns - DNS provider interface
- GoDaddy API Documentation
- Caddy development team for the excellent plugin architecture
- libdns project for standardized DNS provider interfaces
- GoDaddy for providing a comprehensive DNS API