Help configuring DDCLIENT on NextCloudPi

[/details]

Nextcloud version 18.0.3.0
Operating system and version (Whatever comes with NextCloudPi_RPi_03-28-20.img)
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1):

The issue you are facing:

Need help configuring ddclient using FreeDNS. I installed using sudo apt-get install ddclient -y . But it’s not clear how I should fill out the /etc/ddclient.conf file.

Specifically, what protocol should I specify if I’m using FreeDNS? “freedns” wasn’t an option during install so I chose dyndns2 not knowing what else to do.

Many examples that I see say I should be adding these lines to the top of the file, but I don’t really know what they do:

use=web, web=myip.dnsomatic.com
ssl=yes

My current ddclient.conf file looks pretty empty:

===

Configuration file for ddclient generated by debconf

/etc/ddclient.conf

protocol=dyndns2

protocol=freedns

use=if, if=wlan0
server=freedns.afraid.org
login=[login]
password=’[password]’
friedmanarchives.mooo.com

===

And when I run a ‘service ddclient status’ command I get the following errors:

pi@nextcloudpi:~ $ service ddclient status
● ddclient.service - LSB: Update dynamic domain name service entries
Loaded: loaded (/etc/init.d/ddclient; generated)
Active: active (running) since Thu 2020-08-20 06:55:33 BST; 1h 45min ago
Docs: man:systemd-sysv-generator(8)
Process: 660 ExecStart=/etc/init.d/ddclient start (code=exited, status=0/SUCCESS)
Tasks: 1 (limit: 3862)
CGroup: /system.slice/ddclient.service
└─879 ddclient - sleeping for 280 seconds

Aug 20 08:25:36 nextcloudpi ddclient[3735]: WARNING: file /var/cache/ddclient/ddclient.cache, line 3: Invalid Value for keyword ‘ip’ = ‘’
Aug 20 08:25:36 nextcloudpi ddclient[3739]: WARNING: skipping update of friedmanarchives.mooo.com from to 192.168.86.122.
Aug 20 08:25:36 nextcloudpi ddclient[3739]: WARNING: last updated but last attempt on Thu Aug 20 08:20:36 2020 failed.
Aug 20 08:25:36 nextcloudpi ddclient[3739]: WARNING: Wait at least 5 minutes between update attempts.
Aug 20 08:30:37 nextcloudpi ddclient[3798]: FAILED: updating friedmanarchives.mooo.com: ERROR: Address 192.168.86.122 has not changed.: unexpected status ()
Aug 20 08:35:37 nextcloudpi ddclient[3807]: WARNING: file /var/cache/ddclient/ddclient.cache, line 3: Invalid Value for keyword ‘ip’ = ‘’
Aug 20 08:35:37 nextcloudpi ddclient[3811]: FAILED: updating friedmanarchives.mooo.com: ERROR: Address 192.168.86.122 has not changed.: unexpected status ()
Aug 20 08:40:37 nextcloudpi ddclient[3950]: WARNING: skipping update of friedmanarchives.mooo.com from to 192.168.86.122.
Aug 20 08:40:37 nextcloudpi ddclient[3950]: WARNING: last updated but last attempt on Thu Aug 20 08:35:37 2020 failed.
Aug 20 08:40:37 nextcloudpi ddclient[3950]: WARNING: Wait at least 5 minutes between update attempts.
pi@nextcloudpi:~ $

If I wait an hour these errors don’t seem to grow.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

See above.

The output of your Nextcloud log in Admin > Logging:

 [No idea where to find that]

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

