{"id":17300868,"url":"https://github.com/chtjonas/ddnsd","last_synced_at":"2025-03-26T21:45:14.419Z","repository":{"id":40979646,"uuid":"378235078","full_name":"CHTJonas/ddnsd","owner":"CHTJonas","description":"Simple dynamic DNS daemon","archived":false,"fork":false,"pushed_at":"2023-11-06T07:38:47.000Z","size":121,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T03:42:17.828Z","etag":null,"topics":["dns","dynamic-dns","go","golang","zonefile"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CHTJonas.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-18T18:28:11.000Z","updated_at":"2022-06-15T22:35:09.000Z","dependencies_parsed_at":"2024-06-21T09:57:25.575Z","dependency_job_id":"bcd3b2c6-a515-4fb3-ac39-4163bb15c264","html_url":"https://github.com/CHTJonas/ddnsd","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":0.1515151515151515,"last_synced_commit":"ee2b50e098a50700aa4eb2536e63a787669dc38b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fddnsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fddnsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fddnsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fddnsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CHTJonas","download_url":"https://codeload.github.com/CHTJonas/ddnsd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245743341,"owners_count":20665090,"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":["dns","dynamic-dns","go","golang","zonefile"],"created_at":"2024-10-15T11:30:43.695Z","updated_at":"2025-03-26T21:45:14.386Z","avatar_url":"https://github.com/CHTJonas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic DNS Daemon\n\nThis repo hosts the code for a small dynamic DNS daemon (ddnsd) that I use to setup `_acme-challenge` records when issuing [Let's Encrypt](https://letsencrypt.org/) records for some of my personal infrastructure. It's written in Go and designed to be as small and as simple as possible. It is **not** a full DNS server, rather it parses DNS zonefiles and updates them. To serve your DNS zone you will need a full authoritative server; I use [knot](https://www.knot-dns.cz).\n\nHost machines poke ddnsd over HTTP by making a POST request to an API endpoint during a [dehydrated](https://github.com/dehydrated-io/dehydrated) hook step. HTTP Basic authentication is used with credentials stored in a `.htpasswd` file. The username dictates the record to update which makes sure that API credentials can't be shared.\n\n## Example\n\nImagine your `.htpasswd` file contains the line `test1.domain.tld.:$2y$05$DKfxz32xyO3giwz0eV1Qi.et.DL2AokHFxjYk1j78Vb7kPJCcmsyi` and that your zonefile has the following contents:\n\n```\ndomain.tld. 21600 IN SOA server.domain.tld. admin.domain.tld. 2021061800 900 300 4320000 1200\ndomain.tld. 21600 IN NS server.domain.tld.\ntest1.domain.tld. 60 IN TXT test1\ntest2.domain.tld. 60 IN TXT test2\ntest3.domain.tld. 60 IN TXT test3\n```\n\nAfter running the command `curl http://test1.domain.tld.:testing@server.domain.tld:8080/update -X POST -d 'contents=__Tm_C9ZjVv8RZGi2AXLDWBey1HmTHVsS8c_A7a4hqk'`, your zonefile will now look like this:\n\n```\ndomain.tld. 21600 IN SOA server.domain.tld. admin.domain.tld. 2021061800 900 300 4320000 1200\ndomain.tld. 21600 IN NS server.domain.tld.\ntest1.domain.tld. 60 IN TXT __Tm_C9ZjVv8RZGi2AXLDWBey1HmTHVsS8c_A7a4hqk\ntest2.domain.tld. 60 IN TXT test2\ntest3.domain.tld. 60 IN TXT test3\n```\n\nObviously you should substitute `server.domain.tld:8080` for the actual hostname and port that you are using. Make sure that you put ddnsd behind a reverse proxy which handles TLS!\n\n## Usage\n\n```\nUsage:\n  ddnsd [flags]\n\nFlags:\n  -b, --bind string     address and port to bind to (default \"localhost:8080\")\n  -h, --help            help for ddnsd\n  -H, --hook string     full path to command/script to run after updating zonefile\n  -p, --passwd string   path to .htpasswd file (default \".htpasswd\")\n  -z, --zone string     path to DNS zonefile (default \"ddns.zone\")\n```\n\n## Installation\n\nPre-built binaries for a variety of operating systems and architectures are available to download from [GitHub Releases](https://github.com/CHTJonas/ddnsd/releases). If you wish to compile from source then you will need a suitable [Go toolchain installed](https://golang.org/doc/install). After that just clone the project using Git and run Make! Cross-compilation is easy in Go so by default we build for all targets and place the resulting executables in `./bin`:\n\n```bash\ngit clone https://github.com/CHTJonas/ddnsd.git\ncd ddnsd\nmake clean \u0026\u0026 make all\n```\n\n## Copyright\n\nddnsd is licensed under the [BSD 2-Clause License](https://opensource.org/licenses/BSD-2-Clause).\n\nCopyright (c) 2019–2021 Charlie Jonas.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchtjonas%2Fddnsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchtjonas%2Fddnsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchtjonas%2Fddnsd/lists"}