Skip to content

Commit 9be7f75

Browse files
huwcbjoneswillswire
authored andcommitted
README: document USG debugging
1 parent b3cb5b8 commit 9be7f75

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

README.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A Cloudflare Worker script that provides a UniFi-compatible DDNS API to dynamica
44

55
## Why?
66

7-
UniFi Dream Machine Pro (UDM-Pro) users may need to update Cloudflare domain name DNS records when their public IP address changes. UniFi does not natively support Cloudflare as a DDNS provider.
7+
UniFi Dream Machine Pro (UDM-Pro) or UniFi Security Gateway (USG) users may need to update Cloudflare domain name DNS records when their public IP address changes. UniFi does not natively support Cloudflare as a DDNS provider.
88

99
### Configuring Cloudflare
1010

@@ -32,7 +32,7 @@ Ensure you have a Cloudflare account and your domain is configured to point to C
3232
### Configuring UniFi OS
3333

3434
1. Log in to your [UniFi OS Controller](https://unifi.ui.com/).
35-
2. Navigate to Settings > Internet > WAN and scroll down to **Dynamic DNS**.
35+
2. Navigate to Settings > Internet > WAN and scroll down to **Dynamic DNS**.
3636
3. Click **Create New Dynamic DNS** and provide:
3737
- `Service`: Choose `dyndns`.
3838
- `Hostname`: Full subdomain and hostname to update (e.g., `subdomain.mydomain.com`, `mydomain.com` for root domain).
@@ -41,15 +41,25 @@ Ensure you have a Cloudflare account and your domain is configured to point to C
4141
- `Server`: Cloudflare Worker route `<worker-name>.<worker-subdomain>.workers.dev/update?ip=%i&hostname=%h`.
4242
- For older UniFi devices, omit the URL path.
4343
- Remove `https://` from the URL.
44-
45-
To test the configuration and force an update:
44+
45+
#### Testing Changes - UDM-Pro
46+
To test the configuration and force an update on a UDM-Pro:
4647

4748
1. SSH into your UniFi device.
4849
2. Run `ps aux | grep inadyn`.
4950
3. Note the configuration file path.
5051
4. Run `inadyn -n -1 --force -f <config-path>` (e.g., `inadyn -n -1 --force -f /run/ddns-eth4-inadyn.conf`).
5152
5. Check `/var/log/messages` for related error messages.
5253

54+
#### Testing Changes - USG
55+
To test the configuration and force an update on a USG:
56+
57+
1. SSH into your USG device.
58+
2. Run `ls /run/ddclient/` (e.g.: `/run/ddclient/ddclient_eth0.pid`)
59+
3. Note the pid file path as this will tell you what configuration to use. (e.g.: `ddclient_eth0`)
60+
4. Run `sudo ddclient -daemon=0 -verbose -noquiet -debug -file /etc/ddclient/<config>.conf` (e.g., `sudo ddclient -daemon=0 -verbose -noquiet -debug -file /etc/ddclient/ddclient_eth0.conf`).
61+
5. This should output `SUCCESS` when the DNS record is set.
62+
5363
#### Important Notes!
5464

5565
- For subdomains (`sub.example.com`), create an A record manually in Cloudflare dashboard first.

0 commit comments

Comments
 (0)