pi@nextcloudpi:/var/log/apache2 $ more error.log
[Thu Aug 20 00:00:02.530769 2020] [ssl:warn] [pid 903:tid 3069497872] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 20 00:00:02.532126 2020] [mpm_event:notice] [pid 903:tid 3069497872] AH00489: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1d configured -- resuming normal operations
[Thu Aug 20 00:00:02.532150 2020] [core:notice] [pid 903:tid 3069497872] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 20 01:14:31.468760 2020] [authz_host:error] [pid 2364:tid 2763789344] [client 192.168.86.55:52414] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unab
le to get the remote host name
[Thu Aug 20 05:21:26.552618 2020] [authz_host:error] [pid 2364:tid 2763789344] [client 192.168.86.55:55468] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unab
le to get the remote host name
[Thu Aug 20 06:55:08.540689 2020] [proxy_fcgi:error] [pid 2364:tid 2763789344] [client 192.168.86.55:55468] AH01067: Failed to read FastCGI header
[Thu Aug 20 06:55:08.540780 2020] [proxy_fcgi:error] [pid 2364:tid 2763789344] (104)Connection reset by peer: [client 192.168.86.55:55468] AH01075: Error dispatching request to :4443:
[Thu Aug 20 06:55:10.182210 2020] [mpm_event:notice] [pid 903:tid 3069497872] AH00491: caught SIGTERM, shutting down
[Thu Aug 20 06:55:33.520856 2020] [ssl:warn] [pid 816:tid 3069669904] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 20 06:55:33.560690 2020] [ssl:warn] [pid 923:tid 3069669904] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 20 06:55:33.566775 2020] [mpm_event:notice] [pid 923:tid 3069669904] AH00489: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1d configured -- resuming normal operations
[Thu Aug 20 06:55:33.566907 2020] [core:notice] [pid 923:tid 3069669904] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 20 06:55:37.121859 2020] [authz_host:error] [pid 927:tid 2763953184] [client 192.168.86.55:59265] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unabl
e to get the remote host name
[Thu Aug 20 06:55:37.147283 2020] [authz_host:error] [pid 927:tid 2755552288] [client 192.168.86.25:54523] AH01753: access check of 'localhost' to /ncp-output.php failed, reason: unabl
e to get the remote host name
host friedmanarchives.mooo.com
friedmanarchives.mooo.com has address 192.168.86.122

Do you really want to set your internal ip to this name?
If yes: Why do you not use static ip address-name-mapping in your network
If no: Explain your goals. Do you want access from internet or not?

Nevermind; I think I found the answer at http://freedns.afraid.org/scripts/freedns.clients.php. Now my results from service ddclient status looks like:

pi@nextcloudpi:/var/log/apache2 $ service ddclient status
● ddclient.service - LSB: Update dynamic domain name service entries
Loaded: loaded (/etc/init.d/ddclient; generated)
Active: active (running) since Thu 2020-08-20 09:15:44 BST; 31s ago
Docs: man:systemd-sysv-generator(8)
Process: 4310 ExecStart=/etc/init.d/ddclient start (code=exited, status=0/SUCCESS)
Tasks: 1 (limit: 3862)
CGroup: /system.slice/ddclient.service
└─4316 ddclient - sleeping for 270 seconds

Aug 20 09:15:44 nextcloudpi systemd[1]: Starting LSB: Update dynamic domain name service entries…
Aug 20 09:15:44 nextcloudpi systemd[1]: Started LSB: Update dynamic domain name service entries.
Aug 20 09:15:45 nextcloudpi ddclient[4323]: SUCCESS: update not necessary friedmanarchives.mooo.com: good: IP address already set to 192.168.86.122

Does that look normal? I thought this was supposed to handle the EXTERNAL IP address, which I don’t see listed anywhere.

Sorry i do not use “ddclient”. But i think you need external ip and not internal ip.

Please read:
https://superuser.com/questions/389125/ddclient-updating-to-local-ip-instead-of-public-ip/389276

This is your external ip: http://checkip.dyndns.org

You must configure port-forwarding on your router that it works from outside.
Also you can configure dnsdns often direct on your router e.g. FritzBox.

note:
Sometimes you get problems if you access from intern your intern nextcloud with extern name or extern ip.

Thanks! Changing

use=if, if=wlan0

to this:

use=web, web=checkip.dyndns.org/

Did the trick. Everything else was configured correctly (port forwarding; DDNS on the RPi, etc.). Thank you for the fast reply!