Nextcloud trust domain error in TrueNAS 12.0-RC1

davidh3f

Dabbler
Joined
Oct 18, 2020
Messages
14
Does anyone encounter the problem of trusted domain issue after a fresh install of Nextcloud plugin on TrueNAS 12.0-RC1? The Nextcloud config file only includes the IP address of the truenas server in the list of trusted domain, not the ip address of the nextcloud jail. In this case, the nextcloud site is accessible but not the logon page, saying you are on an untrusted domain.

If the ip address of the nextcloud jai is added to the trusted domain manually or by issuing the command "root@nextcloud:~# ./occ.sh config:system:set trusted_domains 1 --value=192.168.1.150" in the shell, the whole site becomes unaccessible (site not found error).

I googled a lot and it seems adding a trusted domain is a straightforward matter in FreeNAS 11.3. So this must be a bug in truenas. Can anyone confirm?

Thanks.
 

exeter_acres

Explorer
Joined
Oct 8, 2020
Messages
54
seems a few of us have this issue... not sure but it appears that when you click "Manage" the address is being auto directed from http to httpS
if you edit the config.php file and add the Nextcloud server... if you manually type the IP in, you can get to the log in screen, but as soon as you try to log in... it again redirects from http to https.
https://www.ixsystems.com/community/threads/refused-to-connect-error-after-editing-config-php.88025/
seems I am not the only one..

https://www.ixsystems.com/community/threads/stumped-with-nextcloud-on-fn11-3u5-and-tnc12rc1.88047/

here is a bug report....
https://jira.ixsystems.com/browse/NAS-107926

Sounds like you are having the same issue
 

Tim1962

Patron
Joined
Feb 26, 2015
Messages
281
Indeed, seems identical.

Now, suddenly... I may have made some progress...

I added the ip address of my jail as line 2 trusted domain.

0 => 'localhost',
1 => '192.168.0.110',
2 => '192.168.0.227',

then lower pasted this in

'overwriteprotocol' => 'http',

Bingo! You may wish to try it too. Now, YMMV about http/https but I am happy with my firewall and family access.

But maybe changing

2 => '192.168.0.227', to 2 => '192.168.0.227:443', may also do it, but just received to have found a fix
 

exeter_acres

Explorer
Joined
Oct 8, 2020
Messages
54
This appears to be working!!!
I am at least past the log in screen and logged in.. will now play around for a bit and report back!

I added the overwriteporotocal line...
hadn't added the port number at this time...

Thanks!!!
 

davidh3f

Dabbler
Joined
Oct 18, 2020
Messages
14
Thanks guys for your replies. I am relatively new to truenas, so still trying to find my way around. In the end, I used a dedicated raspberry pi 4 for my nextcloud server, which I can put it on a DMZ within my home firewall. But the solution offered by Tim1962 is greatly appreciated!
 

sonaris

Cadet
Joined
Mar 9, 2013
Messages
1
Using Version: TrueNAS-12.0-U2.1
I also used raspberry pi 4 until now. In Pi it looks like that
Code:
'trusted_domains' =>.
array (
0 => 'localhost',
1 => '*',
),

I tried everything, only that works
cd /usr/local/www/nextcloud && su -m www -c "/usr/local/bin/php occ config:system:set trusted_domains 1 --value=*"
for me adding my address didn't help.
they may have decided that there should be no IP address under a domain name lists :)
When i run the domain i guess it will work fine.
 
Top