It is my first HA add-on. Thank Kjell Hanken and
SJ Chou,
Referencing their sample allowed me to complete this add-on.
run.sh: Refer to SJ Chou's cf-ip-renew.sh and
Kjell Hanken's run.sh.
Other details: Refer to Kjell Hanken's project to make a HA add-on.
This add-on is used to automatically update Cloudflare's dns records with your latest public ip address.
Go to the add-on store of the supervisor and click on repositories under the three dots. Copy https://github.com/Maboroshi0327/cloudflare-ddns-updater 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. - Please refer to this tutorial to obtain the
Zone ID
andRecord ID
. - Enter these details into the add-on's settings page and start it.
Your configuration should look similar to this:
DNS: <YOUR_Domain_Name>
CF_TOKEN: <YOUR_API_TOKEN>
CF_ZONE_ID: <YOUR_ZONE_ID>
CF_RECORD_ID: <YOUR_RECORD_ID>
proxied: false
time: 300