Ditching No-IP for DuckDNS

I’ve been using dynamic IP address services from no-ip.com for a long time to give a DNS name to my dynamic home IP. I remember having a no-ip.com address in college around the early 2000s for my dorm, then apartment, computer. I went through a hiatus after college where I managed my domain name to IP mappings manually for a few years (and my own Bind setup), until it seemed like the ISPs started giving me a new address monthly and the burden was too much. I also sold the hardware the DNS server ran on at some point during my moves. (Goodbye Mac G3 running Gentoo. You are missed.)

I was happy to see that after over 10 years away, no-ip was still there, and got signed up right away. I have an Ubuntu Linux system as my home desktop (and server really) and was glad to find a client that seemed to run on it. It was a little finicky to get going and was a black box sort of client to install. That wasn’t a good sign to start.

Then came the emails. Oh my god, the emails. Every 30 days they want to make sure you’re still there, and have you verify your domain name. They give you a 1 week notice too, so this means every 21 days you’re getting an email to verify that you’re still there. If you don’t verify – they say they’ll delete your account. When you try to click the email and go to the site it’s VERY clear they’d rather have you sign up for a paid account. Every 21 days for a few years I got nagged until I couldn’t take it any more! They clearly told me that I should go somewhere else for my business if I didn’t want to pay.

This sort of things just bugs me.

At the Open Source conference All Things Open, someone mentioned DuckDNS and I decided to give it a try. It’s been a night and day difference from no-ip so far, for the better.

Here’s what I like:

  1. There is no black box app or script to install on my Linux box. They just use cron and curl.
  2. The instructions are clear and easy to copy and paste.
  3. No one has emailed me anything yet, and since they have ZERO marketing team, I’m assuming no one will.

If you want to get started I highly recommend them. If you’re running a Linux server it’s dead simple.

The whole idea is that you sign up on duckdns.org and get a unique key for your desired domain name. You take this unique key and their copy and paste script and run that every 30 minutes as a cron job.

Every 30 minutes, your server uses curl (called via cron) with the duckdns URL and key and their server figures out your external IP and updates it accordingly. It was ridiculously easy to get started and used systems I already know and love (bash and cron).

Update 2023-12-31

I’ve been using duckdns with cron and a shell script successfully for over 5 years now. Over the recent holiday break I’ve been moving my server from Ubuntu to Debian on a new, smaller form-factor, and have the following updates and improvements.

Crontab Entry

I really like getting emailed when something goes wrong with my long-running processes, so I deleted the redirects to /dev/null that duckdns recommends. This is paired with some changes to the duck.sh script to quiet down the output.

I also set this to run every 30 minutes instead of 5. My IP hasn’t changed for the past 5 years since I switched to my current ISP – so checking every 5 minutes seemed a bit excessive.

crontab -l

MAILTO="your-email-here"
*/30 * * * * ~/devel/duckdns/duck.sh

duck.sh Script

I passed a few different options to the curl command to be a bit less verbose, but still output errors if they happen.

cat ~/devel/duckdns/duck.sh

# -s silent
# -S show errors
# -k allow insecure (skip cert cert)
# -o output response (OK)
# -K something about params from stdin (the echo url= here)

echo url="https://www.duckdns.org/update?domains=<your-domain>&token=<your-token>&ip=" | curl -s -S -k -o ~/devel/duckdns/duck.log -K -

With these changes I still see the duck.log get updated every 30 minutes but I don’t see any other output during successful attempts. I’m hoping that if something goes wrong, I’ll get an email so I can go poke at it.

No regrets with this service. I’m still a happy user, and this is my most popular blog post by far.


Posted

in

by

Tags: