How to properly install No-IP Dynamic Update Client (DUC) under Raspbian

By | 30 April 2017

If you have, like me, an ISP that provides you a dynamic IP, you certainly need to use a dynamic DNS service like DynDNS or No-IP. This is important if you want to use your Raspberry Pi as a server. I personally use No-IP for historic reason since I have my free account for at least 10 years. In that post I’ll teach you how to use their official client as a service under Raspbian.

The No-IP team provides a little program called the Dynamic DNS Update (DUC) Client. DUC continually checks for IP address changes in the background and automatically updates the DNS at No-IP dynamic DNS whenever it changes. This program can be usable under Raspbian without any modifications, only the part for setting up the service is a little touchy. Follow the guide!

Compile the DUC Client

The first thing to perform is getting and compiling the client. Open a Terminal (or use a SSH client, like PuTTY) then enter the following commands:

After that, the No-IP DUC Client will ask you some information:

  • The login/email string for your no-ip.com account;
  • The associated password;
  • The preferences (like the refresh interval).

The No-IP DUC Client is now ready to be used. Time to set up the service now.

Setting up the No-IP DUC Client service

Now that you have a working DUC Client, it’s time to install the service. Doing this will allow the DUC Client to start when booting up your Raspberry Pi.

After passing all these commands, you should have the following output:

Everything is now set up!

Checking if the No-IP service is working

First of all you need to check if the No-IP service is the latest to be run by the Raspberry Pi. Enter the following command:

The output should be something like that:

Running the No-IP service in the last position avoid some problems. For example, if your network configuration is not ready when running the DUC Client, this can crash it with useless error messages. I already configured everything in the additional files provided above to solve this problem.

For checking if the No-IP DUC Client Service is running, just enter the following command:

A correct output should be something like that:

As you can see, the noip2 service is up and running!

To get more information on the noip2 instance running, enter the following command:

This will output something like:

So everything seems fine. Now you can connect to your No-IP account and check if the concerned DNS has been updated, like this:

Manage Hostnames

Manage Hostnames

Wow you did it! Enjoy 🙂

Bonus

You can check for error messages thrown at startup by running the following command:

You can control the No-IP service by using the  service command:

This command will restart the No-IP service (this command takes up to 10 seconds to be run).

References

22 thoughts on “How to properly install No-IP Dynamic Update Client (DUC) under Raspbian

  1. Dave

    Thank you for this – it worked perfectly on my Pi Zero W. I probably could’ve figured it out, but you saved me a lot of time!

    Reply
  2. Mike

    Hmm my Raspbian Jessie Lite headless does not have SRC under Local directory.

    How can i run this without errors.

    /USR/SRC
    /USR/LOCAL

    Sorry , Im new to linux

    Reply
  3. Dan

    You rock. Thank you so very much for your help. I am bookmarking your site now!

    Reply
  4. Eli

    Was looking for something like this. Thanks for the easy guide and help. I see you also included a service uninstall file. Will that uninstall just the startup service or the whole thing?

    Reply
    1. SiZiOUS Post author

      Hi and thanks for the comment! The uninstall script is just for my part, I mean it will uninstall the startup service only.

      Reply
  5. Luey

    Hi,
    First of all I want to thanks ..
    It’s work

    And now I want to ask one question ..

    How do I change/edit user name ,password,and host in Duc noip that has been installed.
    Because sometime we want to change the hostname

    Thanks

    Reply
    1. SiZiOUS Post author

      Hi, thanks for the comment! All you need to do is: sudo noip2 -C, tell me if it works or not for you. 🙂

      Reply
      1. Char

        Hi,
        We I try to use sudo noip2 -C command but our system shows the following error:
        Configuration file ‘/usr/local/etc/no-ip2.conf’ is in use by process 964.
        Ending!
        As a result, I am unable to modify the conf file.
        I tried sudo reboot, no luck
        I tried sudo shutdown -h now, no luck

        When I sudo nano the no-ip2.conf file there is a lot of unreadable characters like this:
        0.0.0.0^@^@^@^@^@^@^@^@^@^E^@�5L2JA�^@^@^@^C^A^A^@wlan0^@^@^@^@^@^@^@^@^@^@^@dXNlcm5hbWU9Y2JyaWVy

        However, the noip service is working and everything is running fine. Except, that we now need to change the noip account details to use a different noip account.

        Any clues?
        BTW: Great tutorial!
        Thanks!

        Reply
        1. Char

          For those having the same issue, I just found a workaround:

          ps -A |grep noip
          1577 ? 00:00:00 noip2
          sudo kill 1577

          After I killed the process, I was able to use the -C command and set the new account.
          Cheers!

          Reply
  6. Andrew

    Worked perfectly on my Raspberry Pi Zero W – thank you.

    Stupid question – what do I do next?

    Activate apache php mysql?

    How do I get my localhost visible at No-IP hostname URL?

    Reply
    1. SiZiOUS Post author

      It depends of what do you want to do with your Pi. 🙂 This tutorial give the ability to contact the Pi on the Internet nothing more. You can indeed install a HTTP/FTP server(s), or any other service. 🙂
      Or you can just enable xRDP or SSH to manage the Pi remotely?

      Reply
  7. steve

    worked great. i was doing n my own but couldnt get it to autostart at boot. this worked. it seems i know enough of linux to start something. finishing not so much. thanks

    Reply
    1. SiZiOUS Post author

      It was very hard to find the “sleep” part, I was getting random errors because the DUC tool was started too early (before Internet connection ready). This was a real pain to understand and that’s why I wrote this post. 🙂

      Reply
  8. Cha

    Excellent! Very easy guide.
    Please keep posting great tips for Raspberry Pi users.
    Again, Excellent!

    Reply
  9. Ian Prescott

    Hi
    Thanks for yours efforts and then to publish them. This is just what I need to do.
    I have already followed the DUC install instruction from NOIP and it installs under /home/pi/noip.
    This works Ok but must be manually start after each reboot.
    Your tut installs under /usr/local/src
    Can I just follow the instruction for setting up the DUC client service or will there be issues with file location?

    Reply
    1. SiZiOUS Post author

      I think you installed the tool without the sudo command, right?
      If you start again from scratch with the content of this post, I think you’ll have the DUC service directly in /usr/local/src, which is the right place to store this. 🙂

      Reply
  10. Pingback: Security for your Alexa-DTV – Mindless Ramblings of a Geek!

  11. Char

    Hi Again,

    How can we change the “Updating every 30 minutes via /dev/wlan0 with NAT enabled.” to 5 minutes?
    Thank you!

    Reply
  12. Andrew Long

    Hi,

    I am trying to add a hostname to the file and it does not appear to add.
    I have tried the
    sudo noip2 – C, but no results.
    It states the following:
    Configuration file ‘/usr/local/etc/no-ip2.conf’ is in use by process 29126.
    Ending!
    I am definitely not a Linux user, so any help welcome.

    Regards,
    Andrew.

    Reply
    1. Jake

      That message indicates that you currently have a noip process running. Try the following command to kill that process first:

      sudo noip2 -K 29126

      Then, try your original command again.

      Reply
  13. pop29684

    Well done! I a complete Linux/Raspbian noob but followed your advice. It works – NoIP DUC auto starts. Thank you for your work and explanation.

    Reply

Leave a Reply

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

*