Onlyoffice - Document could not be saved

Your nginx config and then the seahub config has to be adjusted.

I have done my tutorial over and over again, even by just copy pasting, It always works. Tried it on Debian Jessie only though. But it should be the same on Ubuntu and CentOS. :slight_smile:

I cannot find any wrong setup in my config…
Can you please explain what has to be changed?

I don’t know what has to be changed and if anything has to be changed.

I sugest you to go through every step carefully again and check at every step if this step was successfull.

Well, this statement does not help me at all…

Anybody else who can answer to my question about the Return URL…

Thank you!

After some testing I saw that for some documents is working without problems… maybe it depends on the file content?

But now I know that the result URL without https works!

I wrote the guide, I am no developer though. :wink:

It may depend on the content, but saving should still work.

I feel like the reverse proxy configuration issue of the seafile.
When you open a doc, look at the page source code.

var config = {
“document”: {
“fileType”: “docx”,
“key”: “d70457b490580adb95c5”,
“title”: “t1.docx”,
“url”: “”,
“permissions”: {
“download”: true,
“edit”: true,
“print”: true,
“review”: true
“documentType”: “text”, // ‘text’ | ‘spreadsheet’ | ‘presentation’,
“editorConfig”: {
“callbackUrl”: “”,
“lang”: “en”,
“mode”: “edit”,
“user”: {
“name”: “Teng”
If it is http instead of https, then your reverse proxy has some issue.
Do you configure your seafile to use https as well? I mean https for not only the front-end proxy, but also the back-end part.


No, there is all ok, both links are https. As told in previous mail I do not have the issue with all files.
For example I have the problem with the document “seafile-tutorial.doc”. This file will open but I am getting message “The document could not be saved…”

did not found a logic until now when it works and when not… I have to take this under observation…

Hi again
I think I have found the reason… it is due to the “-” in the file name… when I remove the “-” in the file name “seafile-tutorial.doc” it works… :confused:

Is this still a seafile problem or is there a way to fix this problem related with spaces and special char?

Thank you

That’s strange. It does remind me an old bug that a file link will become 404 if the file name contains the space character. Later, it turns out to be the issue of apache reverse proxy. Here is the link if interested

So my guess is still probably the proxy server configuration issue or nginx bug. I am using the apache as the reverse proxy server. So far I have tried opening the seafile-tutorial.doc with onlyoffice and don’t observe such an issue.

This is strange… i tried with different types of special character like ?!%… and works well with all, also space is not a problem… only make problems with “-” in the filename… but the strangest is that the error happens not every time… I have to take this under observation… in the moment I do not see any logic in this error…

Did you find a solution? If not, did you install the document server via docker?

No, no solution yet
Yes, onlyoffice is installed via docker and accessed via subdomain with nginx reverse proxy

//edit: Sorry, at first I didn’t read, that you use the Pro version, as I don’t know if my vhost works for Pro, too. Maybe this helps anyone else. :slight_smile:

Okay. I have the same configuration and for me everything works fine. But I have a different nginx vhost. Maybe worth a try?

server {
    listen       80;
    return 301 https://$host$request_uri;

server {
listen 443;


ssl on;
ssl_protocols TLSv1.2;
ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_ecdh_curve secp384r1;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_certificate /etc/letsencrypt/live/;
ssl_certificate_key /etc/letsencrypt/live/;
ssl_stapling on;
ssl_stapling_verify on;

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
add_header X-Content-Type-Options nosniff;

gzip off;

server_tokens off;

 location / {
    proxy_set_header        Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto $scheme;
    proxy_pass              http://localhost:8083/;

You need to adjust your docker port at proxy_pass. (I started via
sudo docker run -i -t -d -p 8083:80 onlyoffice/documentserver)

Thank you for your suggestion, but it is the same situation.

Now I think I found now the reason … i is a onlyoffice cache problem I guess… when a document had an error when opening, this error happens again and again… I did not found quickly how to delete the cache in onlyoffice, so I reinstalled the docker container and now it works also with the files which previously doesn’t
So I guess there initially was a configuration problem, I tried to open some file, and afterwards onlyoffice
retried to open the file in cache… or something like this…

Not really clear what happened, but now is working… :slight_smile:

You can restart the docker image every night to have it clear the cache.
Don’t set a specific cache directory though.

I got same problem that Onlyoffice changes are not saved back to Seafile, and solve it via enabling "forcesave": true mode in Onlyoffice editor config, so I add into conf/ this line:


and after restarting seahub - Onlyoffice shows “Save” button, that works well and save all changes into Seafile library!

Other (seems better) solution is described here: Force Saving OnlyOffice

I searched all forums quite extensively, but non of the solutions worked yet.

I have moved the document server to a new machine, spinned it up on docker as before. of course I had to change the dns and so the let encrypt certificates.

  • welcome page is accessible over https
  • certificates and dns are ok
  • reverse proxy also works
  • problem occurs with all versions of oods

Everything works fine, but when trying to save the document to the file storage an error occurs.

The exact error in the oods log:

[2020-07-30T13:14:47.391] [ERROR] nodeJS - sendServerRequest error: docId = a7dcc2a685e5bc08ce35;url =;data = {"key":"a7dcc2a685e5bc08ce35","status":2,"url":"","changesurl":"","history":{"serverVersion":"5.6.0","changes":[{"created":"2020-07-30 10:34:36","user":{"id":"uid-1596105268829","name":"xxx"}},{"created":"2020-07-30 12:25:49","user":{"id":"uid-1596111930593","name":"xxx"}},{"created":"2020-07-30 13:14:13","user":{"id":"uid-1596114847949","name":"xxx"}}]},"users":["uid-1596114847949"],"actions":[{"type":0,"userid":"uid-1596114847949"}],"lastsave":"2020-07-30T13:14:13.392Z","notmodified":false}
Error: Error response: statusCode:500 ;body:

<html lang="en">
    <title>Page unavailable</title>
    <h1>Page unavailable</h1>

    <p>Sorry, but the requested page is unavailable due to a server hiccup.</p>

    <p>Our engineers have been notified, so check back later.</p>

    at Request._callback (/snapshot/server/build/server/Common/sources/utils.js:0:0)
    at Request.init.self.callback (/snapshot/server/build/server/Common/node_modules/request/request.js:185:22)
    at Request.emit (events.js:198:13)
    at Request.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:198:13)
    at IncomingMessage.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:286:20)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1143:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[2020-07-30T13:14:47.391] [WARN] nodeJS - commandSfcCallback backoff limit exceeded: docId = a7dcc2a685e5bc08ce35
[2020-07-30T13:14:47.393] [WARN] nodeJS - storeForgotten: docId = a7dcc2a685e5bc08ce35```

Error in the seahub log:

```2020-07-30 13:14:47,329 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /onlyoffice/editor-callback/
Traceback (most recent call last):
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/views/decorators/", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/seahub/onlyoffice/", line 80, in onlyoffice_editor_callback
    resp = requests.get(url, verify=VERIFY_ONLYOFFICE_CERTIFICATE)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/requests/", line 508, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /cache/files/a7dcc2a685e5bc08ce35_6200/output.xlsx/output.xlsx?md5=npoSQZOec7Ky9si85jpgLw&expires=1596115788&disposition=attachment&filename=output.xlsx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa7e2912290>: Failed to establish a new connection: [Errno 111] Connection refused',))```

Weird thing is that both servers complain either about 500 or connection refused. 

Apache webserver log file storage:
``` - - [30/Jul/2020:13:47:26 +0000] "POST /onlyoffice/editor-callback/ HTTP/1.1" 200 12 "-" "Node.js/6.13" - - [30/Jul/2020:13:47:32 +0000] "POST /onlyoffice/editor-callback/ HTTP/1.1" 500 285 "-" "Node.js/6.13"```

Update: it starts to works most of time. The dns entry is 24h old. so maybe the certificate gets accepted or rejected depending on which dns is asked.