How to set up dynamic DNS for a home computer or server

I recently purchased a mini computer from aliexpress. It's quite powerful, and much more cost effective than renting Amazon EC2 instances. It sits near my router in my apartment, constantly on 24/7, sipping just 10 to 15W.

I have a regular internet service provider (ISP) that I pay monthly. Most importantly, I do not have a static IP address. Usually a static IP either costs more money each month, or is simply not an option.

What's the solution? How can I connect to my home computer/server? Dynamic DNS!

Configuring dynamic DNS

Okay, so I have a domain name, a home internet service provider (ISP), a router, and a home server (the mini computer). I do not have a static IP. But I want to consistently connect to my home computer/server from a remote source (such as from my phone, or from my laptop while traveling).

I registered my domain through Google Domains, so let's start there. You may have to do something similar through the settings wherever you registered your domain.

In the Google Domains section there's an option to set up dynamic DNS for a given domain name. You just specific the subdomain (I named mine 'scooter' as seen below) and pointed it to one of my domain names that I had registered with Google Domains.

Next I went to my home router, which is a TP-LINK Archer C7 and found the section for Dynamic DNS. I was hoping it would be easy enough to just point it to my domain name with the username/password that Google Domains created for me.

Unfortunately TP-LINK isn't very flexible. They expect users to use No-IP, Dyndns, or Comexe for their Dynamic DNS needs.

Fortunately, Google Domains is much more flexible. They let you use a client or their API to update your dynamic DNS.

Okay, so maybe I'll try the DDclient, since that looks to be a supported client.

Using DDclient for Dynamic DNS

You can learn about DDclient here. Since I was running an Ubuntu operating system, I chose to use the apt-get package manager.

Success!

DDclient is a neat piece of software that can detect when my IP address changes (such as when my ISP randomly decides to rotate it). DDclient then transmits the new IP address to Google Domains, so whenever I visit scooter.mydomain.com it knows which IP address to route the traffic to. Yay!

January 2018 update

I've switched internet service providers and domain names a few times since I originally set this up. The original setup is no longer working, so I want to get it functioning again.

Reenable Dynamic DNS on Google Domains

I'll use a "naked" domain so the @ symbol in place of a subdomain. A naked domain is like example.com instead of www.example.com

Note that the data column is blank because the ddclient software hasn't told Google Domains what the IP address is.

This is the username and password that Google Domains generated. My domain name is at the bottom with the "naked" prefix @. I think I could use the Google Domains protocol since ddclient supports it, but I'll skip that unless I run into issues with the dyndns2 protocol.

Test it out

I'll just run it once (no daemon or service) with the debugging turned on