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: