Add DNS records when proxy is added
Hi !
I'm using Nginx proxy manager since few monts. I suggest to consider the ability to create record DNS when proxy is created.
This is the integration i've in mind.
On host creation :
A default value to set the check to true of false :

I would have been happy to propose a pull request but unfortunately I don't have the skills to develop this feature.
I hope you'll find the feature interesting :)
So, this is not the first time someone has requested this piece, especially since the DNS based cert work does much of the heavy lifting required.
However, there are many open questions that have no clear response. Some are below:
- If we add a DNS record, should we remove it when the host is removed? What happens to people using this hostname for other purposes than NPM?
- It doesn't work well for people that are on dynamic IPs. How does NPM know to add a cname rather than an A record? Since many people use a dynamic DNS provider to make a permanent hostname for home and point domains at that as a cname not an a record.
What most home users do is, set up a dynamic DNS provider, point a wildcard entry to that dynamic hostname and then they can setup any hostname they like in NPM with no DNS updates. Indeed, they can override the wildcard to point at servers in colo's etc giving total flexibility.
Hi @the1ts
Thank you for the reply.
This is my opinion about your questions ( matching my needs, it's not universal ) :
- I think yes. But the you're right on the fact the someone could have moved the domain to another place. Maybe you can choose an in between by having a " Delete DNS " options during the deletions ?
- One approach could be to set a settings named " CNAME " and all domains will be created using this CNAME ? But be carefull, the APEX can't be a CNAME ( https://www.bortzmeyer.org/cname-apex.html Sorry, only found in FR )
As to the point in general, I go back to the opening 2 sentences in the Project Goal section in the README.md file which talks about keeping things simple to use, which is a constant struggle for most open source projects. The more switches and options that get added, the more the project approaches the impossible to understand OpenSSL complexity, 99% of which isn't used by 99% of end users.
Perhaps another way to look at this is, if the problem can be fixed in another way (wildcard DNS) we should encourage the option that keeps NPM simple to use for the majority, which I guess are home users on dynamic IPs using dynamic DNS hostnames or development teams for their DEV/QA clusters which can use app1.dev.domain.com and app1.qa.domain.com from wildcards of *.dev.domain.com and *.qa.domain.com which point to load balancers/proxies for each environment.
If you need to have the apex available on dynamic DNS, there are docker images available which will set a hostname to the current external IP via API. I see Digital Ocean versions are available on hub.docker.com. Other DNS providers, such as cloudflare allow you to put in a CNAME for the apex and it is "flattened" i.e. they reply with the IP of the dynamic hostname.
Issue is now considered stale. If you want to keep it open, please comment :+1: