Weird HTTP/HTTPS behavior

Good afternoon.

Last couple of days I’ve been trying to get NextCloud and Collabora working together. Progress has been slow but steady and, hopefully, I’m just facing one last hurdle to clear to have everything working as expected.

My setup is as follows:

  • NextCloud and Collabora are both deployed as docker containers in TrueNAS Scale
  • I have Traefik running as a separate container acting as reverse proxy
  • NextCloud is accessible through https files dot mysite dot com and Collabora through https collab dot mysite dot com
  • In Collabora config I included aliasGroup1 value as https files dot mysitecom

After setting up the integration between NC and Collabora, I could see NC making the proper requests to Collabora to start editing a spreadsheet, but I was getting a “Document loading failed” page, complaining about not being able to establish a websocket connection. When further analyzing the requests in my browser, I could see this request:

wss://collab.mysite.com/cool/https%3A%2F%2Ffiles dot mysite dot com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F428_ocx79ioymhda%3Faccess_token%a_token%26access_token_ttl%3D0%26no_auth_header%3D/ws?WOPISrc=https%3A%2F%2Ffiles.mysite.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F428_ocx79ioymhda&compat=/ws

And this websocket chatter:

So, wss communication with the server was happening. So checked the collabora logs, repeated the request and saw something weird:

wsd-00001-00032 2025-09-10 19:30:29.953950 +0200 [ websrv_poll ] ERR Failed to get settings json from [``http://files.mysite.com/index.php/apps/richdocuments/wopi/settings?type=systemconfig&access_token=wOX2k8rGrowekZghASxb1ajEAhf4Da0t&fileId=-1``] with status[Moved Permanently]| wsd/DocumentBroker.cpp:1913

As you can see, Collabora is making a call back to NC using http rathern than https and is not able to interpret the 301 that is receving.

So the question is why this HTTP rather than HTTPS request? Where should I go and check to avoid this behavior? I’ve been looking aroung to no avail, so I’m completely lost right now and any help will be really appreciated.

I found this other post Collabora with nextcloud and traefik on docker but not sure what was really changed to make it work

Solved!

I kept looking at Collabora settings and config but it was as simple as adding

OVERWRITEPROTOCOL=https

as environment variable to my NextCloud docker