Skip to content

Add a Trusted Domain to Nextcloud

April 9th, 2020 - IT(1 min)

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.


  1. FreeNas install (11.3 at the time of writing this)
  2. 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, which allows you to perform all kind of commands on your nextcloud. With it, you can check which domains are already available:

[email protected]:~# ./ config:system:get trusted_domains


This will return localhost.

You can now add a new domain (a name like johndoe.lan or an IP address). Start with the position 1 (0 is localhost):

[email protected]:~# ./ config:system:set trusted_domains 1 --value=

System config value trusted_domains => 1 set to string

You can verify again the state:

[email protected]:~# ./ config:system:get trusted_domains

Note: Numbering of the trusted domains starts from 0. Don’t skip a number, or you’ll get an invalid configuration.


Share on

A little experiment: