Do you want to: Suggest a feature / Report a bug / Ask a how-to question
For feature suggestions, describe the result you would like to achieve in detail.
For bug reports, provide the steps to reproduce and if possible a minimal demo of the problem.
Document Server version: 8.3
Type of installation of the Document Server (docker, deb/rpm, exe, please point us to the installation guide that you used as well): Docker image onlyoffice/documentserver
OS: Ubuntu 24.04.1 LTS x86_64
Browser version: Firefox v137.0 (aarch64)
Additional information:
Any relevant details about the situation. If you’ve modified configuration files or are using a proxy server that might affect the situation, please mention it. You can also attach images and videofile to the post (or to place them to external storage)
Hi!
I’ve stuck for a while now trying to integrate Onlyoffice Docs as a self-hosted solution on a cloud platform so I believe that now is the time to ask for expert assistance.
My setup
I’m using a Docker setup. Specifically, I use the onlyoffice/documentserver base image (i.e., the community-version of Onlyoffice Docs) as the back-end, and this Node.js example integration in the front-end.
One key limitation of the cloud platform I’m integrating Onlyoffice Docs on is that everything has to be contained in a single Docker container (i.e., no Docker compose etc.) with exactly one published port (the usual ports are available for communication inside the container of course). Therefore, I’ve added the Node.js example integration to the documentserver base image and deploy it from there. I publish the nginx HTTP port (80).
I’ve made only minor adjustments to the different configuration files at this point. In the document server default.json
:
- Set
rejectUnauthorized
tofalse
- Set
blockPrivateIP
tofalse
- Set
allowPrivateIPAddress
totrue
In the Node.js default.json
- Update the JWT session token to correspond to the token from the documentserver’s
local.json
.
Finally, I’ve set the following global environment variable: JWT_HEADER='AuthorizationJwt'
.
To start the app, I first start the documentserver in the background using the /app/ds/run-document-server.sh
script. Once that has started I start the Node.js integration. After this, both the /welcome
and /example
pages are acessible without problems, and the /healthckeck
page returns true
.
The issues
When I deploy the Docker container as described above, I encounter some different issues that makes the app inoperable as it is right now. I believe that the different problems may have the same root cause, but I’m not completely sure.
The two key issues are the following:
- It seems that the Document editor can’t communicate properly with the documentserver-side services. In particular, when I try to edit a document, I get the different error messages in the interface. Specifically, I get a ‘Could not be saved’ error pop-up immediately followed by a ‘Download failed’ pop-up.
- It furthermore seems that Onlyoffice wants to communicate via an IP address (denoted
<internal_IP>
in the attached log-files) on our internal network that it’s not (and will not be) allowed to use. We’ve made an exception specifically for this app in our development system, but this won’t be possible in production. Before making this exception, whenever the document editor was opened it would be stuck on Loading document until it failed due to a timeout error.
To me, the underlying issue seems to be that the Node.js integration and the documentserver somehow communicate with each other over the external network instead of internally in the Docker container.
As an aside, I’ve also tried deploying the example integration that comes with the documentserver (i.e., documentserver-example
) instead of the Node.js integration which resulted in the same behavior.
The documentserver out.log
shows the following (with some info redacted):
[2025-04-04T09:29:10.960] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-04T09:29:10.970] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-04T09:29:10.971] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-04T09:29:11.203] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-04T09:29:56.989] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2025-04-04T09:29:56.996] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-04T09:29:56.997] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2025-04-04T09:29:57.174] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.3.2. Build: 19
[2025-04-04T09:37:31.961] [ERROR] [localhost] [<IP_1>__<IP_2>__<internal-IP>new.docx1743752251128] [uid-1] nodeJS - postData error: url = http:/<interface-URL>/example/track?filename=new.docx&useraddress=<IP_1>__<IP_2>__<internal-IP>;data = {"key":"<IP_>__<IP_2>__<internal-IP>new.docx<some-integer-code>","status":1,"users":["uid-1"],"actions":[{"type":1,"userid":"uid-1"}],"token":"<token>"} Error: Error response: statusCode:301; headers:{"server":"nginx","date":"Fri, 04 Apr 2025 07:37:31 GMT","content-type":"text/html","content-length":"162","connection":"keep-alive","location":"https://<interface-URL>/example/track?filename=new.docx&useraddress=<IP_1>__<IP_2>__<internal-IP>"}; body:
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
at Request._callback (/snapshot/server/Common/sources/utils.js)
at Request.callback (/snapshot/server/Common/node_modules/request/request.js:185:22)
at Request.emit (node:events:527:28)
at Request.<anonymous> (/snapshot/server/Common/node_modules/request/request.js:1161:10)
at Request.emit (node:events:527:28)
at IncomingMessage.<anonymous> (/snapshot/server/Common/node_modules/request/request.js:1083:12)
at Object.onceWrapper (node:events:641:28)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
and the nginx err.log
shows the following:
2025/04/04 09:33:51 [error] 13235#13235: *2 connect() failed (111: Connection refused) while connecting to upstream, client: <internal-IP>, server: , request: "GET /example/ HTTP/1.1", upstream: "http://0.0.0.0:3000/", host: "a<interface-URL>"
2025/04/04 09:34:00 [error] 13235#13235: *11 connect() failed (111: Connection refused) while connecting to upstream, client: <internal-IP>, server: , request: "GET /example/ HTTP/1.1", upstream: "http://0.0.0.0:3000/", host: "<interface-URL>", referrer: "https://<interface-URL>/welcome/"
My main questions
My key questions relate to the point about the services communicating externally vs. internally in the Docker container. Specifically, is is possible to change the configurations related to how the Node.js integration communicates with the documentserver-side services? In particular, I would like that data is sent from the external network only to the Node.js client which, in turn, communicates with the documentserver-side services internally in the Docker container via the loopback interface (e.g., localhost
)?
Can you provide a statement about whether this is possible in general? And if it’s in fact possible, would you be willing to provide me with some guidance on how to configure this?
Thanks a lot in advance!