The DDNS service updates the public IP with the DDCLIENT daemon in Linux.

The DDNS service I use is called DYN DNS.

ddclient is an open source DDNS update client that is compatible with many DDNS services, including Dyn.

You can easily install it through the Ubuntu package manager with the command

sudo apt install ddclient

Once installed, you will be prompted to configure a configuration file

/etc/ddclient.conf

In login you must enter the DYN username, which is not the same one you use to log in to your account. To log in to your account you must log in with your email.

In password you must enter your Updater Client Key or API key

Below password you write the dynamic DNS hostname

You can get the data from the page in settings/settings overview:

ddclient can be configured to start automatically when the server boots.

Regardless of which option you choose, the goal is for the client to run periodically in the background. When your public IP address changes, the client will detect it and send an update to the Dyn service, ensuring your domain name always points to your server.

If the program is already installed as a service, you may just need to restart it.

To view the status, stop and restart the ddclient service, use the standard systemctl commands, which is the most common service control system in modern versions of Ubuntu.

View service status

To check if ddclient is running, if there have been errors, or if it is down

sudo systemctl status ddclient

Stop the service

sudo systemctl stop ddclient

start the service

To start the service after having stopped it

sudo systemctl start ddclient

Restart the service

This is the most commonly used option after making changes to the configuration file. It’s a shortcut that stops and restarts the service in a single command.

sudo systemctl restart ddclient

Enable or disable the service

To ensure that ddclient starts automatically every time you restart the server.

Enable:

sudo systemctl enable ddclient

Disable:

sudo systemctl disable ddclient

In the images you will see that I am on a Mac, because I am connected via SSH to a PC with Linux Ubuntu Server