mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-06-04 14:21:55 -04:00
Feature request: Add Support for DigitalOcean DNS #58
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alaskanpuffin on GitHub (Sep 14, 2020).
Originally assigned to: @qdm12 on GitHub.
What's the feature?
Add support for DigitalOcean's free DNS service.
Why do you need this feature?
While there are other options such as Cloudflare, it can be helpful to manage all your services in a single location.
Extra information?
Documentation on their API can be found here: https://developers.digitalocean.com/documentation/v2/#domain-records
@qdm12 commented on GitHub (Sep 24, 2020):
Hello! Thanks for the suggestion, I'm working on it now.
I however have a question if you know, how do you get the
RECORD_IDfor your domain? Is this easily accessible easily?I'm following the documentation of developers.digitalocean.com/documentation/v2/#update-a-domain-record. They keep on mentioning that
RECORD_IDnumber (a bunch of digits) but I can't really find how to retrieve it.Thanks!
@alaskanpuffin commented on GitHub (Sep 24, 2020):
It looks like you need to have to list the records for a domain first to get the specific id for the subdomain. In the response it gives an id for each record under a specific domain. Take a look under this section: https://developers.digitalocean.com/documentation/v2/#list-all-domain-records
Then you can then filter by a specific record name and/or type of record by using name and type attributes at the end of the request. For example: /v2/domains/$DOMAIN_NAME/records?name=sub.example.com&type=A
All this information is listed under the "List All Domain Records" section.
Thank you for working on it!
@qdm12 commented on GitHub (Oct 12, 2020):
Hello! I have an alpha version that you can try using
qmcgaw/ddns-updater:digitalocean.Documentation is here.
A few further questions, can you use the host
"@"and"*"(wildcard host) for your domain? Let me know if you have any question or suggestion for the documentation or error messages etc.Thanks for your patience!
@qdm12 commented on GitHub (Dec 9, 2020):
Hey @alaskanpuffin sorry for the delay, have you had the chance to try it out? I would like to merge it in the main code base if it works for digital ocean. Thanks!
@M96268004 commented on GitHub (Dec 12, 2020):
Hi @qdm12
I just using the qmcgaw/ddns-updater:digitalocean to testing, and it works.
But it seems to me that the script will not create a new record if the hostname does not exist, only update to an existing record.
initial run
unhealthy: [domain: mydomain.tld | host: ddns-updater | provider: digitalocean | ip: ipv4]: failure (no domain records found) 2020-12-12 12:54:06 CST;
and when I create an A record from digitalocean control panel and stop the container and restart it.
Updating record [domain: mydomain.tld | host: ddns-updater | provider: digitalocean | ip: ipv4] to use xxx.xxx.xxx.xxx
I thought it will create if the hostname is not there or recreated if hostname been deleted.
Thanks for all the hard work, nice script, save my day.
B/R
@qdm12 commented on GitHub (Dec 12, 2020):
Thanks for testing it! Glad it helped you too!
I created #129 for creating the record if it does not exist as that behavior could be applied to all providers I think.
I also merged the digital ocean things in the master branch / :latest docker image which you should be able to pull soon once the build is complete.