CloudFlare DDNS - Update CloudFlare with Your Dynamic IP Address
HTML-код
- Опубликовано: 24 авг 2024
- In this video we'll take a look at how to setup a Docker container that will update Cloudflare any time the IP address from your internet service provider (ISP) changes.
We're going to look at a stack from oznu over at hub.docker.com...
I've modified the container a bit by removing subdomains and adding PUID and PGID, but that's it.
As the video shows, this process only takes a couple of minutes and will save a lot of headache if your IP address changes regularly.
More OpenMediaVault 5 tutorials here:
• Openmediavault 5 (OMV5...
/=========================================/
Remember to leave a like on this video and subscribe if you want to see more!
/=========================================/
Like what I do? Want to be generous and help support my channel? Here are some ways to support:
Patreon: dbte.ch/patreon
Ko-fi: dbte.ch/kofi
/=========================================/
Here's my RUclips Merch Store:
dbte.ch/ytstore
/=========================================/
Here's my Amazon Influencer Shop Link:
Amazon: dbte.ch/amazon...
/=========================================/
Follow Me:
Twitter: dbte.ch/tw
Facebook: dbte.ch/fb
Subscribe: dbte.ch/ytsub
#CloudFlareDDNS #UpdateCloudFlareDNS
Lightning round on setting up DDNS with Cloudflare. Literally had to pause and rewind several times you had so much information in such a short time. Well done!!
For someone who gets a new public ip everytime my router restarts i cannot thank you enough for this simple yet effective solution! :)
3-years and some change & it still works. 😎
I used the subdomain parameter in the docker stack/composer as I wanted to specify the subdomain with DDNS, not the root domain. Just wanted to mention that. Thanks for the video!
Super handy, this is something that kept me from changing from an isp that provides static ip’s to one that doesn’t. Thanks!
Glad it helped!
Excellent video! No unnecessary monologuing like some guides do.
Straight to the poin, no BS
I love this channel
Another great video and certainly the cleanest way to resolve a dynamic IP, keeping it all within Cloudflare. I'm achieving a similar result with Cloudflare by watching one of your other videos on installing Duck DNS on OMV. Then on Cloudflare's DNS, instead of entering an IP address, I just entered my Duck DNS address. Cloudflare then retrieves the dynamic IP address from the Duck DNS address.
Excellent video. Right to the point. I've been struggling to set exactly this until I found your video. Thanks!
Thanks! Was waiting for this since I started uisng CloudFlare for my domain management.
Glad it helped!
Thanks alot, your videos are really helping me learn alot of things !
Also, the PUI and PGID is not a requirement anymore !
Good to know!
This is by far the best tip I saw. I will consider supporting your channel just for that. You really saved me a ton of money.
Works great! Thanks man for your videos, each video says am better than the other one.
Brilliant overview, worked perfectly! Thanks so much
Very good and useful video David! Liked the content! I did and is up and running!
Great to hear!
been watching your videos lately thanks for all your help!!
Glad to help
Does this work for multiple subdomains and domains / zones too?
Edit: or should all other domains point to the one domain with the CNAME record like you showed?
Thanks for the info and demo, have a good day
THANK YOU!!!! YOU SAVED MY DAY !!!
Thank you so much for your support!!!
just what I was looking for. I have changed from SWAG to this and it is nice. I have noticed that it is a bit slower.. Maybe it is a cloudflare setting but everything behind the proxy manager is slower than before.
Thank you 😁 another great tutorial!
Another great video. This was an easy one to do. Thanks!
Thank you very much! Helped me a lot! :D
I'd like to mention that the API spits this error for certain sites "You cannot use this API for domains with a .cf, .ga, .gq, .ml, or .tk TLD (top-level domain). To configure the DNS settings for this domain, use the Cloudflare Dashboard."
Thanks for the info!
That is because these free TLD domains are abused a lot by hackers and fraudsters, try a paid domain, it will always work.
Thanks for the information.
Works thank you , clip is very fast though.
Nice. Still useful tutorial to this day. The only thing that I have to do as extra is to add another separate service in the stack for wildcard subdomains, because I am not sure how to to do it in a single service. Do let me know if anyone did know how to do it.
Thanks! This worked perfectly
great info.. I wish when people were doing demos like this they would just slow down a bit... yes I can play the video at a slower speed but you're just clicking around too fast for me to follow along.
3:20 how are you getting the ZONE, PUID and PGID from please?
The PUID and PGID are based on the user you use to log in to Portainer. To get that, log in to your server via SSH as root. Then type: id admin (replace admin with whatever username you use to login into your system).
Thanks, when i get home I will try it. Thanks again
Greeeeeaaaaatttt, was hungry when directly to portainer install stack work fine test and all. thank you thank you thank you
following along until 2:33 then I hit a brick wall. I feel like might be self explanatory to some, like how the windows folder structure is for me but that was a real rug pull.
Kudos for your excellent tutorials. My NAS is connected to NordVPN. Therefore, the containers communicate the IP address of the VPN and not the IP of my ISP. Therefore, when I create the tunnels, I can't reach those containers or the DSM. However, if I change the service order on the NAS by putting the LAN first, then the connection is immediate and I access, for example, the DSM without problems (I do not access the other containers instead). Is there a way to route the traffic from the VPN IP to the LAN IP so I can log in seamlessly? This video somehow lit a light bulb for me, but I have no idea if I'm on the right track! Thanks in advance.
Hello and congratulations always for your guides. I followed all your steps, but once you have deployed the stack, looking at the logs gives me an error in updating the ip address. the API key works as from the log I see that it reads the DNS zone. do you know how to solve? thank you so much
Same error, any solution?
Hello, I think you miss the part where you put the code on Docker. Can you please explain what to do in docker before putting inside the code from cloudflare? Thank you! :(
I show it at 2:43 in Portainer
I encountered a weird issue... My Oznu updater picks the wrong WAN on my router, however under the same subnet everything is routed to a specific one and i do confirm that every other vm, container etc routed throu this one except the oznu ddns updater. Why on earth does the software picks the wrong connection? Can you help me out?
I have a reserved ip how can i access it from anywhere
Thanks for the great new series on rPi 4. I would love for a clearer step by step on remote access starting with domain registration with porkbun, then cloudflare, then nginx on rpi. I used your older videos on porkbun and cloudflare but cannot seem to make nginx working
The raspberry pi series basically covers all this
@@DBTechYT I think this has to do with my Verizon FIOS router. I had
1. signed up for Porkbun,
2. redirected name servers to Cloudflare per instructions
3. Added A and CNAME records - A pointing to my external IP and CNAME to a book name (Calibre Web setup on Pi)
4. Installed NGINX per instructions
Even though I can access everything locally, nothing from external address (domain account address). I have checked that ports 80, 443, 8083 (for calibre web) are forwarded on router
I also get an Internal Error when I try to say setup a proxy host on NGINX for my nextcloud
Error: Command failed: /usr/bin/certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-5" --agree-tos --email "arindam.andy.pal@gmail.com" --preferred-challenges "dns,http" --domains "cloud.lorderondsvault.click"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for cloud.lorderondsvault.click
Using the webroot path /data/letsencrypt-acme-challenge for all unmatched domains.
Waiting for verification...
Challenge failed for domain cloud.lorderondsvault.click
http-01 challenge for cloud.lorderondsvault.click
Cleaning up challenges
Some challenges have failed.
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1051:16)
at Socket. (internal/child_process.js:442:11)
at Socket.emit (events.js:314:20)
at Pipe. (net.js:673:12)
This is what I get when I try to install an SSL certificate
Hello David, I was wondering if you could do a tutorial on "How to Set up Cloudflare Argo Tunnel" on Raspberry Pi (Portainer) to - Bypass CGNAT and ISP Port blocking, Thanks.
How i know my puid and pgid?, i search and i found this: "id $user" ->but when i update the stack with everything the ip it does not actualize
Are you using OpenMediaVault for your setup?
@@DBTechYT Im stuck here also UID and GID for the pi ar 1000:1000, how do I know that's correct for this config file?
How can be done that without container and using a DDNS software installed on windows directly?
Maybe. I've never looked into it. I use Docker for most stuff like that
First off thanks for the great videos it helps with setting up my home lab. I was wondering if you had any intent on making video on virtulization like ProxMox and Nas OS's like TruNas?
I've thought about doing some proxmox content but it may be a while before I have a chance to get to it
Truenas scale is great
Hey keep getting this error
"ERROR: Failed to update CloudFlare DNS record domain.do", do you know why?
I recently tried this out but can't access internal web server. My setup is an UbuntuVM running a cloudflare-ddns script, UbuntuVM running NPM, and UbuntuVM running Apache. I setup a proxy in NPM to point to my Apache VM using an SSL cert, I tried both HTTP/HTTPS schemes and ports 80/443. Any assistance is appreciated.
You go through some steps lightning fast. How did u set up your domain? we can pick anything we want in the stack composer? or we need some steps u skipped in the vid? I don't have a domain, do I need to buy one? Also in 3:13 for what user is that puid? root/pi or any user?
You buy a domain from wherever you want to buy a domain from. Setup a CloudFlare account and add the domain to the CloudFlare account per their instructions for your registrar. Then, setup an A Record for your domain or subdomain that point to your home's IP address. The one your ISP gave you, not the IP of the server. The PUID and PGID are , in my case, based on the user that I use to login to Portainer. To get that, I login to my server via SSH as root. Then I type: id admin (replace admin with whatever username you use to login to your system). DO NOT USE "root" in that command as running containers as root isn't advised.
Does this image actually connect to cloudflare to verify the real IP before updating? Because a curl will always return the proxied IP. No mention of any sort of interval on the update either.
It's not working for me unfortunately. On the docker logs, I am getting the message:
'error: failed to update cloudflare dns record from to '
Then your permissions are probably not set correctly
@@DBTechYT I am using portainer in docker via an Ubuntu server VM. What permissions do I need to change?
@@DBTechYT I read somewhere that cloudflare APIs no longer work for freenom free domains such as tk, ml, etc. Does it affect custom API tokens such as the method on your video?
Too quick, not describing what you're doing.
Copied some docker-compose code from somewhere not explained.
Stated that PUID/PGID settings are for your setup, but not other peoples. So what do we do?
Find the puid and pgid for your setup and then follow the tutorial like 74k others have
Still waiting for a video showing Backup and restore OMV OS :(
I'm going to get to it but it didn't make sense to spend multiple videos talking about 1 topic only to interrupt the series for a one-off video that is already planned
@@DBTechYT ya but backup and restore should be most important. I have ruined my system 3 times and had to reinstall it all the time. If I had backup, then would be easy. :(
That's why it's important to not do any testing on your main server. I'm not sure what kind of system you're using, but if you're using a desktop (Intel/AMD) processor, then think about picking up something like this to do your testing on: amzn.to/3j0ztiG If you're using an ARM processor device, I encourage you to get another one of those to do your testing on. This is something I learned the hard way when doing website development. You NEVER code on a production server. You code and test on a development server and then push the code to the production server.
@@DBTechYT thanks for the advice. I use Lenovo mini PC i5. That's what I have learned. Now I have to reinstall Openmediavault on another USB thumbdrive as the one I am running is having some issues. Really appreciate. Whenever tou get a chance, please make a tutorial to backup your OS drive. Thanks again.
PC link you shared seems a good advice. I can buy something like that for testing
Thank you for this awesome guide. I have a problem when my firewall is enabled. May I know what port should I add in my firewall? Thank you!
Ports won't affect this container as it just sends an update to CloudFlare. For your reverse proxy needs, though, you'll want to open ports 80 and 443.
@@DBTechYT Thank you for your response. Its weird that if I turn on my firewall, everything does not work. In my firewall I have 443 and 80 open just like my router.
Another problem I have is that everything works but when I turn on the proxy again in cloudflare (turned it off for ssl), I have page is not working or too many redirects.
Can you please advice what to do?
Thank you to save my time.
You're welcome!
It worked but how do I set it up to run every couple minutes? Or does it already do this
There's an Environment Variable listed on this page to show how to set it up: hub.docker.com/r/oznu/cloudflare-ddns
Good explanation
Thanks!
This is great thank you db 😃
Glad you like it
1. Can this be done on pfsense DDNS with API key
2. rather then set this for root domain can you be set only for the subdomain leaving the choice of setting other subdomain to other IPs? Is there a guide somewhere at all
Thanks in advance
super video is this working also if my router is behind the ISP dinamic NAT?
If you want to self-host while being behind a NAT like that I would suggest this: ruclips.net/video/VrV0udRUi8A/видео.html
Excellent!! This configuration opens the possibility of adding multiple containers to expose them to the Internet without risking our IP address.
Have you considered putting the openvpn container behind cloudflare?
I have tried but with no success, I don't know how to add the SSL certificate in cloudflare and embed it in the container.
I've tried that in the past, but using the CloudFlare SSL causes issues and doesn't work.
@@DBTechYT thanks for your answer!
Can you explain how to use cloudflare teams with home dynamic ip? There seems no easy way to do it, open dns has a client, others user a dyndns or other name to update the ip, cant see it in cloudflare
I tried but I noticed it does not work for free domains like those ending in tk ga etc. Just for the paid ones. If someone knows how to make these free domains to update with another programs, I would apreciate it. Thanks.
Or you could spend $5 on a domain name?
Its It's possible to do something secure without a domain and static ip? Because I'm hosting from my home using Dyndns or No-Ip to access my server from outside. Thanks! New sub here.. I watched almost every video in your Docker/Portainer playlist. Super helpful content!
It's much harder to secure your setup without a domain name. A static IP isn't necessary as you can use something like a CloudFlareDDNS container on your server to update your DNS records. You can get domains cheap from porkbun.com. I just bought a .wtf domain for less than $5 a couple of nights ago.
Hey DB, Thanks for this video, it's gotten me soooo close to getting DDNS up & running for my first time. However, when I look at the stack logs I'm getting a "curl: (60) SSL certificate problem: self signed certificate" error. Did I setup proxmox, docker, portainer, or cloudflare container incorrectly? Or is it something on my Cloudflare account? I've seen that you can add a tag to ignore the SSL requirement, but how can I do that in a Docker Compose and are there security implications to doing that? I'm sooo close. Thanks again, loving your content.
did you ever find out the issue?
Hey Sir, will this method update domain, and all subdomain as well??
It updated all of that without issue last time I used it
I have tried using it with several subdomain, adding the "SUBDOMAIN" environment variable for each one, but it does only update one of them. Is this even a possibility?
You only need to put one subdomain in there. Then all of your other subdomains on CloudFlare should be setup as CNAME records
Can I use it for traffic other tcp ports or only http and https?
Great video... terrible sound problems, skipping most of the time. You are great as always on explaining cool stuff though.
Thanks for the video. How to add Raspberry pi. Is information transfer possible? I could not.
This works on Raspberry Pi
good stuff
Hello sir, thanks for the video, really appreciate it. This won't work if I have CGNAT with no public ip address, right?
I don't think it will work with your setup.
hello brother can you tell me how to add subdomain ? i can add 2 /3 subdomain but always 1 domain update but others not updated.. wait for you replay
I honestly couldn't tell you. It's been a long time since I've used this method. I've switched to Cloudflare Tunnels.
@@DBTechYT any video link for tunnels ? and that was the same like DDNS?
ruclips.net/video/OAeQwdFXsQQ/видео.html not at all like DDNS. Completely replaces the need for reverse proxy like Traefik/Nginx Proxy Manager
i've been lost since the point you copied the token. got no clue which site suddenly shows up there where you pasting things in an stuff. so sad 😞
I would re-watch the video at maybe .75 or .5 speed. Pause when necessary
can you try with duckdns
Excellent video. Question. Can I add multiple "zone" parameters in the docker compose file to update multiple domain names? If so, do I just add the "zone" variable twice, or do I use a comma and put them both on the same line?
Did you work this out?
@@somedude5353 honestly didnt try past this comment. Altered my setup so it wasn't important for me anymore. Sorry.
Hi bro, i have problem, can you help me !
I changed namesever mydomain to cloudflare and status is active
I dont know how to add record type A to auto update ip (name: "mydomain", i dont know value to add to IPv4 address) .
(i use API in my account cloudflare to update ip. I use app "DDNS Manager 1.0" in "aapanel", aapanel is a free and Open source Hosting Control Panel)
I'm not good at english, i hope you can understand my problem and help me !
Can you make a video tutorial how to solve this problem. Thanks you br
Brilliant!!!
Wait I have a lot of questions about this step. Like do I need to buy a website domain name to actually do this step and I can I use that domain name over the internet? I'm debating if I need this step or not. Thanks for any Reponses!
Yes, you need to buy a domain and point it to CloudFlare. However, if you have a dynamically changing IP address, you might want to look at this method of using CloudFlare instead: ruclips.net/video/VrV0udRUi8A/видео.html as it updates everything for you and doesn't require any port forwarding, which helps keep your network even more secure.
@@DBTechYT Thanks so much for the fast response I wasn’t expecting it! You are the best I and I’m learning a lot from your videos you really do make all this stuff easy to understand!
Lost me me at, "Move this over there" not familiar with Docker stack
Thank you very much for your Raspberry Series playlist. It is amazing and I enjoy it very much. I have a question. I have ASUS router with OpenVPN Client where I have setup NordVPN profiles and have that turned on (so all devices go thru VPN). So my public IP is not the same as my real IP (assigned by ISP). How should I set this up to work with Cloudflare and NGINX on Raspberry? Thanks a lot!
You would still need to set them up with the ISP IP I believe
@@DBTechYT So then I should turnoff cloudflare stack update my IP address automatically, correct? Because now cloudflare stack is updating my IP to cloudflare whatever the IP of VPN server I'm connected to. And I believe that is the reason why I cannot get SSL working on NGINX when setting up proxy for netxcloud. (it gives me internal error). Do you think (that internal error) it is because of that VPN issue (as described above) that it is trying to issue SSL certificate to VPN server I'm connected to? Thanks a lot!
@@DBTechYT I solved the problem like this. 1.) Installed Merlin WRT on my router that allowed me VPN Splitting, so the IP where the Raspberry is on does not go thru VPN while everything else goes. 2.) Did port forwarding of port 80 and 443. Now everything works just fine.
how to use with dnstube win??
2:41. "...copy this ... paste this...", copy from where I am confused...
I literally show in the video everything step by step where to get everything.
Thanks 👍👍👍
This is what I want :)
Thanks for watching!
Any help with automatic updating the AAAA record
-e RRTYPE=A - Set to AAAA to use set IPv6 records instead of IPv4 records. Defaults to A for IPv4 records.
Question, you still have to open port 80 and 443 on your router, so Nginx Proxy Manager can route for there no??? Cheers !!
yes
Estas con un RPI ??
The docker container say it has vonrabilites
The container hasn't been updated in 3 years. hub.docker.com/r/oznu/cloudflare-ddns I can't control that
@@DBTechYT thank you!
Your video was great 😃😃
Used windows wrap!
Top Videos , but how come i to my homeserver , from handy or whatever . i have container in portainer , nextcloud pihole etc . domain is in cloudflare , goes to my static ip , nameserver change , and now ? can you help or have some tips . best wishes from germany
I apologize, but I have no idea what you're asking.
sry for my bad english, i would like to access my home server from outside, unfortunately i don't know how to set it up with cloudflare.
You're fine. I thought that's what you were asking, but I wanted to make sure. The only way I can really explain it is to have you watch this playlist. It's for Raspberry Pi, but the process to access remotely is the same: ruclips.net/video/TYewyAK6GmQ/видео.html
I watched some videos of it, unfortunately I don't understand everything you say there.
great, thanks!
You bet!
İs it work over cgnat ?
No. You'd want to use something like Cloudflare Tunnels for CGNAT stuff
How to get PUID and PGID?
ssh into your server. type: id username
Replace username with whatever username you logged in with or whatever username you want the info for
@@DBTechYT one more question, meaning that, if would like to add sub-domain, i need to create CNAME record?
Can I access my server from out of lan by this way ?
If you use this with something like NGINX Proxy Manager
@@DBTechYT thanks David
thank you for the content you do a really good job. but i see the your always racing the time 😓
Yeah. This was an issue for a while. Now I've got a new recording space that allows me to take my time :)
02:35 what is that !
Portainer?
@@DBTechYT advice: few people know what portainer is, you should assume the average user would be more familiar with a traditional cli configuration.
How do you do this with wordpress?
Do what with WordPress? This is about setting up a DDNS client for CloudFlare
@@DBTechYT how do I do that for WordPress without the docker using siteground hosting
Hi I am totally new to docker and linux where and how are you getting to the screen where you open up your stacks ?
That's Portainer. You don't NEED to have it installed as you can deploy a stack via SSH, but Portainer is just a nice interface to have.
@@DBTechYT thanks have now installed it and I can move on
@@DBTechYT hi just one more question where do I find the PUID & GUID values
So that will be whatever user you have on your system that will have control over the config folder. Don't use root, though. That's a bad practice and a security risk.
You'll get it by SSHing into your server and typing: id username (replace username with your actual username)
Thanks.
Welcome!
man, you are on Cokeine 😂😂😂
And you can't spell, so I guess we're at an impasse
@@DBTechYT Koke Ina man, why are you so energic at the beginning of the clip ? cokemon
@@daflexx2003 dbtechreviews.com/i-talk-fast
thanks, and maybe speak slower next time
So if my brother has a domain he can share with me (ie: lastname.com) is it possible to use ddns on the cname or subdomain? So that his subdomains go to his home IP (hisfirstname.lastname.com) and mine go to mine (myfirstname.lastname.com)?
@DB Tech Thanks for the video, can this be done instead of using CloudFlare use DuckDNS instead?
Why would you use DuckDNS? Because it's free? DuckDNS exposes your home's IP address and adds NOTHING in the way of security. There is NO reason to use DuckDNS unless you're actively TRYING to get hacked.
@@DBTechYT Wow, did not know that but yeah because it's free.
@@DBTechYT I'm using cloudflare now thanks for the heads up.