Dear all,
I have been trying to integrate Collabora with Seafile and, for the most part, I think, I have been successful. Yet, I still can’t open a file. Let me explain.
I serve Collabora from collabora.xyz.tld
and Seafile from seafile.xyz.com
. If I visit collabora.xyz.tld
and collabora.xyz.tld/hosting/discovery
, I get the expected responses and all references point to https://collabora.xyz.tld:443
, so Collabora works.
I add the following to seahub_settings.py
OFFICE_SERVER_TYPE = "CollaboraOffice"
ENABLE_OFFICE_WEB_APP = True
OFFICE_WEB_APP_BASE_URL = "https://collabora.xyz.tld/hosting/discovery"
WOPI_ACCESS_TOKEN_EXPIRATION = 30 * 60 # seconds
OFFICE_WEB_APP_FILE_EXTENSION = (...)
ENABLE_OFFICE_WEB_APP_EDIT = True
OFFICE_WEB_APP_EDIT_FILE_EXTENSION = (...)
Yet, when I open a file on Seafile, I can see that it tries to access, for example, the following URL
https://seafile.xyz.tld:6232/browser/48bf0bf/cool.html?WOPISrc=https%3A%2F%2Fseafile.xyz.tld%2Fapi2%2Fwopi%2Ffiles%[redacted]&ui=en-US&rs=en-US&lang=en-US
I dont’ understand where Seafile/Seahub is getting the Collabora port.
I have either forgotten to set a very obvious setting or those values are hard-coded in Seafile.
Any ideas?
Thank you very much in advance.
I am not sure. I had a look at my configs, and I don’t see anything I am sure would cause that sort of problem. My best guess is that you need to update FILE_SERVER_ROOT in that same seahub_settings.py. It’s also possible that SEAFILE_SERVER_HOSTNAME= has that port number on it in your .env file.
If it is neither of those, I would suggest you find the conf directory with the config files (the directory seahub_settings.py) is in, cd into it, and run “grep 6232 *” to see if any of the config files contain the string “6232”. If grep finds that string it will give the filename, followed by the entire line containing the match.
Serendipitously I managed to fix this problem, by restarting my server. There was no problem or omission in my Docker or Seafile/Seahub configurations. Simply restarting the Seafile Docker container, or taking it down and then up again, is not enough to apply new or changed settings in seahub_setting.py. For some reason, one has to restart Docker. Or am I doing something wrong?
I am glad you got it working.
I don’t know exactly how docker handles changes to the config like that, but I wouldn’t be surprised if it takes extra steps. There were several design decisions I disliked in docker, so I switched to using podman to run the containers, so I can’t even test it on mine.