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

Using multiple providers #47

Open
kthchew opened this issue Jul 14, 2023 · 7 comments
Open

Using multiple providers #47

kthchew opened this issue Jul 14, 2023 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kthchew
Copy link

kthchew commented Jul 14, 2023

Is it possible to use multiple providers to update different domains? I tried this config (simplified)

{
    dynamic_dns {
        provider cloudflare {$CLOUDFLARE_API_TOKEN}
        domains {
            main-domain.com
        }
    }

    dynamic_dns {
        provider duckdns {$DUCKDNS_TOKEN}
        domains {
            secondary-domain.com
        }
    }
}

but it seems like only the second dynamic_dns block (for DuckDNS) is functional; main-domain.com is not updated at all.

@francislavoie
Copy link
Collaborator

I don't think it is possible right now unfortunately. It would require a restructure of the module config to handle that 😓

As a workaround you could run two instances of Caddy, one actually serving HTTP + ddns for one provider, and the other just taking care of ddns for the other provider with no site blocks.

@mholt
Copy link
Owner

mholt commented Jul 14, 2023

Huh, interesting. You want two domains from different providers pointed to your machine?

Haven't seen that need yet -- but if it's legitimate we can probably refactor some things.

@kthchew
Copy link
Author

kthchew commented Jul 14, 2023

As a workaround you could run two instances of Caddy, one actually serving HTTP + ddns for one provider, and the other just taking care of ddns for the other provider with no site blocks.

Thanks for the workaround! That should work for me.

Huh, interesting. You want two domains from different providers pointed to your machine?

Haven't seen that need yet -- but if it's legitimate we can probably refactor some things.

To be honest, if it's too complicated then it may not be worth implementing. In my case, it's more of a temporary solution because I'm migrating my services to a new domain (and using a different provider), and this is meant to be a temporary thing until I can switch my users to the new domain, after which I'll only be using one provider. This isn't really meant to be a long-term setup in my case, so a temporary workaround like @francislavoie described works well for me.

@mholt mholt added the enhancement New feature or request label Jul 14, 2023
@mholt
Copy link
Owner

mholt commented Jul 14, 2023

Awesome, good to know. Thanks!

I'll close this for now but we can revisit later if there's a more compelling use case for it.

@mholt mholt closed this as completed Jul 14, 2023
@mholt mholt reopened this Jul 14, 2023
@mholt mholt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 14, 2023
@maxbec
Copy link

maxbec commented Aug 29, 2024

I also would like to see this option. I have multiple services running on my server. Some for my private network and some for my little company. That's why i need two domains.

@mholt mholt reopened this Aug 29, 2024
@mholt
Copy link
Owner

mholt commented Aug 29, 2024

This might be a big change but if someone wants to discuss the changes and submit a PR, I'd be okay with reviewing/discussing it!

@Monviech
Copy link

I'm interested in this since I get asked often if its possible to implement this in the opnsense plugin. There seems to be a use-case for some caddy users.

I can not contribute it myself though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants