{"id":15481710,"url":"https://github.com/nickrobison/go-cddns","last_synced_at":"2025-04-22T15:25:23.744Z","repository":{"id":57573545,"uuid":"71217187","full_name":"nickrobison/go-cddns","owner":"nickrobison","description":"Golang client for dynamically updating cloudflare DNS records","archived":false,"fork":false,"pushed_at":"2019-03-18T00:47:00.000Z","size":26,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T05:17:34.626Z","etag":null,"topics":["cloudflare","debian","dns","docker","golang-client","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickrobison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-18T06:44:49.000Z","updated_at":"2024-02-20T16:41:55.000Z","dependencies_parsed_at":"2022-09-26T19:01:24.953Z","dependency_job_id":null,"html_url":"https://github.com/nickrobison/go-cddns","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrobison%2Fgo-cddns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrobison%2Fgo-cddns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrobison%2Fgo-cddns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickrobison%2Fgo-cddns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickrobison","download_url":"https://codeload.github.com/nickrobison/go-cddns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250265962,"owners_count":21402201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","debian","dns","docker","golang-client","ubuntu"],"created_at":"2024-10-02T05:05:47.140Z","updated_at":"2025-04-22T15:25:23.723Z","avatar_url":"https://github.com/nickrobison.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://travis-ci.org/nickrobison/go-cddns.svg?branch=master)](https://travis-ci.org/nickrobison/go-cddns)\n[ ![Download](https://api.bintray.com/packages/nickrobison/debian/go-cddns/images/download.svg) ](https://bintray.com/nickrobison/debian/go-cddns/_latestVersion)\n\n# go-cddns\n\nGolang client for dynamically updating cloudflare DNS records on a specified interval. Useful if you're using Cloudflare to point to a device with a dynamic IP Address\n\n## Installation\n\n### Go package\n\n```bash\ngo get -u github.com/nickrobison/go-cddns\n```\n\n### Debian repository\n\nWe also now have a debian (and Ubuntu) repository with builds for both amd64 and arm architectures.\nSince we require systemd, the builds only support debian jessie and newer, and ubuntu xenial (16.04) and later.\n\nThe repository is hosted on bintray, so there are some special setup instructions.\n\n```bash\nsudo apt-get install apt-transport-https # Bintray only supports https connections\necho \"deb https://dl.bintray.com/nickrobison/debian {xenial|jessie|stretch} main\" | sudo tee -a /etc/apt/sources.list\napt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 # We need to import the Bintray public key\nsudo apt-get update \u0026\u0026 apt-get install go-cddns\n```\n\nThe package installation will create a config file in ```/etc/go-cddns/config.json```, which is where you should set your configuration options.\n\n## Usage\n\nCreate a config.json with the following structure:\n\n```json\n{\n  \"UpdateInterval\": \"{interval (in minutes) to check for an updated IP Address}\",\n  \"Key\": \"{Cloudflare API Key}\",\n  \"Email\": \"{Cloudflare Email Address}\",\n  \"DomainName\": \"{Cloudflare domain to modify}\",\n  \"RecordName\": \"{Array of DNS records to update}\",\n  \"Remove\": \"{Boolean of whether or not to remove the records on shutdown}\"\n  }\n  ```\n\nRun the application, optionally specifying the path to the config file.\n\n```bash\ngo-cddns -config=/path/to/file\n```\n\n## Docker Image\n\ngo-cddns is also provided as a Docker image.\nThe application automatically starts when the container boots, but it lacks a functioning config file.\nYou'll need to add the path to the desired config as a volume.\n\n```bash\ndocker run -v /{path/to/config}/config.json:/etc/config.json nickrobison/go-cddns\n```\n\nThe container can be controlled by systemd via a custom unit file, such as this:\n\n```ini\n[Unit]\nDescription=Go-cddns container\nRequires=docker.service\nAfter=docker.service\n\n[Service]\nTimeoutStartSec=0\nRestart=always\nExecStartPre=-/usr/bin/docker kill nickrobison/go-cddns\nExecStartPre=-/usr/bin/docker rm nickrobison/go-cddns\nExecStartPre=/usr/bin/docker pull nickrobison/go-cddns\nExecStart=/usr/bin/docker run --rm -v /etc/go-cddns/config.json:/etc/config.json nickrobison/go-cddns\nExecStop=/usr/bin/docker stop nickrobison/go-cddns\n\n[Install]\nWantedBy=local.target\n```\n\nSave this file as `go-cddns.service` within the `systemd/system` directory.\nYou can start immediately and at boot, by running: `systemctl enable --now go-cddns`.\n\n## Notes\n\n* The update interval must be more than 5 minutes, per the WhatIsMyIP API [rules](http://whatismyipaddress.com/api).\n* The records names must be FQDNs, even though they don't appear in the cloudflare dashboard as such.\n* If the Remove field is set to true, the listed DNS records will be removed when the program exits.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickrobison%2Fgo-cddns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickrobison%2Fgo-cddns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickrobison%2Fgo-cddns/lists"}