Nextcloud with zerotier and multidomain/multi IP addressess on Truenas Scale

Nextcloud version (eg, 20.0.5): 27.1.3
Operating system and version (eg, Ubuntu 20.04): TrueNAS-SCALE- which is Debian
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.22.1
PHP version (eg, 7.4): no idea

The issue you are facing:
So I was able to finally installed nextcloud, collabora and zerotier on my latest truenas scale. Every one of the apps works perfectly on its own. I’m able to access my nextcloud with the ip address and I have added the zerotier ip in the config.php but even after restarting the nextcloud, I still can’t access nextcloud via zerotier ip address. I thought I use ip address first before I introduce another variable which is domain name. Have anyone able to work on the setting the way I did it and actually works?

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:


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

$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
  'overwritehost' => '10.temp:9001',
  'overwriteprotocol' => 'https',
  'trusted_proxies' => 
  array (
    0 => '',
  'passwordsalt' => 'secret',
  'secret' => 'Secret',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '10.temp',
    2 => '192.temp',	
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '',
  'overwrite.cli.url' => 'https://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-postgres:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'secret',
  'dbpassword' => 'secret',
  'installed' => true,
  'default_phone_region' => 'US',
  'instanceid' => 'secret',
  'enable_previews' => true,

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



Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.