Settings trusted domains doesn't work

Hello.

Iā€™ve installed Nextcloud with docker using the base docker-compose.

I use Nginx Proxy Manager to point my domain to my NC instance.

I go and edit config/config.php
I add my domain so it looks like this :

  'trusted_domains' => 
  array (
    0 => '192.168.0.16:8080',
    1 => 'https://my.domain.com'
  ),

I also change and add :

  'overwrite.cli.url' => 'https://my.domain.com',
  'overwriteprotocol' => 'https',

I reboot app and db, then I get an " Access through untrusted domain" error.

What am I doing wrong ?

May need to configure a trusted proxy in NCā€™s config.php. Mine has:

ā€˜trusted_proxiesā€™ =>
array (
11 => ā€˜127.0.0.1ā€™,
12 => ā€˜::1ā€™,
13 => ā€˜localhostā€™,
),

Thanks for your input, but it wasnā€™t it.

The error came from how I input my domain : must not contain https://

  'trusted_domains' => 
  array (
    0 => '192.168.0.16:8080',
    1 => 'my.domain.com'
  ),

Now it works :slight_smile:

1 Like

Please donā€™t edit the trusted domains in the config directly if you can avoid it. NCP might overwrite your edit occasionally.
Instead, configure the trusted domains from the Admin UI or ncp-config (thereā€™s an option called nc-trusted-domains).

Thanks for the heads-up, but Iā€™m using the docker image. Not NCP :wink: