Skip to content

Dynamic DNS ​

GET /dns/dyndns updates the A and AAAA records of one or more hostnames. It speaks dyndns2, so routers, NAS devices and scripts can use it.

It is the only endpoint that accepts HTTP Basic Auth with your account email and password, for devices that cannot send an Authorization: Bearer header. Where the client can set a header, use an API key limited to the zones it updates, so the device never holds your account password:

bash
curl -H "Authorization: Bearer $API_KEY" \
  "https://api.gigahost.no/api/v0/dns/dyndns?hostname=home.example.no"

An API key or a scoped user needs read/write access to DNS. With no DNS access at all the API answers 403 in JSON; with read-only DNS access it answers badauth. A key limited to selected zones answers nohost for hostnames in other zones.

Endpoint ​

GET /dns/dyndns?hostname=<fqdn>&myip=<v4>&myipv6=<v6>
ParamWhereDescription
hostnamequeryFQDN, or comma-separated list of FQDNs.
myipquery (optional)IPv4 to set. If omitted, the client's source IP is used.
myipv6query (optional)IPv6 to set.

Records get a 60-second TTL.

A wrong username or password does not return a dyndns code: the API answers HTTP 401 with a JSON body. Too many failures block further attempts until the next UTC day (see Login limits).

Response codes ​

The response is plain text, one line per hostname.

CodeMeaning
good 1.2.3.4Updated successfully (the IP echoed back).
nochg 1.2.3.4No change needed, the record already points at that IP.
nohostHostname not in a zone on this account, the zone uses external nameservers, or the API key is not scoped to the zone.
notfqdnInvalid or missing hostname.
badauthThe API key or user has read-only DNS access.
dnserrInternal server error during update.
badagentInvalid IP supplied.

curl examples ​

bash
# Explicit IPv4
curl --user "[email protected]:your-password" \
  "https://api.gigahost.no/api/v0/dns/dyndns?hostname=home.example.no&myip=203.0.113.10"

# Auto-detect (uses your public source IP)
curl --user "[email protected]:your-password" \
  "https://api.gigahost.no/api/v0/dns/dyndns?hostname=home.example.no"

# IPv6
curl --user "[email protected]:your-password" \
  "https://api.gigahost.no/api/v0/dns/dyndns?hostname=home.example.no&myipv6=2001:db8::1234"

# Multiple hostnames in one call
curl --user "[email protected]:your-password" \
  "https://api.gigahost.no/api/v0/dns/dyndns?hostname=home.example.no,vpn.example.no&myip=203.0.113.10"

TIP

URL-encode + and @ if they appear in the username when passed through a third-party client that puts the credentials in the URL: [email protected] becomes you%2Btag%40example.com.

Client configurations ​

ddclient ​

/etc/ddclient.conf:

protocol=dyndns2
ssl=yes
server=api.gigahost.no/api/v0/dns
[email protected]
password='your-password'
home.example.no

Synology DSM ​

Control Panel → External Access → DDNS → Add, set Service Provider to Customized and configure:

FieldValue
Query URLhttps://api.gigahost.no/api/v0/dns/dyndns?hostname=__HOSTNAME__&myip=__MYIP__
UsernameYour Gigahost email
PasswordYour Gigahost password
Hostnamehome.example.no

QNAP QTS / QuTS hero ​

Network & Virtual Switch → DDNS → Customized:

FieldValue
URLhttps://api.gigahost.no/api/v0/dns/dyndns?hostname=%HOST%&myip=%IP%
UsernameYour Gigahost email
PasswordYour Gigahost password
Hostnamehome.example.no

Generic consumer router ​

Under "User-defined" or "Custom" Dynamic DNS:

FieldValue
Server / URLapi.gigahost.no
Path/api/v0/dns/dyndns
Protocoldyndns2
UsernameYour Gigahost email
PasswordYour Gigahost password
Hostnamehome.example.no

OPNsense / pfSense ​

Services → Dynamic DNS → add an entry:

FieldValue
Service typeCustom
Update URLhttps://api.gigahost.no/api/v0/dns/dyndns?hostname=%h&myip=%i
UsernameYour Gigahost email
PasswordYour Gigahost password
Hostnamehome.example.no

MikroTik RouterOS ​

routeros
/ip cloud set ddns-enabled=no

/system script add name=dyndns source={
  :local ipaddr [/ip address get [find interface=ether1] address]
  /tool fetch \
    url="https://api.gigahost.no/api/v0/dns/dyndns?hostname=home.example.no&myip=$ipaddr" \
    user="[email protected]" password="your-password" \
    mode=https dst-path=dyndns.txt
}

/system scheduler add name=dyndns-update interval=5m on-event=dyndns

Gigahost Docs

This site is currently in development.
Enter the password to continue.