Add trusted domains to Nextcloud config.php.
apt update apt install vim vi /var/www/html/config/config.php