{"id":182,"date":"2025-01-04T16:34:44","date_gmt":"2025-01-04T16:34:44","guid":{"rendered":"https:\/\/thevadasan.com\/?p=182"},"modified":"2025-01-04T16:34:45","modified_gmt":"2025-01-04T16:34:45","slug":"a-simple-dynamic-dns-updater-for-cloudflare-and-namecheap","status":"publish","type":"post","link":"https:\/\/thevadasan.com\/?p=182","title":{"rendered":"A Simple Dynamic DNS Updater for Cloudflare and Namecheap"},"content":{"rendered":"\n<p>In today\u2019s increasingly connected world, having access to services hosted on dynamic IPs can be a real challenge. Many ISPs assign non-static IP addresses, which means that your server\u2019s IP could change at any time, disrupting services like personal websites, remote servers, or even home automation setups.<\/p>\n\n\n\n<p>As someone who faced this issue, I realized there wasn\u2019t a simple, extensible, and containerized solution that could dynamically update DNS records with a new public IP. That&#8217;s why I decided to create <strong>PDynIP<\/strong>\u2014a lightweight, easy-to-use utility for managing dynamic DNS updates. With support for <strong>Cloudflare<\/strong> and <strong>Namecheap<\/strong>, and a straightforward deployment via Docker, PDynIP makes keeping your DNS records updated effortless.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why I Built PDynIP<\/strong><\/h2>\n\n\n\n<p>The inspiration for PDynIP came from my own struggles with dynamic IPs:<\/p>\n\n\n\n<ul>\n<li><strong>Frequent IP Changes<\/strong>: My ISP changes my public IP address without notice, making it hard to reliably access my self-hosted services.<\/li>\n\n\n\n<li><strong>Manual Updates<\/strong>: Updating DNS records manually is tedious and error-prone.<\/li>\n\n\n\n<li><strong>Lack of Simple Tools<\/strong>: Existing tools felt overly complex or didn&#8217;t offer the flexibility I needed, such as multi-hostname support or containerized deployment.<\/li>\n<\/ul>\n\n\n\n<p>With PDynIP, I aimed to solve these problems with:<\/p>\n\n\n\n<ol>\n<li><strong>Ease of Use<\/strong>: Simple configuration via environment variables.<\/li>\n\n\n\n<li><strong>Portability<\/strong>: Deployable in seconds using Docker or Portainer.<\/li>\n\n\n\n<li><strong>Extensibility<\/strong>: Supporting both Cloudflare and Namecheap, with room to expand to other DNS providers.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Want to take it for a spin ? <\/h2>\n\n\n\n<p>I have containerised the utility so that it is easy to use and try out, all of the important information that pDynIp needs is set as an environment variable. Here are some examples : <br><\/p>\n\n\n\n<p>Namecheap example : <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">docker run -d \\\n  -e PDYNIP_PROVIDER=namecheap \\\n  -e PDYNIP_API_KEY=&lt;YOUR_NAMECHEAP_DDNS_PASSWORD> \\\n  -e PDYNIP_DOMAIN=example.com \\\n  -e PDYNIP_HOSTNAMES=www,api \\\n  -e PDYNIP_CHECK_INTERVAL=300 \\\n  --name pdynip-namecheap \\\n  ghcr.io\/pradt\/pdynip:latest<\/code><\/pre>\n\n\n\n<p>Cloudflare example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">docker run -d \\\n  -e PDYNIP_PROVIDER=cloudflare \\\n  -e PDYNIP_API_KEY=&lt;YOUR_CLOUDFLARE_API_KEY> \\\n  -e PDYNIP_EMAIL=&lt;YOUR_CLOUDFLARE_EMAIL> \\\n  -e PDYNIP_DOMAIN=example.com \\\n  -e PDYNIP_HOSTNAMES=www,api \\\n  -e PDYNIP_CHECK_INTERVAL=300 \\\n  --name pdynip-cloudflare \\\n  ghcr.io\/pradt\/pdynip:latest<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>PDynIP simplifies dynamic DNS updates for anyone running services on a dynamic IP. Whether you&#8217;re hosting a personal website, accessing a remote server, or managing a home automation system, PDynIP has you covered.<\/p>\n\n\n\n<p>I\u2019m excited to share this tool with the community, and I hope it saves you the same headaches it saved me. Feel free to explore, contribute, or share your feedback!<\/p>\n\n\n\n<p>If you have questions or need help, open an issue on the <a href=\"https:\/\/github.com\/pradt\/pdynip\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub repository<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s increasingly connected world, having access to services hosted on dynamic IPs can be a real challenge. Many ISPs assign non-static IP addresses, which means that your server\u2019s IP could change at any time, disrupting services like personal websites, remote servers, or even home automation setups. As someone who faced this issue, I realized [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":184,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17,18],"tags":[45],"_links":{"self":[{"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/posts\/182"}],"collection":[{"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=182"}],"version-history":[{"count":2,"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/posts\/182\/revisions\/185"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=\/wp\/v2\/media\/184"}],"wp:attachment":[{"href":"https:\/\/thevadasan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thevadasan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}