How to reinstall nextcloud from scratch (remove all settings) on nethserver

Seems like a credential error, you can get your AD settings with and compare it:

account-provider-test dump

My sample nextcloud config:

EDIT:

Sometimes it helps to change remote LDAP uri from ldap:// to ldaps:// in account provider settings and run nethserver-nextcloud-update.