I’ve installed NextCloud on my FreeNas server and I got an error that my domain is not trusted. After looking online, it looks like I need to add the hosts capable of connecting to my instance explicitly. This is actually nice, because I don’t want everybody to be able to connect to it.
- FreeNas install (11.3 at the time of writing this)
- NextCloud plugin installed
First, log in (as root) to your FreeNas install, go to the Jails section and open the NextCloud details (hitting the chevron on the right):
Open the the shell:
Nextcloud has a management CLI tool named
occ.sh, which allows you to perform all kind of commands on your nextcloud. With it, you can check which domains are already available:
[email protected]:~# ./occ.sh config:system:get trusted_domains localhost
This will return
You can now add a new domain (a name like johndoe.lan or an IP address). Start with the position 1 (0 is
[email protected]:~# ./occ.sh config:system:set trusted_domains 1 --value=192.168.1.150 System config value trusted_domains => 1 set to string 192.168.1.150
You can verify again the state:
[email protected]:~# ./occ.sh config:system:get trusted_domains localhost 192.168.1.150
Note: Numbering of the trusted domains starts from 0. Don’t skip a number, or you’ll get an invalid configuration.