Skip to content

create_dynamic_dns

Create a Dynamic DNS update configuration.

Side effects:

  • Adds a DDNS config: the gateway will push the WAN IP to service for host_name whenever the WAN address changes. Takes effect immediately (the gateway sends an update on the next IP check).
  • Mutates controller state. Use dry_run=True to preview the change without applying.
create_dynamic_dns(service="namecheap", host_name="home.example.com", login="example.com", password="<token>")
ParameterTypeRequiredDefaultDescription
servicestringyesProvider keyword (e.g. "dyndns", "namecheap", "cloudflare", "noip", or "custom").
host_namestringyesThe FQDN to keep pointed at the WAN IP ("home.example.com").
loginstringyesProvider account / username. For some providers (e.g. Namecheap) this is the zone/domain.
passwordstringyesProvider password or API token. Stored write-only and redacted in reads.
serverstringno""Custom update-URL host. Only used (and required) when service == "custom"; leave empty otherwise.
interfacestringno”wan”WAN interface whose IP is tracked. Defaults to "wan" (the primary WAN on a single-WAN gateway).
enabledbooleannotrueFalse creates the config disabled for staging.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set (with the password redacted).