Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add Support for DigitalOcean DNS #98

Closed
alaskanpuffin opened this issue Sep 15, 2020 · 6 comments
Closed

Feature request: Add Support for DigitalOcean DNS #98

alaskanpuffin opened this issue Sep 15, 2020 · 6 comments
Assignees

Comments

@alaskanpuffin
Copy link

  1. What's the feature?
    Add support for DigitalOcean's free DNS service.

  2. 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.

  3. Extra information?
    Documentation on their API can be found here: https://developers.digitalocean.com/documentation/v2/#domain-records

@qdm12
Copy link
Owner

qdm12 commented 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_ID for 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_ID number (a bunch of digits) but I can't really find how to retrieve it.

Thanks!

@alaskanpuffin
Copy link
Author

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
Copy link
Owner

qdm12 commented Oct 13, 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
Copy link
Owner

qdm12 commented Dec 10, 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
Copy link

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 qdm12 closed this as completed in 82e3d60 Dec 12, 2020
@qdm12
Copy link
Owner

qdm12 commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants