Table of Contents

DDNS Client DuckDNS

This article describes a custom configuration that uses a user-defined update URL.

:!: In most cases you can follow a much simpler setup process by selecting “duckdns.org” as your Service provider in DDNS client.

Use of the instructions below assumes you have ddns-scripts installed.

IPv4

In /etc/config/ddns, replace <subdomain> and <duckdns-token> with the proper values.

config service 'DuckDNS_ipv4'
	option enabled		'1'
	option interface	'wan'
	option username		'<subdomain>'
	option domain		'<subdomain>.duckdns.org'
	option password		'<duckdns-token>'
	option ip_source	'network'
	option ip_network	'wan'
	option check_interval	'1'
	option check_unit	'hours'
	option update_url	'https://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ip=[IP]'
	option use_https	'1'

Notes

If you want to view or edit the service in LuCI (via luci-app-ddns), it is also necessary to add these options to the config:

    option lookup_host	'<subdomain>.duckdns.org'
    option use_ipv6		'0'
    option cacert		'/etc/ssl/certs'

IPv6

ddns-scripts supports updating your duckdns.org subdomain with your IPv6 address, which is still needed for home users with dynamic IPv6 address. Even though your IPv6 address is globally addressable, as of 2024, some residential ISP still assign dynamic IPv6 address that may periodically change.

In /etc/config/ddns, replace <subdomain> and <duckdns-token> below with the proper values.

config service 'DuckDNS_ipv6'
	option enabled		'1'
	option lookup_host	'<subdomain>.duckdns.org'
	option username		'<subdomain>'
	option domain		'<subdomain>.duckdns.org'
	option password		'<duckdns-token>'
	option use_ipv6		'1'
	option ip_source	'network'
	option ip_network	'wan6'
	option interface	'wan6'
	option check_interval	'1'
	option check_unit	'hours'
	option update_url	'https://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]&ipv6=[IP]'
	option use_https	'1'	
config ddns 'global'
    option use_curl '1'

Further Reading