How To Make the No-IP DUC Automatically Start At Boot On A Raspberry Pi

If you look at the README file inside the noip folder, you will see that, in order to have the No-IP Dynamic Update Client automatically launch at boot on Linux, you have to copy and paste a script inside the relevant rcX.d folder inside /etc/init.d. However, Raspbian does not have this folder, so the procedure is slightly different if you are using a Raspberry Pi (you can find some information here).

These are the steps to follow:

  1. First of all, make sure only root can handle the noip process:
    sudo chmod 700 /usr/local/bin/noip2
  2. Create a folder to store the autostart script:
    sudo mkdir /opt/noip-2.1.9-1
  3. Create a file for the startup script:
    sudo nano /opt/noip-2.1.9-1/raspbian_autostart.sh
  4. Paste this script inside (it’s the one that you find in the noip folder, with the second line already uncommented and no other modifications):
    #! /bin/sh
            . /etc/rc.d/init.d/functions  # uncomment/modify for your killproc
            case "$1" in
                start)
                    echo "Starting noip2."
                    /usr/local/bin/noip2
                ;;
                stop)
                    echo -n "Shutting down noip2."
                    killproc -TERM /usr/local/bin/noip2
                ;;
                *)
                    echo "Usage: $0 {start|stop}"
                    exit 1
            esac
            exit 0
  5. Set it as executable and only readable and writeable by root:
    sudo chmod 700 raspbian_autostart.sh
  6. Open the rc.local file:
    sudo nano /etc/init.d/rc.local
  7. Add this line at the end of the file:
    /opt/noip-2.1.9-1/raspbian_autostart.sh
  8. Reboot the Pi:
    sudo reboot
  9. Check if the DUC is running with
    /usr/local/bin/noip2 -S

6 Comments

  1. DO NOT FOLLOW LINE 7. It will brick your boot.

    Add this line at the end of the file:
    1
    /opt/noip-2.1.9-1/raspbian_autostart.sh

    • If this is indeed as you say, please report that to the guys over at noip, as the autostart script is provided by them.

  2. Hey, thanks for the tips, but that doesn’t work for me. Why not just adding sudo /usr/local/bin/noip2 directly to crontab with @reboot specified?

    • Hey Boris! That’s a good point, if I get some time to test this I will do it and report my findings. For this article, however, I wanted to stay as close as possible to the official documentation. Because at the time of writing this post, they recommended using the autostart script, I decided to follow that method.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2018 Daniel's TechBlog

Theme by Anders NorénUp ↑

%d bloggers like this: