Cloudron Dynamic DNS: No logs on boot/startup when public IP changes after backup
-
Hi everyone,
I have a question regarding the Dynamic DNS feature and how it behaves after a server reboot/startup.
My current workflow involves shutting down the server periodically to take a full image backup. When the server boots back up, my ISP assigns a new public IP. However, I’ve noticed that Cloudron doesn't seem to update the DNS for the apps immediately upon startup, leaving them offline.
To work around this, I currently have to manually edit /etc/hosts just to access the dashboard and force things through.
Furthermore, I checked the dashboard's Event Log and couldn't find any information or logs related to DNS updates or the DDNS cron job execution. This makes it very difficult to verify whether the Dynamic DNS feature is actually running or failing.
Could you please clarify:
- What is the current default interval for Cloudron to check for public IP changes?
- Is there a way to manually customize this interval or force a DDNS check immediately upon server startup?
- Where can I find the actual backend logs for Dynamic DNS syncs since they don't appear in the dashboard's Event Log?
Thanks in advance for the help!
-
Hello @firmansi
-
Check interval
When Dynamic DNS is enabled, the check runs every 10 minutes. Each server gets a random minute offset so that not every Cloudron asks for its IP at the same moment. The public IP comes from https://ipv4.api.cloudron.io/api/v1/helper/public_ip. That applies when Network > IPv4/6 is set to the default "generic" provider. -
Custom interval / check on startup
You can't configure the interval, and there is no extra check at boot. The first check happens within 10 minutes after the box service starts. If you don't want to wait, you can push the current IP by hand from Domains > Sync DNS. It upserts the app, dashboard and mail records with the IP detected right now.
Turning the Dynamic DNS switch off and on again does not start a check. It only reschedules the job.
But, this could be a good startup check that could/should run and not wait for the cron. -
Logs
The Event Log only gets adyndns.updateentry when a change in IP is detected. That entry appears whether the update worked or failed. If the IP didn't change, nothing is written there. Every run is logged to the box log, though:
grep refreshDns /home/yellowtent/platformdata/logs/box.logYou should see one of these two lines every 10 minutes:
refreshDns: no change in IP ...refreshDns: updating IP from X to ...
The update itself runs as a task. Its log is in
/home/yellowtent/platformdata/logs/tasks/<taskId>.log, and the task ID is also in the Event Log entry. The last IP that was pushed is stored in/home/yellowtent/platformdata/dyndns-info.json.One thing to check:
Dynamic DNS only works when the domain uses a DNS provider that Cloudron can control through an API, such as Cloudflare, Hetzner etc.
With Manual, Wildcard or No-op, the update does nothing and still counts as a success. The IP gets recorded as "done", and after that nothing changes in DNS.
Also keep your provider's TTL in mind. Cloudron sets the lowest TTL each provider allows (for example 120s on Cloudflare, 300s on many others, 3600s on deSEC), so resolvers can keep the old IP for up to that long after the record is updated. -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login