Friday, September 7, 2018

How to set up no-ip.com dynamic dns on openelec Kodi

Google didn't find and answer for this question, instead I got a lot of hits about installing the no-ip duc (dynamic update client) on Raspberry Pi. I want this on my Kodi box so I can get my Google Home devices to control Kodi. The first step is getting a dynamic dns going so the IFTTT servers can find me. Here are the details:

First, set up a free account at noip.com. All you need is a valid email address, a password, and a domain name that you can make up on the spot. Write those down for later use.

Next, install the no-ip duc client on the Kodi box:

  1. ssh root@ip of your Kodi, should be in /storage by default
  2. mkdir noip
  3. cd noip
  4. download the client: wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
  5. unzip it: tar -xvzf noip-duc-linux.tar.gz
  6. cd /storage/scripts
  7. copy the binary to the scripts directory: cp /storage/noip/noip-2.1.9-1/binaries/noip2-x86_64 .
  8. create the configuration file: ./no-ip2-x86-64 -C -c ./no-ip2.conf
  9. answer the questions
You can now delete the /storage/no-ip directory if you want.

Start the no-ip client:

  1. noip2-x86_64 -c /storage/scripts/no-ip2.conf
  2. check that it's running: ps ax | grep noip
Set up auto start so no-ip client starts when Kodi starts:
  1. cd /storage/.config
  2. nano autostart.sh
  3. between the brackets ( and ) add: cd /storage/scripts;noip2-x86_64 -c /storage/scripts/no-ip2.conf
Configure your router to forward port 8245 TCP in both directions.

Check that it works by pinging the domain name you set up on the noip.com website:

ping myname.hopto.org

You should get a response.

27 Sep 18, An update:
I've had some trouble with the autostart.sh script, mostly because things don't run as they should. It turns out that full paths are required, and each command should be by itself. So for this, I added this line, all by itself, in autostart.sh:

(sleep 30;nohup /storage/scripts/noip2-x86_64 -c /storage/scripts/no-ip2.conf &) &

The 'sleep' makes the script wait for a bit so things before it actually run, 'nohup' makes the command run without hanging up, the '-c' parameter has the full path to the configuration for noip.

I wish they'd be consistent with noip or no-ip, I don't care which, but using both is a little confusing.
 
 



No comments: