timothymiller / cloudflare-ddns

🎉🌩️ Dynamic DNS (DDNS) service based on Cloudflare! Access your home network remotely via a custom domain name without a static IP!
https://timknowsbest.com/free-dynamic-dns
GNU General Public License v3.0
3.1k stars 324 forks source link

How to create multiple domains (zones)? #123

Closed CurlyFlow closed 1 year ago

CurlyFlow commented 1 year ago

Thanks for your great product!

So i ofc looked at the documentation...

image

Ehm.. but where do i see ANYthing related to multiple domains (zones)?

As far as i understand this json shows ONE zone (domain?) with multiple subdomains...?

I tried adding multiple "zones", but it just fails with "config error" (would be cool if it would say where the problem is)

I tried adding multiple "cloudflare" sections.. but same, so im lost, any hint would help, thanks.

Edit: that was my best try:

{
  "cloudflare": [
    {
      "authentication": {
        "api_token": "XXXXXXXXXXXXXXXXXXXXXX",
        "api_key": {
          "api_key": "api_key_here",
          "account_email": "your_email_here"
        }
      },
      "zone_id": "XXXXXXXXXXXXXXXXXXXXXX",
      "subdomains": [
        {
          "name": "www",
          "proxied": true
        },
        {
          "name": "",
          "proxied": true
        },
        {
          "name": "forum",
          "proxied": true
        }
      ]
      "zone_id": "XXXXXXXXXXXXXXXXXXXXXX2",
      "subdomains": [
        {
          "name": "www",
          "proxied": true
        },
        {
          "name": "",
          "proxied": true
        }
      ]
    }
   ],
  "a": true,
  "aaaa": false,
  "purgeUnknownRecords": false,
  "ttl": 300
}
CurlyFlow commented 1 year ago

ive added my config

CurlyFlow commented 1 year ago

for anyone having the same problem, i found the solution on the unraid forum

{
  "cloudflare": [
    {
      "authentication": {
        "api_token": "***************",
      },
      "zone_id": "XXX",
      "subdomains": [
        {
          "name": "",
          "proxied": true
        },
        {
          "name": "www",
          "proxied": true
        }
      ]
    },
    {
      "authentication": {
        "api_token": "******************",
      },
      "zone_id": "XXXX",
      "subdomains": [
        {
          "name": "",
          "proxied": true
        },
        {
          "name": "www",
          "proxied": true
        }
      ]
    }
  ],
  "a": true,
  "aaaa": false,
  "purgeUnknownRecords": false
}
CurlyFlow commented 1 year ago

nvm, thats also not working, so im lost.

Is this container dead?

after another hour of tryin i found this working

{
  "cloudflare": [
    {
      "authentication": {
        "api_token": "XXXXXX",
        "api_key": {
          "api_key": "api_key_here",
          "account_email": "your_email_here"
        }
      },
      "zone_id": "XXX",
      "subdomains": [
        {
          "name": "",
          "proxied": true
        },
        {
          "name": "www",
          "proxied": true
        },
        {
          "name": "forum",
          "proxied": true
        }
      ],
      "zone_id": "XXXXXX",
      "subdomains": [
        {
          "name": "",
          "proxied": true
        },
        {
          "name": "www",
          "proxied": true
        }
      ]
    }
  ],
  "a": true,
  "aaaa": true,
  "purgeUnknownRecords": false,
  "ttl": 300
}