Projects, Reviews & News

Free dynamic DNS for Raspberry Pi

Raspberry Pi + DNS dynamicNo matter which services your Raspberry Pi is running you will want it to have a static address for global access, which is done by setting up a dynamic DNS service.

In this guide I describe the steps you need to complete in order to set up a free dynamic DNS service on your raspberry Pi (yes, this also works for Raspberry Pi 2), so that you no longer have to worry about whether your external IP address changes once in a while. Whenever it changes, the dynamic DNS makes sure that your chosen website URL will always resolve to the current external IP of your Raspberry Pi.

As I set up my Raspberry Pi Mumble server, I needed to have a static web address for everyone else to access it. It would be very troublesome having to tell everyone about it every time my dynamic IP changed.

After a bit of research I decided to go with the free service provided by, as it is both free to use and easy to set up.

Step by step guide

Here is how to set up the free dynamic DNS service.
It should work just as well with other linux systems than Raspbian on the Raspberry Pi.

  1. Create a user profile at the dnsdynamic website.
  2. Choose to “add a new domain” when logged in on the dnsdynamic website.
  3. Open a terminal on your Raspberry Pi and install the update service:
    sudo apt-get install ddclient
  4. If you are presented with a configuration wizard, just go through it and put in some random text.
    (We will overwrite this in the configuration file anyway)
  5. Edit the configuration file /etc/ddclient.conf and replace everything in it with this:
    # Configuration file for ddclient generated by debconf
    # /etc/ddclient.conf
    daemon=60                        # check every 60 seconds
    syslog=yes                       # log update msgs to syslog
    mail=root                        # mail all msgs to root
    mail-failure=root                # mail failed update msgs to root
    pid=/var/run/        # record PID in file.
    ssl=yes                          # use ssl-support.
    use=web, # get ip from server.        # default server
    login=YOUR-LOGIN                 # your login
    password=YOUR-PASSWORD           # your password,       \
    protocol=dyndns2                 \
  6. Edit the three placeholders YOUR-LOGIN, YOUR-PASSWORD and YOUR-DOMAIN and replace them with your own.
  7. Save the changes made to the config file, and restart the Raspberry Pi.
  8. Remember to configure your router to forward the necessary ports to your Raspberry Pi.
    (port 80 for web server, 21 for ftp, 64738 for default mumble, etc.)

If everything is working as intended, you should see the global IP of your Raspberry Pi automatically set on the dnsdynamic website, under Manage -> Edit domains.

Now you can access your Raspberry Pi services at the domain name you chose with instead of your global IP address. Should your global IP change, the daemon will automatically detect this and make the domain point to the new global IP instead. The users will never know that the IP has changed, since they only see and use the domain name.

If you have another domain you want to use instead of the ones provided by dnsdynamic, simply configure the DNS of your other domain to do a CNAME forward to your dnsdynamic domain.

Checking for IP changes every 60 seconds may be a bit overkill in some cases. You can change the daemon=60 to eg. daemon=300 in ddclient.conf to check for IP changes every 5 minutes instead.

