Help with modifying Config.php to update list of trusted_domains

Hello,
I have just installed NextCloud Hub II (23.0.0) on a new Truenas Mini 3x+. I’m not a tech expert, can anyone share simplified, step, by step advice on how to change the Config.php to update the list of trusted domains? I have looked a number of videos, most are dated and none have worked for the Truenas installation.

Your assistance is appreciated, thanks in advance.

P.S. The Truenas is running TrueNas12.0-U7

Hi @MaxR

I don’t use TrueNAS Jails, but the config.php file should be at this location…

/mnt/[your poolname]/iocage/jails/nextcloud/root/usr/local/www/nextcloud/config/

…according to this thread in the TrueNAS forums:

https://www.truenas.com/community/threads/nextcloud-installation-config-php-file.90636/

Hello bb77,
Entered the text in Shell CLI and got the following error message:
"zsh: no such file or directory: /mnt/“Our Big Pool”/iocage/jails/nextcloud/root/usr/local/www/nextcloud/config/

tested it and it’s defintley there… But there was a small error in the path. The “N” in the first of the two “nextclouds”, should be written as a captital letter.

This ist the full path to the file on my TrueNAS box, after I did a “One Click installation” from the Plugins section, without changing any settings…

/mnt/name_of_pool/iocage/jails/Nextcloud/root/usr/local/www/nextcloud/config/config.php

Hope that helps…

Thank you BB77. I used the “find” command in the Shell CLI and the response confirmed the location of Config.php is as you stated. Do you know how to see the contents of config.php and how to edit it from the Shell CLI?

I would recommand using nano. nano is an easy to use command line based text editor for linux and unix systems and it is already installed on TrueNAS… There are tons of guides ou there. Here is an example for beginners…

Thank you bb-77, the Beginner’s Guide to Nano was very helpful. Also found another document that helped me

      https://www.tecmint.com/learn-nano-text-editor-in-linux/

Using the nano command in the Truenas12 Shell CLI, I was able see and edit the contents of Config.php
I added a new line with the http:// IP address for the NextCloud plugin as shown in the Truenas12 “Plugins” screen, 192.168.1.217:8282, and attempted to access NextCloud from the Plugins “Manage” option in Truenas12. I got an error message warning me of a “Warning: Potential Security Risk Ahead”. I then edited Config.php again, this time changing the new IP address to the https:// IP address from the error message screen, 192.168.1.8283. I then accessed NextCloud again and got the same error warning message.

NextCloud Admin Portal

Config.php Contents with NextCloud IP Address

Looks Like there is still something not right. What can I change to satisfy my Firefox web browser that the IP address is secure?

Making progress thanks to your assistance, really appreciate your help.

I don’t think that the security warning has something to do with the “Trusted Domains” settings in Nextcloud. The security warning you get in the browser, when you are using HTTPS, is most likely triggerd by a self signed SSL certificate, which would be a perfectley normal behavior. But you might want to post another screenshot of that warning here, just to be sure…