ssh ubnt@<your-ip>
configure
set service dns dynamic interface eth0 web https://ipinfo.io/json
set service dns dynamic interface eth0 web-skip "ip: "
First of all, create the subdomain in the Cloudflare zone.
set service dns dynamic interface eth0 service custom-cloudflare host-name <hostname.yourdomain.org>
set service dns dynamic interface eth0 service custom-cloudflare login <user@domain.com>
set service dns dynamic interface eth0 service custom-cloudflare password <CloudFlare API key>
set service dns dynamic interface eth0 service custom-cloudflare protocol cloudflare
set service dns dynamic interface eth0 service custom-cloudflare options zone=<yourdomain.com>
commit
save
https://help.ubnt.com/hc/en-us/articles/204976324-EdgeRouter-Custom-Dynamic-DNS
Thank you @kule! I was struggling getting dynamic DNS to work on my ER-X running EdgeOS v1.10.11 and your comment helped me figure it out. Had to switch to the Global API key and also use "api.cloudflare.com/client/v4" for the server instead of "www.cloudflare.com" like I had seen on other write-ups.