Nethserver Nextcloud behind a reverse proxy

NethServer Version: 7.7

I have a NS NC install behind a NS reverse proxy.

Now, an msg in the admin ui states that a config setting should be set for a trusted proxy.
Having reviewed the NS admin and dev docs, I’m not sure how to do this the NS way, or if it’s really necessary, in fact I’ve yet to find the config/config.php as described by the NC doc, it seems those parameteres are being set by the NS config command.

Also, what’s the general thought behind using a virtual host for NC in NS? My installs are default NS installs, non virtual host.

To get rid of the error you need to append following entries to the config array in config/config.php.
In this example is the reverse proxy server.

  'trusted_proxies'   => [''],
  'overwritehost'     => 'domain.tld',
  'overwritewebroot'  => '/nextcloud',

If you like to use a subdomain for instance. I think it’s not necessary in your case because you manage the used hostnames on the reverse proxy server.

1 Like

Why the brackets around the ip? It doesn’t match any of the current syntax in the config.

To have the possibility to define more proxies. It’s an array.


Ah, so I don’t need them unless I have more than one.

Also, my config uses ( ) for arrays.

Yeah, wth? Looking at their example for trusted domains is different than their example for trusted proxies @mrmarkuz

'trusted_domains' =>
  array (


1 Like

Seems both syntax is correct.

Nextcloud docs:

1 Like