Skip to content
caddy-dnsPublic

About

No description or website provided.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

caddy-dns/muumuu

English | 日本語

A Caddy DNS provider module for Muumuu-Domain (API v2). It is a thin wrapper around libdns/muumuu, so that Caddy can solve ACME DNS-01 challenges for domains hosted at Muumuu-Domain.

Module ID: dns.providers.muumuu

Build

With xcaddy:

xcaddy build --with github.com/caddy-dns/muumuu
./caddy list-modules | grep dns.providers.muumuu

With Docker (no local Go required), using the builder image of the official Caddy image:

FROM caddy:2.11.9-builder AS builder
RUN xcaddy build v2.11.9 --with github.com/caddy-dns/muumuu

FROM caddy:2.11.9
COPY --from=builder /usr/bin/caddy /usr/bin/caddy

Configuration

Create a personal access token (PAT) in Muumuu-Domain with these permissions: domains:read, dns:read, dns:write. If you set an expiry date on the token, replace it before it expires.

Caddyfile

example.com {
  tls {
    dns muumuu {env.MUUMUU_PAT}
  }
}

The block form is also accepted:

example.com {
  tls {
    dns muumuu {
      api_token {env.MUUMUU_PAT}
    }
  }
}

Specifying the token both as an argument and in the block is an error, as are unknown subdirectives and more than one argument.

JSON

The provider module on its own:

{ "name": "muumuu", "api_token": "{env.MUUMUU_PAT}" }

In a complete Caddy JSON configuration, it goes into the provider of an ACME issuer's DNS challenge:

{
  "apps": {
    "tls": {
      "automation": {
        "policies": [
          {
            "subjects": ["example.com"],
            "issuers": [
              {
                "module": "acme",
                "challenges": {
                  "dns": {
                    "provider": { "name": "muumuu", "api_token": "{env.MUUMUU_PAT}" }
                  }
                }
              }
            ]
          }
        ]
      }
    }
  }
}

Placeholders are expanded when the module is provisioned. Provisioning fails if the expanded token is empty or still looks like an unexpanded placeholder. No external API is called during provisioning, so caddy validate does not touch the network.

Delegating challenges with a CNAME

If the zone for example.com is hosted elsewhere, point _acme-challenge.example.com at a zone hosted at Muumuu-Domain (for example example.net) with a CNAME record, and set dns_challenge_override_domain:

example.com {
  tls {
    dns muumuu {env.MUUMUU_PAT}
    dns_challenge_override_domain _acme-challenge.example.net
  }
}

The equivalent JSON is the override_domain field of the DNS challenge, next to provider:

"dns": {
  "provider": { "name": "muumuu", "api_token": "{env.MUUMUU_PAT}" },
  "override_domain": "_acme-challenge.example.net"
}

Notes

  • The TTL of Muumuu-Domain DNS records is fixed at 3600 seconds. TTL values in requests are ignored.

License

MIT

About

No description or website provided.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

Generated from caddy-dns/template