A simple command line tool to update Cloudflare DNS record with external IP address to use it as dynamic DNS.
cfddns
-- A simple command line tool to update Cloudflare DNS record.
cfddns --api-token <API_TOKEN> --zone-id <ZONE_ID> COMMAND [OPTIONS]
-
--api-token
orAPI_TOKEN
environment variable is a token that is created at https://dash.cloudflare.com/profile/api-tokens. -
--zone-id
orZONE_ID
enrivonment variable is found on "Overview" page on each domain name on Cloudflare dashboard.
update
-- Update a Cloudflare DNS record with an external IP address.
-
--record-id
to specify the record id to update. Uselist
command to find this. -
--record-type
is DNS record type. Default to useA
. -
--name
is DNS record name. -
--provider
is the provider to fetch the external IP address. Possible values is eitherupnp
to use UPnP,aws
to usehttps://checkip.amazonaws.com/
,dyndns
to usehttp://checkip.dyndns.org/
. Default to useupnp
.
list
-- List all Cloudflare DNS records.
This command takes no options.
print-launchd-plist
-- Print launchd(8)
plist file to update DNS record. Useful to install cfddns
as a repeated task on macOS.
This command takes same options as update
command.
cfddns
is a simple command line tool to update Cloudflare DNS record
with external IP address to use it as dynamic DNS.
External IP address is fetched by UPnP locally or 3rd party API.
Use Cargo to build it.
cargo build --release # Build binary.
target/release/cfddns help # Print usage.
This source code is mostly generated by the large language model with a little advice by a human.