DynDNS-Cloudflare is a dynamic DNS update tool designed to work with Cloudflare's API. This tool helps in automatically updating DNS records based on the current IP address of your system. It's particularly useful for systems with dynamic IP addresses that need to maintain a consistent domain name.
Ensure you have Go installed on your system. You can then clone this repository and build the project using:
git clone https://github.com/walidoow/dyndns-cloudflare
cd dyndns-cloudflare
go build ./cmd/dyndns/Before running the application, configure the config.yml with your Cloudflare API token and zone identifier. The
application can be run using the following command (add .exe for Windows):
./dyndnsModify the config.yml file inside the root directory to include your Cloudflare token and zone identifier. The format
is as follows:
token: your_cloudflare_api_token # Your Cloudflare API token for authentication.
zone-identifier: your_zone_identifier # The Zone ID of your domain on Cloudflare.
cloudflare-dns-record:
# The required fields are the identifier, content, name, and type.
identifier: your_dns_record_identifier # The Identifier for the specific DNS record you want to dnsclient.
name: your_domain # The domain name for the DNS record.
type: A # The type of DNS record (e.g., A, AAAA, CNAME, etc.).
proxied: false # Whether the record is receiving the performance and security benefits of Cloudflare.
comment: your_comment # Comments or notes about the DNS record. This field has no effect on DNS responses.
tags: [ tag1, tag2 ] # Custom tags for the DNS record. This field has no effect on DNS responses.
ttl: 1 # Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.This project uses act to run GitHub Actions locally. To run the workflows locally, use the following command:
act -e event.jsonYou can also specify a specific workflow to run using the -j flag:
act -j <workflow_name> -e event.jsonor simulate an event like a pull_request or a push:
act -e event.json pull_requestThe event.json file is used to simulate the event payload sent by GitHub to the runner and skip some steps that we
only want to be executed in production environment.
Contributions to the project are welcome. Please follow standard Git workflows for contributions.
This project is licensed under MIT license. Please refer to the LICENSE file for more details.