The documentation for setting up Onlyoffice with docker at https://manual.seafile.com/docker/pro-edition/deploy_onlyoffice_with_docker/
does not work with the latest Onlyoffice document server 7.5 when setting up the service as a sub-directory.
All examples use the URL path /onlyofficeds
to set up in nginx and seahub settings. This works for launching the editor, but there is a POST callback from the document server to the URL https://myserver.org/onlyoffice/editor-callback/
from the Onlyoffice container visible in the logs, which will then result in a 404.
From docker log:
seafile-onlyoffice | [2023-10-23T16:02:14.941] [ERROR] [localhost] [7d30e2a1ebde6650c199] [user@myserver.org] nodeJS - postData error: url = http://myserver.org/onlyoffice/editor-callback/;data = {"key":"zzz","status":1,"users":["dragan.espenschied@myserver.org"],"actions":[{"type":1,"userid":"dragan.espenschied@myserver.org"}],"token":"zzz"} Error: Error response: statusCode:301; headers:{"server":"nginx/1.24.0","date":"Mon, 23 Oct 2023 16:02:14 GMT","content-type":"text/html","content-length":"169","connection":"close","location":"https://seafile.rhizome.org/onlyoffice/editor-callback/"}; body:
If to use the URL path /onlyoffice
instead of /onlyofficeds
in nginx and seahub configuration, the editor does not load.
A second important issue is that when using HTTPS, it is crucial to set SERVICE_URL in seahub_settings.py
to start with HTTPS, otherwise Onlyoffice’s callback will receive a redirect from HTTP to HTTPS and refuse operation.
Question: What URL path to use in the nginx configuration?
Otherwise, the documentation should be changed for the Onlyoffice docker install to contain a remark about changing seahub_settings.py’s SERVICE_URL. Seafile will never throw an error if it remains as HTTP by default, so the error is very likely to go unnoticed.
PS: Using Seafile 10.0.10 docker with the go fileserver.