Maybe you are a GoDaddy user, maybe you have heard about it. Nowadays, GoDaddy has become in one of the most important companies which helps webmasters and developers organize and host their websites easily and economically.

But what you have maybe noticed is that there is no DDNS for updating the ‘A’ Record IP. If you do not know what an ‘A’ record is, basically it works like a routing way for finding the IP associated with a server. For example, suppose that you have bought the domain: example.com but your server is running behind a dynamic public IP so after some time it changes. If you want people to access your website through that domain, you will have to make that domain point to your actually public IP, having this value updated whenever it changes.

As you may have notices, this is a “hard” work as you must be looking for any change on your public IP for updating the DNS ‘A’ records. Here it comes pyGoDaddyUpdater.

godaddy

pyGoDaddyUpdater is a Python application that will allow you to setup a custom GoDaddy DDNS service, running in the background. It has several possibilities:

  • Specify the domain to be updated.
  • Specify which ‘A’ record (by name) will be changed.
  • The time interval between checks.
  • Run the daemon as a specific user (and group).
  • Setup more than one domains and names.

What is the main difference between other options? Basically, its main capability is that can be executed as a daemon by itself, without your interaction. That is, after you have successfully register your data, the script will start running in the background until it is interrupted. In this way, it can be easily stopped and, in addition, you can create a new boot service so it will start when your server wakes up.

In order to start using it, you have to:

  1. Go to https://developer.godaddy.com/getstarted and generate a new key pair that you will use as a developer account. The key and secret you will need are available at this link. The environment you will need to create and use is the Production one.
  2. Keep safe both key and secret as we will use them in the next execution.
  3. Install Python 3 and pip on your system, as we will use them for running the service.
  4. Install pyGoDaddyUpdater using setup.py or pip:
1
sudo pip3 install pyGoDaddyUpdater

For setup.py instructions, please refer to the official GitHub repository.

  • Get prepared for the first execution. You will need: domain name, ‘A’ record namedeveloper key and secret key. Then, run the program as follows:
1
[sudo] godaddy_ddns --domain example.com --name @ --key YOUR_KEY --secret YOUR_SECRET

The sudo value is in brackets because it depends on your configuration, as you may need or not it. In addition, there are several options you can define for a better experience, as the update interval time or the user (and group) that will be executing the command. Please refer to the official GitHub repository for more information.

  • After running the program, you can check the logs and the pid at the following locations, if you did not change it:

    1
    2
    3
    
    /var/log/pygodaddy.log
    
    /var/run/pygodaddy.pid
    
  • The next time you run the script, you will need no arguments as the program stores your preferences for you.

And that’s it! Now you have set up a Dynamic DNS service that will be running in background until you restart your computer. You can also define an init.d script that will be run on boot. You can have a look at an automatic tool I developed which will allow you to create on boot scripts interactively. In addition, here you have the project link in which you can find more information about how pyGoDaddy works and extra useful options.

Do not forget to share if you liked it! 😉