How do I set trusted domain via NextCloudpi

I used the nextcloudpi image for the odroid-hc1 from ownyourownbits.

I want to set my trusted domain via ncp-config on commandline or web-interface.

Where is this function located? I did not find this entry.

Is there something arround?

Hi @frazhome & welcome,

Not sure if the first run wizard in ncp-web provides this!?

You can add it manually to the trusted domain’s array:

sudo nano /var/www/nextcloud/config/config.php

Mine looks like this:

‘trusted_domains’ =>
array (
0 => ‘localhost’,
5 => ‘nextcloudpi.local’,
7 => ‘nextcloudpi’,
8 => ‘nextcloudpi.lan’,
1 => ‘192.168.x.xx’,
10 => ‘myncp.domain.tld’,
),

Or run:

ncc config:system:set trusted_domains 10 --value=“myncp.domain.tld”

2 Likes

Hello @OliverV,

thank a lot for your quick answer. this is very helpfull.

for me it is the question, why it is not possible via ncp-config.

beginners have a lot of trouble with commandlines like this. It is very easy to break a config.php. Think about missing , or duplicate entries.

should I create a issue at github?

sure, please do :wink:

Hello,

Linux and NextcloudPi newbie trying to add trusted domain to NCP on Odroid HC2, apologies if some of what I say doesn’t make sense.

I’m using NCP webui, neither NCP wizard nor adding domain manually at nc-trusted-domains under CONFIG have worked for me.


@OliverV does what you advise (sudo nano /var/www/nextcloud/config/config.php) require use of terminal? If so I typed the command in there and returns ‘Directory does not exist’.

Any help will be much appreciated!

Yes, it is a terminal command
If you are root already, you do not need sudo

nano /var/www/nextcloud/config/config.php