By at .


  1. Marc Girod's Gravatar Marc Girod
    October 30, 2016    

    I had this setup working until my network provider upgraded my modem.
    Since then, I’ve not been able to ssh to my Raspberry Pi using the dyndns address anymore.
    I can ssh to it on my LAN, and it does update its address on the dyndns site.
    How can I debug the issue?
    Also, I got one attack record (?) in /var/log/auth.log:
    Oct 30 16:23:39 Berry314 sshd[3229]: Invalid user admin from
    Does this mean that some packets get forwarded?

    • November 14, 2016    

      Remember to forward the necessary ports through your new modem. It would seem that there is some hole through. What about if you try to SSH directly to your current public IP?
      Note that you may experience some inconsistencies if you try to connect from within your home network to your public IP.

  2. Antony's Gravatar Antony
    March 21, 2016    

    Very useful! Thank you! I have one more question, I wish you can help me! I bought my Raspberry PI one year ago, and till now everything was okay with it. I have never complained on it before! Last week I started to remark that red light-emitting diode became blink! I know that it is not normal and sometimes it can just stop light! I don’t know what to do?My friend said that it can happen time to time and the best way is to replace light-emitting diode but I am sure that it is very difficult and for me unreal. The first reason is that I can’t find exactly red light-emitting diode. I am used to buy hardware here but unfortunatly they have nothing! Also I looked at amazon but nothing too!(((((((

  3. PP's Gravatar PP
    February 10, 2016    

    Just did the same with, took 2 minutes to register and setup on my Raspian

  4. panas's Gravatar panas
    March 13, 2015    

    I have problem register to the i make an account and i dont get a confirmation email

    • March 15, 2015    

      Have you checked your spam folder?

      Otherwise I can’t really help, as I am not involved with dnsdynamic.
      I had no problems when registering.

    • Ken's Gravatar Ken
      April 16, 2015    

      Tried corporate email as well as hotmail, no email from them after over 24 hours.

    • M's Gravatar M
      June 21, 2015    

      Same here, no email

  5. Michael's Gravatar Michael
    October 30, 2014    

    I’m getting an error when trying to ssh on to the server.

    ddclient[2163]: WARNING: cannot connect to socket: IO::Socket::INET: Bad hostname ‘’

    any ideas why?

    • gopi's Gravatar gopi
      December 18, 2014    

      Try changing it to “”

      • Joe's Gravatar Joe
        January 7, 2016    

        Try port forwarding

  6. David's Gravatar David
    June 24, 2014    

    Good stuff Mikkel…very good.

    I´ll test it today on my Raspberry Pi, but it seems to be a good configuration.
    I notice that line “, \” may be deleted, isn´t it? Because you have specify it before.

    Another question: mail=root sends mail msgs to root but, what messages?

    Thanks a lot

    • June 24, 2014    

      Hi David,

      I can see what you mean with the line appearing twice. I haven’t tried deleting one of them. If you come to a conclusion, please let me know the result.

      I haven’t used the mail functionality, but i believe that you can have ddclient send out an email to given adresses eg. every time a new IP is registered.
      You would probably have to configure e-mail settings in linux directly for the user, or just add an e-mail address to the user profile. I don’t know for sure.

      Glad you find my post useful

  7. Michael's Gravatar Michael
    March 26, 2014    

    Thx for the info on how to setup the ddns which I’ve done it.
    Now the challenge is, it never update to the ddns site every time the IP changed.
    Any solution on this matter?
    Appreciate your reply very much!
    thank you!

    • March 26, 2014    

      You need to get the ddclient installed and running on your Raspi, so that it can verify the current public IP at the time interval you set.
      If the ddclient has internet connection and is correct set up, it will then automatically change the setting in the profile on dnsdynamic.
      Any problem in the configuration of the ddclient will result in failure to update the ddns entry automatically.
      Note that this method only applies to the public IP, not to your local 192.168.x.x
      Hope this helps… =)

  8. November 30, 2013    

    Working fine on rasbian wheezy using: ddclient 3.8.0-11.5
    After following this guide:

    it made ssh over LAN easy. Thanks again!

  9. Phil's Gravatar Phil
    November 24, 2013    

    I am getting warnings that the client from dnsdynamic (windDNSdynamic.exe) is malicious. This website seems to confirm it:

    Can anyone confirm if this true?


    • November 24, 2013    

      Hi Phil,

      I don’t know anything about the windows client.
      I haven’t used it, since you do not need it if you just want to use their dynamic DNS service on a Linux system.

      All Linux user should thus be safe already, but i certainly hope that their windows client does not contain anything malicious.
      Maybe it is flagged because it gathers information of your network connection (which it needs in order to handle the dynamic DNS)?

      If anybody knows, please share with the rest of us =)

  10. Erik's Gravatar Erik
    October 28, 2013    


    Thank you very much for this great explanation … works perfectly.
    One question though. I have my Raspi switched on all the time and of course the Ip address changes quite regularly.
    Where could I find, or how could I do, so as to put the new Ip address to the dnsdynamic website? Looks like it cannot to it by itself and a reboot usually solves the situation … which I do not want to do!

    Thank you for your comments,

    • October 28, 2013    

      If set up correctly, the daemon will submit the current IP of your Raspi at a predetermined interval. You define the interval in the config file as described.
      Usually your IP does not change very often, as long as you keep your main router turned on as well…

  11. October 22, 2013    

    Thanks for the tips! I used this guide to set-up my RaspberryPi ( with dynamic DNS. This is one of the easiest guides to doing so on the internet!

  12. Emir's Gravatar Emir
    September 26, 2013    

    Great post. Love RPI. I am using to manage my dynamic IPs. It is very simple to add one curl command to crontab like this one:
    curl ‘’ –user ‘PublicKey:SecretKey’ -X POST and it updates the IP without any custom packages isntalled.

  13. July 15, 2013    

    Check out this simple steps for setting up Dynamic DNS for free (using FreeDNS) on your Raspberry Pi or any Unix system (Debian based)

  14. June 6, 2013    

    You can also use No-IP for free dynamic DNS.

  15. Marco's Gravatar Marco
    April 16, 2013    

    Hey, I still can’t connect to my pi over the internet. It works fine over the local network (with local ip). Im a complete beginner with this stuff, would I need to forward my ports ? if so how would I do that ?

    • April 16, 2013    

      Several things could be the issue, but if you haven´t done any port forwarding that is probably it.

      My guess is that your Raspberry Pi is connected to a switch or router alongside your PC, etc.
      Seen from outside your local network ( from the internet) you will have only a single IP address, which is that of your router.
      If you do not configure your router to do so, it won’t know which one of the attached devices it should forward specific incoming traffic to.

      You will thus need to log in to your router or switch and configure it to forward all traffic on each port for which it has a service (eg. port 80 for web server, 21 for FTP, 64738 for default mumble).
      A good place to start is by finding your router on this list and follow the guide:

      Port forwarding can be a pain to set up correctly, but give it a try and see if it works for you.

Leave a Reply to Antony Cancel reply

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