Nextcloud 29.0.0 trusted_proxies issue

I’m running a nextcloud container with swag reverse proxy. Today I upgraded to nextcloud 29.0.0. So far nextcloud works but on the administration overview page it shows me the following error:

Your “trusted_proxies” setting is not correctly set, it should be an array of IP addresses - optionally with range in CIDR notation.

I’ve tried the following (from here) in the config.php file but it has not fixed the issue:

‘trusted_proxies’ =>
array (
0 => gethostbyname(‘swag’),
),

Any help would be highly appreciated.

If you’re using a container it’s possible your trusted_proxies are defined in your Docker Compose file. In some images, such as the micro-services one, that could override the setting in your main config.php.

I’m using the linuxserver nextcloud container on an unraid server. Is there a variable I can set to overwrite the trusted_proxies value?

as you you are using custom linuxserverio image I would recommend you reach out to linuxserver.io Support and linuxserver.io Nextcloud docs

I tried something. In config.php I entered the IP address of the swag container and now the error message is gone. This tells me that the trusted_proxies value is indeed taken from the config.php file. Is setting the trusted_proxies like this fine or does it come with any drawbacks?

1 Like

thank you this also worked for me