Don’t loose access to your home Deep Learning server by using a Dynamic DNS Provider (free)

Categories Productivity

So I am leaving this computer mostly alone in the other end of the world, and expecting minimum maintenance, so I want a setup which does not require me to have physical access to the computer whenever something happens. So a critical aspect is that I need a Wake on LAN computer, I need to set up the Port forwarding on my router (and somebody to fix that if that ever breaks, I still have no automated solution to that), and I need to have a Dynamic DNS provider in case the IP address ever changes. I mention Deep Learning server just for the fact that I am looking for a solution to an (Ubuntu) Linux computer, rather than another OS. This is important for reasons mentioned later.

TL;DR: Use Dynu as provider with ddclient as client.

After checking out different DDNS providers, and seeing in that DynDNS – the biggest one- shut down its free tier, I have set out to test which provider is most suitable to me.

Most of these providers offer the same deal in their free tier: A couple of sub-domains addresses forwarding to your home IP address. The key difference is in the client I plan to use to keep this IP address updated. This client needs to be run as a service or daemon in the server, and check every once in a while with the provider.

I tried http://www.noip.com, which is the biggest after DynDNS. Unfortunately it did not convince me, but not for fatal reasons. Its software for Ubuntu is only an executable and does not come wrapped as a daemon or a service. I realize I could do this manually but I am mostly lazy. Also, I would prefer to use a provider which works with a package provided by one of the Ubuntu repos, because otherwise problems of dependencies or lack of support tend to arise.

I also tried www.dynu.com, and at the beginning I tried their own client, only to discover it started messing with apt-get and getting this error: The package dynuiuc needs to be reinstalled, but I can't find an archive for it.

Fortunately, they also support ddclient which can be installed by running apt-get install ddclient. They describe the set up process here. When you first install it, it will ask you for information to fill the configuration file in /etc/ddclient.conf , so don’t worry if you make a mistake in here, you will need to edit the config file anyways since the default configurations gets the IP address from the computer’s local network interface, and we want the public IP.

After you finished the installation, go edit the file /etc/ddclient.conf and follow this example given in their site:

# ddclient configuration for Dynu
#
# /etc/ddclient.conf
daemon=3600     # I only need to check every hour
syslog=yes      # Log update msgs to syslog.
pid=/var/run/ddclient.pid # Record PID in file.
use=web, web=checkip.dynu.com/, web-skip=’IP Address’ # Get ip from server. Set this option instead of 'if'
server=api.dynu.com # IP update server.
protocol=dyndns2 
login=myusername # Your username.
password=YOURPASSWORD # Password or MD5/SHA256 of password.
MYDOMAIN.DYNU.COM # List one or more hostnames one on each line.
#MYDOMAIN.COM

Once done, add ddclient to your startup applications. In Ubuntu, go to Activities and search for Startup Applications . Add a new Program and insert the following:

I did not need to include sudo in this method, and ddclient still runs without any problems.

Note that you do not need to specify the daemon time nor syslog if you already set that up in the config file.

Leave a Reply

Your email address will not be published. Required fields are marked *