[solved] Caddy dynamic DNS and IONOS

Started by Baender, May 24, 2025, 11:46:42 PM

Previous topic - Next topic
May 24, 2025, 11:46:42 PM Last Edit: May 27, 2025, 12:20:33 PM by Baender
Hi folks, since Caddy 2.0 my Caddyfile no longer works. Validate Caddyfile gives "module not registered: dns.providers.ionos".
Is it possible to downgrade the plugin to 1.8.5? I am not able to use dynamic DNS at the moment.

It is not possible to downgrade. All DNS providers but Cloudflare were removed from Caddy as announced here:

https://forum.opnsense.org/index.php?topic=47216.0

You must switch to the ACME DNS plugin.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

For dynamic dns use os-ddclient.
Hardware:
DEC740

When I used Caddy to implement Dynamic DNS and ACME. Do I then need two plugins? I think I got Dynamic DNS working, but I haven't found a way to get ACME working with IONOS.

You can either use os-acme-client or you build your own caddy binary including caddy-dns/ionos and use a custom global import with the new dns provider global directive:

you can build your own binary and use the *.global import (custom configuration files) to specify a global dns provider. The global dns provider is new in caddy 2.10.0.

https://docs.opnsense.org/manual/how-tos/caddy.html#custom-configuration-files

https://caddyserver.com/docs/caddyfile/options#dns

The main issue is though that I /must/ ship a default binary, so whenever that changes version the plugin will fail for everybody who does not rebuild themselves and replace it again.
Hardware:
DEC740

OK, I've installed the acme plugin, too. I set the account and the challenge. What things do I need to change in Caddy, to reflect the recent changes in Caddy? Do I switch from Auto HTTPS?

Go through all the necessary steps in the ACME client until you have a valud certificate.

Then instead of Auto HTTPS pick that one in Caddy.

Add an automation in ACME to reload Caddy when the cert is renewed.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Can I set a wildcard certificate in the acme plugin? In caddy I added the domain like *.example.com before.

Yep. If you use the DNS-01 challenge.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

May 25, 2025, 05:53:07 PM #9 Last Edit: May 25, 2025, 11:07:10 PM by Baender
-deleted-

At the end of the day, it was a very stressful update. But with the two plugins in question, it was possible to set up DynDNS and ACME without any problems. The only thing that made it a bit more time-consuming was the fact that DynDNS is a bit cumbersome to set up under IONOS (API) because you have to generate a URL in IONOS and a domain cannot be selected on-the-fly in the plugin.