FYI, Caddy has a DDNS plugin https://github.com/mholt/caddy-dynamicdns. Works with any DNS provider that has a Caddy DNS plugin which you'd typically use to solve ACME challenges, but instead it will set A/AAAA records.
Also, for those that don't know, Caddy also automates SSL certs (unlike nginx) and can render markdown files using templates [0].
[0]: https://caddyserver.com/docs/caddyfile/directives/templates