Hello all/Tom,
I recently deployed Nextcloud inside TrueNAS Scale following your most recent setup video. Thank you for that, BTW! Nextcloud, in general, seems to be working like it should, besides that Nextcloud wanting to use the local IP of my TrueNAS box and not the domain name.
I have a Cloudflare tunnel setup and by going to the Nextcloud’s subdomain, I can access Nextcloud without issues. It comes down to when I want to connect my Nextcloud client. You know, when you go to authenticate the agent, and it opens a webpage to complete the setup. Instead of it redirecting to the domain name, it redirects to the local IP. No matter what I put in the config.php file, I can’t seem to get it to use the domain. Also, when I go to Administration Settings → System → External monitoring tool it has the local IP and not the domain name like I think it should.
I would greatly appreciate any ideas on how to resolve this. Thanks!
config.php
<?php
$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,
),
),
'trusted_proxies' =>
array (
0 => '127.0.0.1',
1 => '10.0.1.99', <-- Local Cloudflare Tunnel VM IP
),
'passwordsalt' => '** REDACTED **',
'secret' => '** REDACTED **',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '10.0.1.10:9001', <-- LOCAL TrueNAS IP
2 => 'files.mydomain.com',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'pgsql',
'version' => '27.0.1.2',
'dbname' => 'nextcloud',
'dbhost' => 'nextcloud-postgres:5432',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin',
'dbpassword' => '**REDACTED**',
'installed' => true,
'instanceid' => '**REDACTED** ',
'overwrite.cli.url' => 'https://files.mydomain.com',
'overwritehost' => 'files.mydomain.com',
'overwriteprotocol' => 'https',
'default_phone_region' => 'US',
);
Administration Settings → System → External monitoring tool