Trusted_proxys not working

Hello everyone,

i have a small issue.

I run nextcloud 22 behind a proxy.
The reason is that nextcloud runs at home, but has a proxy on a server on the internet, both are connected via a vpn.

The vpn ip of the proxy is and the nextcloud server has

I have set the trusted_proxy var according to:


  'trusted_proxys' => 
  array (
    0 => '',
    1 => '',
    2 => '',

But i still get this error message:

The Header configuration seems to be fine since the output of this php script (when i put it right next to the nextcloud instance):


foreach (getallheaders() as $name => $value) {
    echo "$name: $value\n <br />";

outputs the correct headers (redacted with XXXXX but the forwarded for and remote_addr both have my actual ip in there)

Connection: upgrade
Host: nextcloud
X-Forwarded-For: XXXXX
X-Forwarded-Proto: https
X-Forwarded-Host: XXXXX
X-Forwarded-Port: 443
user-agent: XXXXX
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
accept-language: de,en-US;q=0.7,en;q=0.3
accept-encoding: gzip, deflate, br
upgrade-insecure-requests: 1
sec-fetch-dest: document
sec-fetch-mode: navigate
sec-fetch-site: none
sec-fetch-user: ?1
cookie: nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; nc_username=XXXXX; nc_token=XXXXX; nc_session_id=XXXXX; oc_sessionPassphrase=XXXXX

Can anyone spot my mistake here?

All the best, Nicolas

Hi Nicolas,

I just noticed a typo in your config. Try trusted_proxies instead of trusted_proxys.

All the best and good luck.


So, i just spend a few hours trying to debug that issue.

And it never occured to me that i wrote it wrong.

Thank you!