Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Can update zone or subdomains, but not both #81

Open
acollien opened this issue Oct 31, 2021 · 7 comments
Open

Can update zone or subdomains, but not both #81

acollien opened this issue Oct 31, 2021 · 7 comments

Comments

@acollien
Copy link

acollien commented Oct 31, 2021

Ran into the issue when I was trying to get the app to update the 'www' A record on cloudflare. Popped it in the subdomain field of the app, and then checked back after running it. My main website A record had not updated, but the www had. Remove the www subdomain from the app, rerun, and the main domain name A record updates. Seems to be one other the other. Is this how it's meant to function. Possible to update all A records (i.e. the domain + 1 or more subdomains) at once?

@thijsjek
Copy link

thijsjek commented Nov 6, 2021

I just created 2 separated docker containers.
One without subdomain=
and one with subdomain=www,cloud,etc

@QuanDev2
Copy link

@thijsjek can you use commas to separate multiple subdomains?

@PackElend
Copy link

PackElend commented Jul 10, 2022

still, the case that only one of the A-Types gets updated?
first A got updated but not the second one.
image

@thijsjek
Copy link

thijsjek commented Jul 11, 2022

So, the container let's you put in multiple like comma seperated domains or multiple -e subdomains, but that does not work. I didnt notice because my IP didn't change until I setup like below
I eventually just use 2 containers. One for mydomain.com and one for *.mydomain.com.

To adjust multiple subdomains, I think you have to create several containers.

@PackElend
Copy link

PackElend commented Jul 11, 2022

so you do
CONTAINER: TLD

version: '2'
services:
  cloudflare-ddns:
    image: oznu/cloudflare-ddns:latest
    restart: always
    environment:
      - API_KEY=xxxxxxx
      - ZONE=mydomain.com

CONTAINER: suddomains

version: '2'
services:
  cloudflare-ddns:
    image: oznu/cloudflare-ddns:latest
    restart: always
    environment:
      - API_KEY=xxxxxxx
      - ZONE=*.mydomain.com
      - PROXIED=false

@PackElend
Copy link

otherwise, may https://github.com/timothymiller/cloudflare-ddns may do it better

@thijsjek
Copy link

thijsjek commented Jul 11, 2022

so you do CONTAINER: TLD

version: '2'
services:
  cloudflare-ddns:
    image: oznu/cloudflare-ddns:latest
    restart: always
    environment:
      - API_KEY=xxxxxxx
      - ZONE=mydomain.com

CONTAINER: suddomains

version: '2'
services:
  cloudflare-ddns:
    image: oznu/cloudflare-ddns:latest
    restart: always
    environment:
      - API_KEY=xxxxxxx
      - ZONE=*.mydomain.com
      - PROXIED=false

Yes exactly. I just don't use docker compose.

`docker run -d
--name=ddns1
-e API_KEY=
-e ZONE=mydonain.com
--restart=unless-stopped
oznu/cloudflare-ddns

docker run -d
--name=ddns2
-e API_KEY=
-e ZONE=domain.com
-e SUBDOMAIN=*
--restart=unless-stopped
oznu/cloudflare-ddns`

Also from your link:
You can save yourself some trouble when hosting multiple domains pointing to the same IP address (in the case of Traefik) by defining one A & AAAA record 'ddns.example.com' pointing to the IP of the server that will be updated by this DDNS script. For each subdomain, create a CNAME record pointing to 'ddns.example.com'. Now you don't have to manually modify the script config every time you add a new subdomain to your site!

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

No branches or pull requests

4 participants