zcm / caddy-dns-namecheap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

namecheap module for Caddy

This package contains a DNS provider module for Caddy. It can be used to manage DNS records with namecheap accounts. In order to use this module, you must build caddy with xcaddy.

xcaddy build --with github.com/caddy-dns/namecheap

Visit here to get started with the namecheap API. It is recommended to first use the sandbox environment to test your configuration.

Caddy module name

dns.providers.namecheap

Config examples

To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:

{
  "module": "acme",
  "challenges": {
    "dns": {
      "provider": {
        "name": "namecheap",
        "api_key": "{env.NAMECHEAP_API_KEY}",
        "user": "{env.NAMECHEAP_API_USER}"
      }
    }
  }
}

or with the Caddyfile:

tls {
	dns namecheap {
        api_key {env.NAMECHEAP_API_KEY}
        user {env.NAMECHEAP_API_USER}
    }
}

You can replace {env.NAMECHEAP_API_KEY} with the actual auth token if you prefer to put it directly in your config instead of an environment variable.

A complete example

*.example.com {
    file_server
    tls {
        dns namecheap {
            api_key {env.NAMECHEAP_API_KEY}
            user namecheap_api_username
            client_ip public_egress_ip
            endpoint https://api.sandbox.namecheap.com/xml.response
        }
    }
}

About


Languages

Language:Go 100.0%