OPNsense Forum

English Forums => General Discussion => Topic started by: Baender on May 24, 2025, 11:46:42 PM

Title: [solved] Caddy dynamic DNS and IONOS
Post by: Baender on May 24, 2025, 11:46:42 PM
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.
Title: Re: Caddy dynamic DNS and IONOS
Post by: Patrick M. Hausen on May 25, 2025, 05:58:32 AM
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.
Title: Re: Caddy dynamic DNS and IONOS
Post by: Monviech (Cedrik) on May 25, 2025, 09:46:13 AM
For dynamic dns use os-ddclient.
Title: Re: Caddy dynamic DNS and IONOS
Post by: Baender on May 25, 2025, 10:50:09 AM
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.
Title: Re: Caddy dynamic DNS and IONOS
Post by: Monviech (Cedrik) on May 25, 2025, 11:04:38 AM
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.
Title: Re: Caddy dynamic DNS and IONOS
Post by: Baender on May 25, 2025, 04:01:29 PM
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?
Title: Re: Caddy dynamic DNS and IONOS
Post by: Patrick M. Hausen on May 25, 2025, 04:05:09 PM
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.
Title: Re: Caddy dynamic DNS and IONOS
Post by: Baender on May 25, 2025, 04:43:18 PM
Can I set a wildcard certificate in the acme plugin? In caddy I added the domain like *.example.com before.
Title: Re: Caddy dynamic DNS and IONOS
Post by: Patrick M. Hausen on May 25, 2025, 04:46:09 PM
Yep. If you use the DNS-01 challenge.
Title: Re: Caddy dynamic DNS and IONOS
Post by: Baender on May 25, 2025, 05:53:07 PM
-deleted-
Title: Re: Caddy dynamic DNS and IONOS
Post by: Baender on May 25, 2025, 11:17:29 PM
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.