Setting it up on ubuntu with Namecheap
This guide assumes that you have an account on Namecheap already with a domain and dynamic DNS enabled.
- Install ddclient:
sudo apt install ddclient
- No need to fill out properly the forms while setting it up, we will change the configuration files anyway
- It will create two files based on what you chose/entered during setup:
/etc/ddclient.conf
and/etc/default/ddclient
- First let's edit
sudo nano /etc/ddclient.conf
with the following configuration:use=web, web=https://dynamicdns.park-your-domain.com/getip protocol=namecheap server=dynamicdns.park-your-domain.com login=your.domain password=your DDNS password @ # Updates your domain, you can also use the wildcard character "*" that will update all your domain
- Now let's edit
sudo nano /etc/default/ddclient
- Set
run_daemon
totrue
- and
daemon_interval
depending on how frequently you want ddclient to check and update your IP# Configuration for ddclient scripts # generated from debconf on Thu Jun 9 20:42:11 CEST 2022 # # /etc/default/ddclient # Set to "true" if ddclient should be run every time DHCP client ('dhclient' # from package isc-dhcp-client) updates the systems IP address. run_dhclient="false" # Set to "true" if ddclient should be run every time a new ppp connection is # established. This might be useful, if you are using dial-on-demand. run_ipup="false" # Set to "true" if ddclient should run in daemon mode # If this is changed to true, run_ipup and run_dhclient must be set to false. run_daemon="true" # Set the time interval between the updates of the dynamic DNS name in seconds. # This option only takes effect if the ddclient runs in daemon mode. daemon_interval="60"
- Set
- Test your configuration:
sudo ddclient
- You should see something like:
SUCCESS: updating @: good: IP address set to X.X.X.X
- You should see something like:
- Restart ddclient and check its status to see if everything is properly:
sudo service ddclient restart
sudo service ddclient status
- If you get a warning/error about the cache, simply delete the file and restart ddclient
sudo rm /var/cache/ddclient/ddclient.cache
sudo service ddclient restart