Onlyoffice (docker) works, but gives a warning "The document could not be saved.."

I have seafile 11 setup in docker with OnlyOffice also in docker.

Setup works well - with one annoying glitch.

whenever a user opens a document (new or existing) they receive a warning dialog box “The document could not be saved. Please check connection settings or contact your administrator. When you click the ‘OK’ button, you will be prompted to download the document.”

After hitting OK the user is taken to the ‘File’ tab

If they select the ‘home’ tab everything runs as expected

Edits ARE saved.

I don’t see any obvious errors in docker compose logs -f

Can anyone help please? I’d like to silence the warning.

Thanks

Is no-one else experiencing this glitch?
I reinstalled with seafile 10 (instead of 11) and experience the same issue. However the document ‘seafile-tutorial.doc’ which is part of the fresh install - opens in only office just fine. If I create a new docx or xlsx or pptx then I received the warning message as before.

wow, i’m surprised I’m alone with this error.

I have Onlyoffice integration setup, but I do not have this problem. I can open, modify, create and save files in my OnlyOffice environment.

Probably you have been looking at possible solutions, is there anything to check if permissions are ok?

Thanks.
I followed the install instructions for seafile here: Seafile Community Installation - Seafile Admin Manual

And then then the instructions for OnlyOffice here: Deploy OnlyOffice with Docker - Seafile Admin Manual (i’m using the community edition, not pro, but can not see any settings which would need to be different)

1 Like

How do test that? I am pretty sure they are not!

Please test like this:

  • Open office file in Onlyoffice
  • Edit document
  • Close browser tab
  • Wait a few moments
  • Download the file from Seahub
  • Check file for edits

If I am correct, please make sure that the Onlyoffice container can resolved the address of your Seafile Server.

Thank you rdb. You made me look closer. My issues was nginx related.

What I did, in the end, was to setup seafile with onlyoffice in http. It all worked fine.

Then I changed port to 8001 (in docker-compose.yml plus some edits in nginx and seahub conf) so that I could put Nginx Proxy Manager in front and play around with settings more easily. Again, I first got things working in http, then ‘closed’ port 8001 to the world.

Then I added ssl in Nginx Proxy Manager … and adjusted settings (needed to add https:// at a couple of points in the seahub config file. Also needed to add CSRF_TRUSTED_ORIGINS = ['https://…]

I have not worked out what was wrong with the instructions which I originally followed in the two links above (in the seafile documents). If I get bored I might try to figure it out.

OK, found it. This is what I should have done in the beginning to have seafile and OnlyOffice working with https.

  1. follow instructions here to install seafile. Take care to open port 443 and set lets encrypt ‘true’ (add your URL too of course). I would suggest adding “restart: always” to each of the services. And change the Time Zone (“-TZ = country/city”).

  2. follow instructions here to add OnlyOffice.

There are two important ‘edits’ to make OnlyOffice work (and to save docs).

  • in this file /opt/seafile-data/seafile/conf/seahub_settings.py take care to add the S to http in SERVICE_URL so that you have “https://…”
  • when you cut and paste the onlyoffice additions take care to include httpS in this line too ONLYOFFICE_APIJS_URL =

And that’s it. When you bring it up with docker compose up -d everything should work. I’m annoyed that it took me so long to find my mistakes.

2 Likes

Yes!! Thank you!

I was running into this same exact issue. It was quite annoying. I had https everywhere else except for the SERVICE_URL. It feels like there are so many catchas setting up seafile + onlyoffice. I feel like this needs to be mentioned in the instructions or manual somewhere. It would have saved me so much time.

Just for the future: a much easier installation with predefined yml files can be found here: Welcome to the Seafile Admin Manual - Seafile Admin Manual.

This is not the official installation method but if you watch this video you might detect the advantages of this approach: https://www.youtube.com/watch?v=t1UkT1dtopI.

Best regards
Christoph from datamate

1 Like