Install ddclient on OS X

DynDNS LogoThe DynDNS OS X client has always seemed a bit clunky to me and outdated so I was looking for another way to use DynDNS with out that client. Thinking back I remembered that I used ddclient on one of my linux boxes from the command line a long while ago so I started looking into how I could implement that on my Macbook Air. I saw that Homebrew had a ddclient package so I got to work.

Using Homebrew to install ddclient was about as easy as it could get. I used the following simple command to install ddclient

brew install ddclient

Now that you have installed ddclient you now need to edit/create the ddclient.conf like so

sudo nano -w /usr/local/etc/ddclient/ddclient.conf

Once you are in the file you can copy and paste the following configuration settings, adjusting the login, password, and subdomain to match your information on DynDNS.

# ddclient configuration for dyndns
#
# /usr/local/etc/ddclient/ddclient.conf
syslog=yes
ssl=yes
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
server=members.dyndns.org
protocol=dyndns2
login=USERNAME
password=UPDATER CLIENT KEY (Found here: https://account.dyn.com/profile/)
SUBDOMAIN.dyndns.org

Once you have saved the config you will want to run a test to make sure that ddclient updates dyndns with your current IP by running the following command

sudo /usr/local/opt/ddclient/sbin/ddclient -verbose -noquiet

If it works properly you should see some output to the screen letting you know that your IP was updated and set to X.X.X.X (X.X.X.X being your current IP).

Once you have confirmed that it will update properly you can set ddclient to start at boot

sudo cp -fv /usr/local/opt/ddclient/*.plist /Library/LaunchDaemons
sudo chown root /Library/LaunchDaemons/homebrew.mxcl.ddclient.plist

Lastly you can start it now with the following command

sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.ddclient.plist

After following all of these steps ddclient should be all set to run automatically every 5 minutes in the background.