Skip to content

Dynamic DNS Quickstart

  1. Audience
  2. Setup an API key
  3. Create a Zone
  4. Create a hostname
  5. Create a Group
  6. Create a DDNS Key
  7. Issue an update

Audience

This guide is for new users that need to set up a hostname and manage its address via an update device such as a camera, router, or software updater. In this guide you will create API and DDNS keys, bootstrap a new zone and hostname, then update that name’s address via HTTP Update Protocol. You will use both the No-IP DNS API and the HTTP Update Protocol.

Setup an API key

First, sign into your No-IP account and navigate to the API Key management page. Here you will create your first API Key.

When creating an API Key, you must give it a label. This is for your own reference to identify the particular key. You may also give it an optional expiration date. The key will be invalid after this date.

Note: The API Key will only be shown once. If you lose it, you will have to generate a new one. No-IP does not store the original key.

For the purposes of demonstration, we will assume you are using a Bash-like shell with cURL and jq available.

Terminal window
# Assign the API key you just generated. It should begin with 'sk_'
API_KEY="sk_..."

Create a Zone

First, we will create a new zone if you do not already have one. We’ll use sub.example.com in this guide. Replace it with your own domain.

Terminal window
$ curl -i -u ":${API_KEY}" \
--json '{"name":"sub.example.com"}' \
https://api.noip.com/v1/dns/zones
HTTP/1.1 201 Created
Server: nginx/1.25.4
Date: Thu, 28 Mar 2024 21:50:59 GMT
Content-Length: 0
Connection: keep-alive
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
access-control-allow-credentials: true
X-Request-Id: pImWy-nHLHULk2V2n0wPvU

List the zones on our account to see the new zone we’ve created:

Terminal window
$ curl -sSf -u ":${API_KEY}" "https://api.noip.com/v1/dns/zones" | jq
{
"page": {
"offset": 0,
"limit": 50,
"total": 1
},
"data": [
{
"name": "sub.example.com",
"zone_type": "primary",
"nx_ttl": 1800,
"is_shared": false,
"is_owner": true,
"publication_state": "publishrequested",
"is_write_prohibited": false,
"created_at": "2024-03-28T21:50:59Z",
"updated_at": "2024-03-28T21:50:59Z"
}
]
}

Create a Hostname

Create a record for myhost.sub.example.com.

Terminal window
$ curl -i -u ":$API_KEY" \
--json '{"name":"myhost","rrsets":[{"dns_type":"A","rdata":[{"value":"0.0.0.0"}]}]}' \
https://api.noip.com/v1/dns/records/sub.example.com
HTTP/1.1 201 Created
Server: nginx/1.25.4
Date: Thu, 28 Mar 2024 22:07:53 GMT
Content-Length: 0
Connection: keep-alive
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
access-control-allow-credentials: true
X-Request-Id: wIFvWcq6WsYNnwczUNAiUU

View the RRSet you just created. An RRSet is the values that are served for a DNS record name and type.

Terminal window
$ curl -sSf -u ":$API_KEY" "https://api.noip.com/v1/dns/records/sub.example.com/myhost/rrsets" | jq
{
"page": {
"offset": 0,
"limit": 50,
"total": 1
},
"data": [
{
"name": "myhost",
"dns_type": "A",
"ttl": 1800,
"metadata": {},
"rdata": [
{
"value": "0.0.0.0",
"label": "gwoNEVtjNU3n"
}
],
"updated_at": "2024-03-28T22:07:53Z"
}
]
}

Create a Group

Next, create a group. The group will be attached to a DDNS Key and used to update the value of one or more A or AAAA records. You may call your group whatever you may like. In this example we will use the name mygroup.

Terminal window
$ curl -i -u ":${API_KEY}" \
--json '{"targets":[{"name":"myhost","zone_name":"sub.example.com"}]}' \
https://api.noip.com/v1/dns/name-groups/mygroup
HTTP/1.1 201 Created
Server: nginx/1.25.4
Date: Thu, 28 Mar 2024 22:14:07 GMT
Content-Length: 0
Connection: keep-alive
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
access-control-allow-credentials: true

View the group:

Terminal window
$ curl -sSf -u ":${API_KEY}" "https://api.noip.com/v1/dns/name-groups/mygroup" | jq .
{
"data": {
"group_name": "mygroup",
"targets": [
{
"name": "myhost",
"zone_name": "sub.example.com"
}
]
}
}

Create Credentials to Update the Group (DDNS Key)

Set up a DDNS Key. This is a unique credential used to update the values of a group of records. We will pass in the name of the group we created earlier.

Terminal window
$ curl -sSf -u ":$API_KEY" \
--json '{"group_name":"mygroup"}' \
https://api.noip.com/v1/account/client-keys
{
"credentials": {
"username": "example-generated-username",
"password": "example-generated-password"
}
}
# assign the output of the previous command to a variable in this format for later use.
$ DDNS_KEY="example-generated-username:example-generated-password"

Issue an Update

The credentials created in the last step can be used with any device that integrates with No-IP. Download one of No-IP’s update clients or use the credentials in a hardware device such as a camera or router. Use the hostname “all.ddnskey.com”. Read more about setting up an updater in our knowledgebase.

For integrating the HTTP Update Protocol into your system please see our integration information.

Testing with Curl

The credentials may also be used directly with the HTTP Update Protocol.

Terminal window
$ curl -i -u "${DDNS_KEY}" "https://dynupdate.no-ip.com/nic/update?hostname=all.ddnskey.com&myip=2.3.5.8"
HTTP/1.1 200 OK
Server: nginx/1.25.4
Content-Type: text/plain; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache, private
Date: Mon, 01 Apr 2024 21:02:50 GMT
good 2.3.5.8

We received a “good” response meaning that our group was updated. If the same response is sent again without a change to the IP address we should see a “nochg” result.

Terminal window
$ curl -i -u "${DDNS_KEY}" "https://dynupdate.no-ip.com/nic/update?hostname=all.ddnskey.com&myip=2.3.5.8"
HTTP/1.1 200 OK
Server: nginx/1.25.4
Content-Type: text/plain; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache, private
Date: Mon, 01 Apr 2024 21:03:09 GMT
nochg 2.3.5.8