{"repo":"cycneuramus/cloudflare-dns-failover","free":true,"listed":false,"github":"https://github.com/cycneuramus/cloudflare-dns-failover","clone":"git clone https://github.com/cycneuramus/cloudflare-dns-failover.git","description":"Automate DNS failover via Cloudflare's API","language":"Go","stars":20,"topics":["cloudflare","ddns","dns-failover","dynamic-dns","healthchecks","selfhosted","go","golang"],"license":"GPL-3.0","category":"self-hosted-apps","readme_excerpt":"Cloudflare DNS Failover A small Go program that provides a simple yet effective solution for automatic DNS failover using Cloudflare's API. The program monitors a list of server IPs in order of priority and updates the A record for a specified domain to the IP address of the first responsive server. This ensures high availability and reliability of services by automatically switching to a backup server in case the primary server goes down. This DNS failover mechanism is not to be confused with round-robin DNS, where multiple A records are set for the same domain to distribute traffic randomly across different servers. While potentially useful, this cannot be depended upon for site reliability, since if one of the servers goes down, the DNS server will still keep that server’s IP in the round-robin rotation. Prerequisites Before you begin, ensure you have met the following requirements: - A Cloudflare account with access to API tokens. Installation 1. Clone the repository: 2. Configure your records Open the config.yml.example with your preferred text editor and edit the placeholder values. Save the file as config.yml . 3. Build the program Usage To start the DNS failover mechanism, simply run the program: This assumes that config.yml exists in the working directory. You can, however, pass its path as a flag: The program executes in an infinite loop, checking the availability of the servers at the specified interval and updating the DNS record as needed. To maintain continuous ","default_branch":null,"files":null,"tree":[],"storefront":"/r/cycneuramus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cycneuramus/cloudflare-dns-failover/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}