There is a new core integration of Home Assistant which does mostly the same. I recommend using the integration since it is more efficient than an addon. The only feature missing there is to update multiple domains or even zones since you can only have one instance of the integration.
This add-on provides a script that updates all A records of a Cloudflare zone with your latest public ip address.
Note: .ml, .tk, .cf, .ga and .gq domains aren't supported by Cloudflare's API.
There is also an integration to automate this in Home Assistant now.
Go to the add-on store of the supervisor and click on repositories under the three dots. Copy https://github.com/kjell5317/addon-ddns into the field and add this repository. Now you can install this add-on like any other home-assistant add-on.
- Create an
API token
at Cloudflare and give it Zone.DNS permissions. - Copy your
zone id
from your Cloudflare dashboard. - Enter these details in the configuration page of this add-on and start it. Watch the log for errors.
Your configuration should look similar to this:
zones:
- api_key: <YOUR_API_KEY>
zone_id: <YOUR_ZONE_ID>
update: 300