Social Icons

Setup Dynamic DNS / DynDNS for *FREE* on Raspberry Pi / Ubuntu

Update: You can try our newer and easier guide which uses here

You might have recently setup your Raspberry Pi or your Linux box as a 24 x 7 torrent downloader, or a small Web server to host your own website. And just then you realize that your ADSL or Cable Internet connection has a dynamic IP address which changes frequently and every time you reconnect. Thus, it becomes hard to access your box with a fixed Domain name or IP address.

To solve this problem you can setup a Dynamic DNS which will update your IP to a DNS name everytime it changes and you can access you hosted website, or ssh into it to monitor torrent downloads with ease.

While there are many paid dynamic dns service providers available, but here you will see one way to do it for **FREE** [Thanks to]

Step 1
Register for a Free domain at
[We will take in this guide]

Step 2
Logon to FreeDNS (where you just registered) and goto
Or, simply click on "Dynamic DNS" link from the left navigation menu

Right click on "Direct URL" and copy the URL and paste it somewhere.

You should notice a large and unique alpha-numeric key in the URL, make a note of it as shown below:[alpha-numeric-key]

Step 3
Install inadyn using the following command:
sudo apt-get install inadyn

Configure inadyn using the below steps:
sudo nano /etc/inadyn.conf

And add the following contains in it replacing the actual values:
--username techhome
--password mypassword
--update_period 3600
--forced_update_period 14400
--alias,alphanumeric key

Step 4
Now, we need to ensure that the DNS updater (Inadyn) runs automatically after every re-boot

export EDITOR=gedit && sudo crontab -e

Add the following line:
@reboot /usr/sbin/inadyn

Step 5
Reboot system and then run the following command to ensure inadyn is running:

ps -A | grep inadyn

Now your host is ready and up for accessing from internet...

You can trying ssh-ing from another computer over the internet

Or, if any web server is running, then simply browse to

Or, you can just ping it to test ping

To check the logs you can use this:
more /var/log/messages |grep INADYN

