How To Set Up DuckDNS On TrueNAS Core


May 6, 2021
Sorry if this is in the wrong section, but I spent a little while trying to figure this out myself and wanted to post my solution as I can't really find any good explanations on how to set this up.

First off, you want to go to DuckDNS, log in, and create your subdomain. For this example, I used "mickmodnas".
On the top of the page, under your e-mail there is a line that says "token" before a long string that looks something like this: 47888478-6969-4321-1234-4048cc51337 (This is not a real token BTW), you want to copy this and keep it handy.

Now let's get started with setting it all up.
  1. Open the web UI dashboard on your computer.
  2. On the left side of the screen, click "Tasks" then click "Cron Jobs" from the dropdown.
  3. Click the "Add" button.

  4. a. In the "Description" field, add what you want to help you identify it being your DuckDNS cron job. I use "DuckDNS Update" on my NAS.
    b. In the "Command" field, add the script I put below.
    c. In "Run As User", put in "nobody".
    d. Select how often you want it to update the DNS, I have only tested this with 1 minute past an hour. I like updating the DNS every 3 hours.
    My update schedule is:
    Minutes: 1
    Hours: */3 (Every 3 hours)
    Days: * (Every day)
    Leave the month/weekday fields empty to update every day the whole year.
    e. Click "Done" in the Schedule window, then click the "Submit" button.
  5. You can now test the script by clicking on the arrow next to the cron job you just made, and clicking "Run Now".
  6. You are now finished!