Can update zone or subdomains, but not both
acollien opened this issue · 7 comments
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?
I just created 2 separated docker containers.
One without subdomain=
and one with subdomain=www,cloud,etc
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.
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
otherwise, may https://github.com/timothymiller/cloudflare-ddns may do it better
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!