This has been re-tested to be working perfectly with inadyn 1.96.2-1 on Raspbian 3.12.22+


  1. I would recommend to use as a Dynamic DNS service. Ir provides very simple API to update DNS record with your public, or any other IP. You need cron and curl, which are most likely already installed. Just execute crontab -e and enter a line like this:

    */10 * * * * curl '' --user 'PublicKey:SecretKey' -X POST

    It will update your IP on 10 minutes, or less if you change the first number. Also you can configure your own domain, or select a free subdomain under

    1. awesome api... no issues for now... very fast...

    2. Hi there. Thanks for the tip. I'm a super noob when it comes to CRON and I want to use this to keep a Raspberry Pi Domoticz server updated. I'm assuming you change the 'me' wording to the domain you registered with dns4e? When saving the Cron file, do you have to give it a name or just accept the defaults?

    3. Awesome! Simple and working 100%!

    4. Thank you, useful!

    5. Received email from DN4E that "DNS4E will be working till April 15, 2015 and will stop providing services indefinitely". I switched to instead. Free,IP update time is less than 1 miunte,free subdomain and custome domain names supported.

  2. Good tutorial, but I didn't understand how to register for a free domain with FreeDNS. I created an account and then followed your link, but there was no domain created. Could you please explain what you mean by "Register for a free domain"? There are quite a few options there.

    1. From the left hand navigation menu on FreeDNS website click on subdomain, and choose a subdomain of your choice of Type: A

      Your address would be like and this will point to your public IP address of your RasPi

    2. Hello Abhishek,

      I read your really useful articles about creating owncloud for Raspberry Pi. Since I wanted to access OwnCloud through Dynamic DNS from, I first obtained one domain name based on your article. I can ping to this IP address and domain name fine. But I cannot login to Owncloud,

      INADYN gives following error messages:

      W:INADYN: Main: error ‘RC_DYNS_RSP_NOTOK’ (0x48).
      INADYN: Started ‘INADYN version 1.96.2’ –dynamic DNS updater.
      I:INADYN: IP address for alias ‘’ needs update to ‘xx.yy.zz.uu.vv’
      W:INADYN: Error validating DYNDNS svr answer . Check usr, pass, hostname, abuse,…!
      W:INADYN: DYNDNS Server response:#012HTTP/1.1 200 OK#015#012Server:nginx#015#012Date:….

      And errors in nginx_start_errors:

      nginx: [emerg] bind() to failed (98: Address already in use)
      nginx: [emerg] bind() to failed (98: Address already in use)

      What am I doing wrong? Any help will be highly appreciated. Thank you.

    3. Hello,

      There are couple of things that might go wrong...
      1. Check you have performed everything correctly as in Step. 4
      2. If you see everything is right as mentioned in Step.4 then try the following:
      Uncomment the following line from nginx.conf
      pid /var/run/;

      This is probably due to some issue with a few versions of nginx scripts,though I haven't faced this but it appears there are many other users over internet who are troubled.

      Good Luck!

  3. Thanks for your tutorial. My problem is that I paid money for my standard dns with DYN, two weeks ago and still I have not managed to use treir service. Can you help?

    1. I have not used the paid service from dynDNS or however the concept should be same. You can try reaching out to their helpdesk / support since you're a paid / premium customer.

  4. You might want to note that inadyn has to be installed first (and isn't installed in raspbian at least). Apart from that, this worked like a charm, thanks.

    1. You're right... I missed out on mentioning the steps about installing inadyn. The post is updated now. Thanks for the note!

  5. Does this require Port Forwarding to be configured on the router to which RPi is attached?
    I have followed the steps and trying to ssh into RPi from an external computer (different network). I am getting "connection refused" message. I also tried and found out the port 22 open test is always timed out. Any insights?
    What is your setup that works perfectly?

    1. Yes if your Raspberry Pi is behind a router you will have port forward from your router to your device.

    2. What port do I need to foward?

    3. if your ssh is running on port 22 (default) then you need to forward that to any unused port on your router. You should try connecting to the port which you have forwarded from your router to your raspberry pi for ssh protocol.

      For more details on port forwarding please go through some tutorials on google, that might give you a detailed insight.

  6. there is no /etc/inadyn.conf in my raspberry even after I installed the inadyn... whats wrong?

  7. hey , i dont understand what --alias,alphanumeric key?

    can u share me about alphanumeric key? where i find it

    1. You will get your unique alpha numeric key from step 2 mentioned.

  8. Great post and thanks for continuing to answer questions.
    Step 4 re-opens GNU Nano, which is full of text. Where do I add the extra reboot line?

    1. Add the line at the end of the file, no need to change anything existing.

  9. I can't find: "Right click on "Direct Link" and copy the URL and paste it somewhere" anywhere. Have they change the site since you made this guide. Or am I blind :/ Thanks for great guides!

    1. I have updated that section of the guide with more clarity, Hope this helps you better now.

  10. Setup and config works like a charm with, but keep getting this error:

    Apr 17 23:42:44 raspberrypi INADYN[1936]: W: DYNDNS: Error 'RC_IP_RECV_ERROR' (0x15) when talking to IP server
    Apr 17 23:42:44 raspberrypi INADYN[1936]: W:'RC_IP_RECV_ERROR' (0x15) updating the IPs. (it 3)

    Do you know if this is due to Inadyn is using to find my IP-address and this service is responding incorrectly?

  11. Iam getting the same error on an newly updated raspian system:

    INADYN:IP: Error 0x68 in recv()
    W: DYNDNS: Error 'RC_IP_RECV_ERROR' (0x15) when talking to IP server
    W:'RC_IP_RECV_ERROR' (0x15) updating the IPs. (it 3)

    I think this is a bug in Inadyn...

  12. I am getting same error. Is there other program which could be substituted for Inadyn?

  13. I got 2 errors in the log

    Sep 10 16:21:14 raspberrypi INADYN[1910]: INADYN:IP: Error '0xb' resolving host name ''
    Sep 10 16:21:14 raspberrypi INADYN[1910]: W: DYNDNS: Error 'RC_IP_INVALID_REMOTE_ADDR' (0x12) when talking to IP server

    what's wrong?

  14. i can open my surocam program "webiopi" offline. iplocaladdr:8000, then i online use ***** or ***** is not working. when i ping ***** its working.. can you help me to fix it.?

    1. Check if port forwarding is done properly in case you have a router in between.

  15. It's also free at

  16. Are you able to have 2 different alias lines in the inadyn.conf??

    Is it just a case of entering -

    --alias,alphanumeric key
    --alias,alphanumeric key2

    into the file?

  17. Being a newbie, this is an Interesting thread.

    Can this be used also, having a virtual server setup on the RPi, reporting dyn IP for all the multiple own domains I have on the virtual server?


  18. I had to make some changes to the inadyn config to get it working:

    # Service provider
    # Hostname
    # Only use url, not alphanumerical key.