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:
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>| Param | Where | Description |
|---|---|---|
hostname | query | FQDN, or comma-separated list of FQDNs. |
myip | query (optional) | IPv4 to set. If omitted, the client's source IP is used. |
myipv6 | query (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.
| Code | Meaning |
|---|---|
good 1.2.3.4 | Updated successfully (the IP echoed back). |
nochg 1.2.3.4 | No change needed, the record already points at that IP. |
nohost | Hostname not in a zone on this account, the zone uses external nameservers, or the API key is not scoped to the zone. |
notfqdn | Invalid or missing hostname. |
badauth | The API key or user has read-only DNS access. |
dnserr | Internal server error during update. |
badagent | Invalid IP supplied. |
curl examples
# 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.noSynology DSM
Control Panel → External Access → DDNS → Add, set Service Provider to Customized and configure:
| Field | Value |
|---|---|
| Query URL | https://api.gigahost.no/api/v0/dns/dyndns?hostname=__HOSTNAME__&myip=__MYIP__ |
| Username | Your Gigahost email |
| Password | Your Gigahost password |
| Hostname | home.example.no |
QNAP QTS / QuTS hero
Network & Virtual Switch → DDNS → Customized:
| Field | Value |
|---|---|
| URL | https://api.gigahost.no/api/v0/dns/dyndns?hostname=%HOST%&myip=%IP% |
| Username | Your Gigahost email |
| Password | Your Gigahost password |
| Hostname | home.example.no |
Generic consumer router
Under "User-defined" or "Custom" Dynamic DNS:
| Field | Value |
|---|---|
| Server / URL | api.gigahost.no |
| Path | /api/v0/dns/dyndns |
| Protocol | dyndns2 |
| Username | Your Gigahost email |
| Password | Your Gigahost password |
| Hostname | home.example.no |
OPNsense / pfSense
Services → Dynamic DNS → add an entry:
| Field | Value |
|---|---|
| Service type | Custom |
| Update URL | https://api.gigahost.no/api/v0/dns/dyndns?hostname=%h&myip=%i |
| Username | Your Gigahost email |
| Password | Your Gigahost password |
| Hostname | home.example.no |
MikroTik 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
