Caddy-dns-joker New DNS provider module: dns.providers.joker (Joker.com) for ACME DNS-01

This is to announce the initial release: GitHub - samliddicott/caddy-dns-joker: Caddy Joker DNS plugin for Let's Encrypt DNS-01 developed for Caddy v2.10.2, and provides DNS-01 support for the joker.com registrar.

It’s for anyone who uses Joker as their registrar and wants multiple (or a wildcard) LetsEncrypt certificate, and so needs to use TXT record validation rather than https validation.

It’s easy to build - simply add --with github.com/samliddicott/caddy-dns-joker to your favourite xcaddy invocation, e.g.:

xcaddy build \
  --with github.com/samliddicott/caddy-dns-joker

It can be configured with a username and password (for regular users) or an API token for resellers (I don’t have a reseller account, so I haven’t tested that).

It also supports a configurable endpoint which defaults to https://svc.joker.com/nic/replace

A sample Caddyfile is:

{
    email you@example.com
}

example.com {
    tls {
        dns joker {
#            api_token "{env.JOKER_API_TOKEN}"
            username "{env.JOKER_USERNAME}"
            password "{env.JOKER_PASSWORD}"
        }
    }

    respond "Hello from Caddy + Joker DNS!"
}

Updates are batched by label, which might perhaps be a waste of time; I don’t actually know if it is possible that Caddy might try and auth two different certificates to the same label at the same time.

Please raise any issues on the GitHub page: GitHub - samliddicott/caddy-dns-joker: Caddy Joker DNS plugin for Let's Encrypt DNS-01

I was so delighted with Caddy in November but disappointed that there was no DNS-01 Joker support, so I’ve added it as a Christmas holiday project.

I’ve not done any serious Go programming from scratch before, and I didn’t have much background with Caddy or its recent redesign, so I made extensive use of ChatGPT (which led me on a very long and winding route), but I think I ended up with something decent, though possibly over-engineered.

While ChatGPT provided a good summary of the state-of-the-art for Caddy plugin development and gave me reasoned direction and proof of concept examples, I take responsibility for all errors.

It’s works-for-me™, and in gratitude and recognition of those who have given us Caddy, I’ve tried to put caddy-dns-joker into good shape and share it with everyone - it would be churlish not to, and I hope I’m no churl.

I’m happy for it to be added to the caddy-dns organization if someone with the power wishes to arrange that.

What’s the future? Bug fixes as reported, better Joker reseller support if needed.

There doesn’t seem to be much special to Joker in there, maybe a new joker-is-wild plugin with a configurable endpoint and http request to be generic to any http dns interface? Is there already one that I missed and could have used?

2 Likes

Thanks for contributing. If you can please separate out the Caddy logic and the DNS provider logic, we can create repos at libdns/joker and caddy-dns/joker.

The libdns repo should have no dependency on Caddy at all. And caddy-dns repo should use the libdns one as a light wrapper, just to make it a Caddy module. (See the template repos for examples/guidance.)

When you have done that, please open an issue at GitHub · Where software is built so that we can make the repos for you to push to. Thank you!