Scale 25.10.1 - Nextcloud 33.0.0 - Web GUI not responding (error 400)

Hello there,

I’m becoming NUTS trying to deploy Nextcloud from the Truenas apps catalog

Whatever directly using ip_address:port(30027) or through my Bunkerweb reverse proxy it get the following logs;

127.0.0.1 “GET /status.php HTTP/1.1” 200 1065 “-” “curl/8.14.1”

IP_ADDRESS_REVERSE_PROXY “GET / HTTP/1.1” 400 524 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:148.0) Gecko/20100101 Firefox/148.0”

using http or https destination from my reverse proxy does not change anything. Always the same result.

looking at various documentation I quickly saw that we are supposed to play with following variables

OVERWRITEHOST with value nextcloud.domain.example

OVERWRITEPROTOCOL with value https to accept https header forwarded by the proxy

OVERWRITECLIURL with value nextcloud.domain.example

and , maybe, NEXTCLOUD_TRUSTED_PROXIES with value IP_address of my reverse proxy.

I have tested all possible combinations, I also realised looking at the log that each time you change the filed’s value “Host” it is appended in a table in config.php used by Nextcloud main container.

Now in config.php I have 127.0.0.1, external_IP_address_of_the_container, nextcloud”, “nextcloud.domain.example” and even the ip address of my reverse proxy (I tested that out of ideas really)

How the hell is it supposed to be deployed..?

If any useful information here is what I forward from my reverse proxy towards Nextcloud

“Host $$host;X-Real-IP $$remote_addr;X-Forwarded-For $$proxy_add_x_forwarded_for;X-Forwarded-Proto $$scheme;X-Forwarded-Host $$host;X-Forwarded-Port $$server_port”

Given the lack of response or idea I feel I must no be the only one…

Okay I found the solution by myself (thank you guys :D)

so to summarise my use case; hosting Nextcloud App version 33.0.0 (2.3.8) on Turenas Scale 25.10.1 and exposing it behind a reverse proxy and using https behind reverse proxy and Nextcloud server to shut his mouth down :slight_smile:

  1. Host set on “domain.example”

Following additional environment variables :

  1. trusted_proxies with ip address of the reverse proxy
  2. OVERWRITECLIURL with https://domain.example

Certificate ID set at “truenas_default” with Proxy Timeout set at the same value you have set up in your reverse Proxy. Also tick the checkbox “Use different port for URL rewrites” and set the value your reverse proxy is exposing

In my reverse proxy I’m using HSTS and passing following headers;

  • “X-Real-IP $$remote_addr;X-Forwarded-For $$proxy_add_x_forwarded_for;X-Forwarded-Proto $$scheme”

I hope I didn’t forget another header…

And don’t forget to configure your reverse proxy to expose your caldav and carddav features.