[GH-ISSUE #96] "Download failed" after upgrade to onlyoffice - unable to verify the first certificate #52

Closed
opened 2026-02-26 09:35:44 +03:00 by kerem · 30 comments
Owner

Originally created by @thomass4t on GitHub (Apr 10, 2018).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/96

I upgraded to the current community- and document-server 9.6.1.627
Community-Server runs with self-signed SSL certificate
Document-Server runs with plain http

After restart of the two docker containers, I get an error message when opening any kind of document. The error message merely shows "Download failed".

I discovered the underlying error within the logfile
/app/onlyoffice/DocumentServer/logs/documentserver/converter/out.log

Whenever I open a document, an error shows up in this logfile:

[2018-04-10 14:17:05.216] [ERROR] nodeJS - error downloadFile:url=https://onlyoffice/products/files/httphandlers/filehandler.ashx?action=stream&fileid=4&version=6&stream_auth=xxx;attempt=3;code:UNABLE_TO_VERIFY_LEAF_SIGNATURE;connect:undefined;(id=PryKqIixHZSmYe_LEsQ_)
Error: unable to verify the first certificate
at Error (native)
at TLSSocket. (_tls_wrap.js:1092:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:609:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:439:38)

The document-Server seems to download something from the community-server and fails because it doesn't know the CA of the self-signed certificate.

How can I add my self-signed certificate or my CA to the document-server?
My CA must be injected to Node-JS service.
(Adding it to /etc/ssl/certs didn't work and also setting the docker-env NODE_TLS_REJECT_UNAUTHORIZED=0 didn't help either)

Thanks for any suggestions,
Thomas

Originally created by @thomass4t on GitHub (Apr 10, 2018). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/96 I upgraded to the current community- and document-server 9.6.1.627 Community-Server runs with self-signed SSL certificate Document-Server runs with plain http After restart of the two docker containers, I get an error message when opening any kind of document. The error message merely shows "Download failed". I discovered the underlying error within the logfile /app/onlyoffice/DocumentServer/logs/documentserver/converter/out.log Whenever I open a document, an error shows up in this logfile: [2018-04-10 14:17:05.216] [ERROR] nodeJS - error downloadFile:url=https://onlyoffice/products/files/httphandlers/filehandler.ashx?action=stream&fileid=4&version=6&stream_auth=xxx;attempt=3;code:UNABLE_TO_VERIFY_LEAF_SIGNATURE;connect:undefined;(id=PryKqIixHZSmYe_LEsQ_) **Error: unable to verify the first certificate** at Error (native) at TLSSocket.<anonymous> (_tls_wrap.js:1092:38) at emitNone (events.js:86:13) at TLSSocket.emit (events.js:185:7) at TLSSocket._finishInit (_tls_wrap.js:609:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:439:38) The document-Server seems to download something from the community-server and fails because it doesn't know the CA of the self-signed certificate. How can I add my self-signed certificate or my CA to the document-server? My CA must be injected to Node-JS service. (Adding it to /etc/ssl/certs didn't work and also setting the docker-env NODE_TLS_REJECT_UNAUTHORIZED=0 didn't help either) Thanks for any suggestions, Thomas
kerem closed this issue 2026-02-26 09:35:44 +03:00
Author
Owner

@dmkash commented on GitHub (Jul 13, 2018):

I am running into the same problem while setting up local virtual machines in our development environment. For our development virtual machines we use the .test TLD, so need to use self-signed certificates.

The ONLYOFFICE Document Server has been installed on a CentOS 7 virtual machine following the directions here: https://helpcenter.onlyoffice.com/server/linux/document/linux-installation-centos.aspx

I tried adding NODE_TLS_REJECT_UNAUTHORIZED=0 to the /etc/onlyoffice/documentserver/supervisor/onlyoffice-documentserver-docservice.ini but this didn't work, either. I'm seeing the exact same error in /var/log/onlyoffice/documentserver/docservice/out.log as the OP:

[2018-07-13 14:50:22.799] [ERROR] nodeJS - postData error: docId = 2_2_;url = https://testserver.ourdomain.test/path/to/document;data = {"key":"2_2_","status":1,"users":["1"],"actions":[{"type":1,"userid":1}]}
Error: self signed certificate
    at TLSSocket.<anonymous> (_tls_wrap.js:1105:38)
    at emitNone (events.js:106:13)
    at TLSSocket.emit (events.js:208:7)
    at TLSSocket._finishInit (_tls_wrap.js:639:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38)
<!-- gh-comment-id:404943315 --> @dmkash commented on GitHub (Jul 13, 2018): I am running into the same problem while setting up local virtual machines in our development environment. For our development virtual machines we use the .test TLD, so need to use self-signed certificates. The ONLYOFFICE Document Server has been installed on a CentOS 7 virtual machine following the directions here: https://helpcenter.onlyoffice.com/server/linux/document/linux-installation-centos.aspx I tried adding `NODE_TLS_REJECT_UNAUTHORIZED=0` to the /etc/onlyoffice/documentserver/supervisor/onlyoffice-documentserver-docservice.ini but this didn't work, either. I'm seeing the exact same error in /var/log/onlyoffice/documentserver/docservice/out.log as the OP: ``` [2018-07-13 14:50:22.799] [ERROR] nodeJS - postData error: docId = 2_2_;url = https://testserver.ourdomain.test/path/to/document;data = {"key":"2_2_","status":1,"users":["1"],"actions":[{"type":1,"userid":1}]} Error: self signed certificate at TLSSocket.<anonymous> (_tls_wrap.js:1105:38) at emitNone (events.js:106:13) at TLSSocket.emit (events.js:208:7) at TLSSocket._finishInit (_tls_wrap.js:639:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38) ```
Author
Owner

@agolybev commented on GitHub (Jul 16, 2018):

Hi Dana, try turning off validating certificate by Document Server. Set services.CoAuthoring.requestDefaults.rejectUnauthorized=false in /etc/onlyoffice/documentserver/defaults.json file and restart documentserver serviceis with supervisorctl restart all.

<!-- gh-comment-id:405180858 --> @agolybev commented on GitHub (Jul 16, 2018): Hi Dana, try turning off validating certificate by Document Server. Set `services.CoAuthoring.requestDefaults.rejectUnauthorized=false` in `/etc/onlyoffice/documentserver/defaults.json` file and restart documentserver serviceis with `supervisorctl restart all`.
Author
Owner

@inpos commented on GitHub (Aug 24, 2018):

Unfortunately, node.js don't use system ca-certs and this issue can't be fixed by adding local CA cert to system bundle. Workaround by @agolybev work, but breaks SSL security due to allow connections to unauthorized ssl servers.

<!-- gh-comment-id:415847449 --> @inpos commented on GitHub (Aug 24, 2018): Unfortunately, node.js don't use system ca-certs and this issue can't be fixed by adding local CA cert to system bundle. Workaround by @agolybev work, but breaks SSL security due to allow connections to unauthorized ssl servers.
Author
Owner

@thomaswollburg commented on GitHub (Sep 26, 2018):

The workaround does work, but pretty pretty please update your documentation as I have tried all -e SSL_VERIFY_CLIENT="off" -e NODE_TLS_REJECT_UNAUTHORIZED=0 and what not to make this work. Can I invoice these useless hours of frustration somewhere? Even set up chain file and gave it the recommend name and everything. Nothing helped here.

<!-- gh-comment-id:424652581 --> @thomaswollburg commented on GitHub (Sep 26, 2018): The workaround does work, but pretty pretty please update your documentation as I have tried all -e SSL_VERIFY_CLIENT="off" -e NODE_TLS_REJECT_UNAUTHORIZED=0 and what not to make this work. Can I invoice these useless hours of frustration somewhere? Even set up chain file and gave it the recommend name and everything. Nothing helped here.
Author
Owner

@ibnpetr commented on GitHub (Sep 26, 2018):

@thomaswollburg
Next version of the DocumentServer container will include node.js v8, it does use system CA bundle, you will be able to import your certificates without having to disable verification.

<!-- gh-comment-id:424787026 --> @ibnpetr commented on GitHub (Sep 26, 2018): @thomaswollburg Next version of the DocumentServer container will include node.js v8, it does use system CA bundle, you will be able to import your certificates without having to disable verification.
Author
Owner

@changchichung commented on GitHub (Oct 30, 2018):

@ibnpetr is there any schedule for next release ?

<!-- gh-comment-id:434141804 --> @changchichung commented on GitHub (Oct 30, 2018): @ibnpetr is there any schedule for next release ?
Author
Owner

@skuep commented on GitHub (Jan 15, 2019):

@ibnpetr
I am curious, are you already using node v8? When I execute the following in the onlyoffice docker container, I get:

docker exec <id> node -v
v8.14.0

However I am having the exact same issues as above. Also tried every workaround given above.

<!-- gh-comment-id:454368480 --> @skuep commented on GitHub (Jan 15, 2019): @ibnpetr I am curious, are you already using node v8? When I execute the following in the onlyoffice docker container, I get: `docker exec <id> node -v` `v8.14.0` However I am having the exact same issues as above. Also tried every workaround given above.
Author
Owner

@mrwormo commented on GitHub (Jun 26, 2019):

Hi,
I'm using the latest docker image with Traefik as reverse proxy, and i have the same problem.

The trick to turning off validating certificate by Document Server works great :

Set services.CoAuthoring.requestDefaults.rejectUnauthorized=false in /etc/onlyoffice/documentserver/defaults.json file and restart documentserver serviceis with supervisorctl restart all.

But how can i modify the default.json when the container starts ? services.CoAuthoring.requestDefaults.rejectUnauthorized seems to not be modified by an environment variable (https://github.com/ONLYOFFICE/Docker-DocumentServer#available-configuration-parameters).

<!-- gh-comment-id:505797462 --> @mrwormo commented on GitHub (Jun 26, 2019): Hi, I'm using the latest docker image with Traefik as reverse proxy, and i have the same problem. The trick to turning off validating certificate by Document Server works great : > Set `services.CoAuthoring.requestDefaults.rejectUnauthorized=false` in `/etc/onlyoffice/documentserver/defaults.json` file and restart documentserver serviceis with `supervisorctl restart all`. But how can i modify the default.json when the container starts ? `services.CoAuthoring.requestDefaults.rejectUnauthorized` seems to not be modified by an environment variable (https://github.com/ONLYOFFICE/Docker-DocumentServer#available-configuration-parameters).
Author
Owner

@ShockwaveNN commented on GitHub (Jun 26, 2019):

@mrwormo Hi, you're are right, not all options from default.json can be configured by params.
But you can use something like this after starting container

docker exec -it containerID /var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false'

(I didn't check this exact command, but you should get an idea

<!-- gh-comment-id:505901063 --> @ShockwaveNN commented on GitHub (Jun 26, 2019): @mrwormo Hi, you're are right, not all options from `default.json` can be configured by params. But you can use something like this after starting container ``` docker exec -it containerID /var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' ``` (I didn't check this exact command, but you should get an idea
Author
Owner

@mrwormo commented on GitHub (Jun 27, 2019):

Hi @ShockwaveNN,
This command works just fine. Many thx !
Now i need to run the command when the container starts. I tried to put this line at the end of the Docker-compose.yml, but it doesn't work.
I continue to search a solution to automate this...

<!-- gh-comment-id:506256322 --> @mrwormo commented on GitHub (Jun 27, 2019): Hi @ShockwaveNN, This command works just fine. Many thx ! Now i need to run the command when the container starts. I tried to put this line at the end of the Docker-compose.yml, but it doesn't work. I continue to search a solution to automate this...
Author
Owner

@ShockwaveNN commented on GitHub (Jun 27, 2019):

@mrwormo I think there is no elegant way to use this command witho Docker Compose, you can modify https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/run-document-server.sh to add this command and rebuild image locally

<!-- gh-comment-id:506258904 --> @ShockwaveNN commented on GitHub (Jun 27, 2019): @mrwormo I think there is no elegant way to use this command witho Docker Compose, you can modify https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/run-document-server.sh to add this command and rebuild image locally
Author
Owner

@mrwormo commented on GitHub (Jun 27, 2019):

@ShockwaveNN I actually thought about modifying https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/run-document-server.sh, and build my own image, but that means that we would have to rebuild the image each time we update.

<!-- gh-comment-id:506289416 --> @mrwormo commented on GitHub (Jun 27, 2019): @ShockwaveNN I actually thought about modifying [https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/run-document-server.sh](https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/run-document-server.sh), and build my own image, but that means that we would have to rebuild the image each time we update.
Author
Owner

@ShockwaveNN commented on GitHub (Jun 27, 2019):

@mrwormo I think you can try to move running run-document-server.sh command to docker-compose.yml file and add something like

command: >
    bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false'
    && bash /app/onlyoffice/run-document-server.sh"

I didn't test it through

<!-- gh-comment-id:506295760 --> @ShockwaveNN commented on GitHub (Jun 27, 2019): @mrwormo I think you can try to move running `run-document-server.sh` command to `docker-compose.yml` file and add something like ``` command: > bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && bash /app/onlyoffice/run-document-server.sh" ``` I didn't test it through
Author
Owner

@mrwormo commented on GitHub (Jul 1, 2019):

@ShockwaveNN Thx for the time spent, but it doesn't work. Dont't bother, i will continue to edit the file after the container has started...

<!-- gh-comment-id:507195667 --> @mrwormo commented on GitHub (Jul 1, 2019): @ShockwaveNN Thx for the time spent, but it doesn't work. Dont't bother, i will continue to edit the file after the container has started...
Author
Owner

@ShockwaveNN commented on GitHub (Jul 10, 2019):

This issue is closed, seems original problem was resolved via update of nodejs to version 8
If not - I think it's better to create new issue

<!-- gh-comment-id:510046515 --> @ShockwaveNN commented on GitHub (Jul 10, 2019): This issue is closed, seems original problem was resolved via update of nodejs to version 8 If not - I think it's better to create new issue
Author
Owner

@ReinerNippes commented on GitHub (Nov 11, 2019):

@ShockwaveNN

This issue is closed, seems original problem was resolved via update of nodejs to version 8
If not - I think it's better to create new issue

no. it's still not possible to use selfsigned certifcates.
and the workaround to change the file /etc/onlyoffice/documentserver/default.json inside the container would not survive an update. or?

<!-- gh-comment-id:552626862 --> @ReinerNippes commented on GitHub (Nov 11, 2019): @ShockwaveNN > This issue is closed, seems original problem was resolved via update of nodejs to version 8 > If not - I think it's better to create new issue no. it's still not possible to use selfsigned certifcates. and the workaround to change the file `/etc/onlyoffice/documentserver/default.json` inside the container would not survive an update. or?
Author
Owner

@jcklpe commented on GitHub (Dec 13, 2019):

Can confirm that Reiner is correct. This issue wasn't fixed until I used the temporary fix.

<!-- gh-comment-id:565269332 --> @jcklpe commented on GitHub (Dec 13, 2019): Can confirm that Reiner is correct. This issue wasn't fixed until I used the temporary fix.
Author
Owner

@zner0L commented on GitHub (Jan 31, 2021):

There actually is a way to do this properly and without disabling certificate verification. You can add your own CAs (or rather, replace nodejs' CA store) by adding them in the agentOptions of request, which takes in the options you can define in the TLS Secure Context:

"services.CoAuthoring.requestDefaults" {
    "agentOptions": {
        "ca": "<your pem style CA cert>"
    }
}
<!-- gh-comment-id:770344608 --> @zner0L commented on GitHub (Jan 31, 2021): There actually is a way to do this properly and without disabling certificate verification. You can add your own CAs (or rather, replace nodejs' CA store) by adding them in the `agentOptions` of `request`, which takes in the options you can define in the [TLS Secure Context](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options): ```json "services.CoAuthoring.requestDefaults" { "agentOptions": { "ca": "<your pem style CA cert>" } } ```
Author
Owner

@nmaludy commented on GitHub (Feb 5, 2021):

@mrwormo I think you can try to move running run-document-server.sh command to docker-compose.yml file and add something like

command: >
    bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false'
    && bash /app/onlyoffice/run-document-server.sh"

I didn't test it through

I got this working using a modified version of this suggestion, basically inserting the edit in the docker run command. Problem in the example above is trying to use /var/www/onlyoffice/documentserver/npm/node_modules/.bin/json that doesn't exist. Instead need to use /var/www/onlyoffice/documentserver/npm/bin/json:

docker run -i -t -d -p 8443:443  -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data \
  --entrypoint "/bin/bash" \
  onlyoffice/documentserver \
  -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && /app/ds/run-document-server.sh"
<!-- gh-comment-id:774262500 --> @nmaludy commented on GitHub (Feb 5, 2021): > @mrwormo I think you can try to move running `run-document-server.sh` command to `docker-compose.yml` file and add something like > > ``` > command: > > bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' > && bash /app/onlyoffice/run-document-server.sh" > ``` > > I didn't test it through I got this working using a modified version of this suggestion, basically inserting the edit in the docker run command. Problem in the example above is trying to use `/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json` that doesn't exist. Instead need to use `/var/www/onlyoffice/documentserver/npm/bin/json`: ``` docker run -i -t -d -p 8443:443 -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data \ --entrypoint "/bin/bash" \ onlyoffice/documentserver \ -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && /app/ds/run-document-server.sh" ```
Author
Owner

@lgzcoollg commented on GitHub (Jan 9, 2022):

@mrwormo I think you can try to move running run-document-server.sh command to docker-compose.yml file and add something like

command: >
    bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false'
    && bash /app/onlyoffice/run-document-server.sh"

I didn't test it through

I got this working using a modified version of this suggestion, basically inserting the edit in the docker run command. Problem in the example above is trying to use /var/www/onlyoffice/documentserver/npm/node_modules/.bin/json that doesn't exist. Instead need to use /var/www/onlyoffice/documentserver/npm/bin/json:

docker run -i -t -d -p 8443:443  -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data \
  --entrypoint "/bin/bash" \
  onlyoffice/documentserver \
  -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && /app/ds/run-document-server.sh"

Docker tag:6.4, input command after docker run.and it work

<!-- gh-comment-id:1008313869 --> @lgzcoollg commented on GitHub (Jan 9, 2022): > > @mrwormo I think you can try to move running `run-document-server.sh` command to `docker-compose.yml` file and add something like > > ``` > > command: > > > bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' > > && bash /app/onlyoffice/run-document-server.sh" > > ``` > > > > > > > > > > > > > > > > > > > > > > > > I didn't test it through > > I got this working using a modified version of this suggestion, basically inserting the edit in the docker run command. Problem in the example above is trying to use `/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json` that doesn't exist. Instead need to use `/var/www/onlyoffice/documentserver/npm/bin/json`: > > ``` > docker run -i -t -d -p 8443:443 -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data \ > --entrypoint "/bin/bash" \ > onlyoffice/documentserver \ > -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && /app/ds/run-document-server.sh" > ``` Docker tag:6.4, input command after docker run.and it work
Author
Owner

@lgzcoollg commented on GitHub (Jan 25, 2022):

@mrwormo I think you can try to move running run-document-server.sh command to docker-compose.yml file and add something like

command: >
    bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false'
    && bash /app/onlyoffice/run-document-server.sh"

I didn't test it through

I got this working using a modified version of this suggestion, basically inserting the edit in the docker run command. Problem in the example above is trying to use /var/www/onlyoffice/documentserver/npm/node_modules/.bin/json that doesn't exist. Instead need to use /var/www/onlyoffice/documentserver/npm/bin/json:

docker run -i -t -d -p 8443:443  -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data \
  --entrypoint "/bin/bash" \
  onlyoffice/documentserver \
  -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && /app/ds/run-document-server.sh"

not work in docker image tags 7.0.0

<!-- gh-comment-id:1020919143 --> @lgzcoollg commented on GitHub (Jan 25, 2022): > > @mrwormo I think you can try to move running `run-document-server.sh` command to `docker-compose.yml` file and add something like > > ``` > > command: > > > bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' > > && bash /app/onlyoffice/run-document-server.sh" > > ``` > > > > > > > > > > > > > > > > > > > > > > > > I didn't test it through > > I got this working using a modified version of this suggestion, basically inserting the edit in the docker run command. Problem in the example above is trying to use `/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json` that doesn't exist. Instead need to use `/var/www/onlyoffice/documentserver/npm/bin/json`: > > ``` > docker run -i -t -d -p 8443:443 -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data \ > --entrypoint "/bin/bash" \ > onlyoffice/documentserver \ > -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && /app/ds/run-document-server.sh" > ``` not work in docker image tags 7.0.0
Author
Owner

@ShockwaveNN commented on GitHub (Jan 25, 2022):

You can now use docker env key USE_UNAUTHORIZED_STORAGE

<!-- gh-comment-id:1020920706 --> @ShockwaveNN commented on GitHub (Jan 25, 2022): You can now use docker env key `USE_UNAUTHORIZED_STORAGE`
Author
Owner

@lgzcoollg commented on GitHub (Jan 25, 2022):

You can now use docker env key USE_UNAUTHORIZED_STORAGE

Seccused!
-e USE_UNAUTHORIZED_STORAGE=true

<!-- gh-comment-id:1020955655 --> @lgzcoollg commented on GitHub (Jan 25, 2022): > You can now use docker env key `USE_UNAUTHORIZED_STORAGE` Seccused! -e USE_UNAUTHORIZED_STORAGE=true
Author
Owner

@mrwormo commented on GitHub (Feb 28, 2022):

You can now use docker env key USE_UNAUTHORIZED_STORAGE

Yeah ! It's working with tag:6.4.2.
Not tested with tag:7

<!-- gh-comment-id:1054320876 --> @mrwormo commented on GitHub (Feb 28, 2022): > You can now use docker env key `USE_UNAUTHORIZED_STORAGE` Yeah ! It's working with tag:6.4.2. Not tested with tag:7
Author
Owner

@webagroprom commented on GitHub (May 25, 2022):

 #- LARGER_FILE_LIMITS=true
    ports:
      - '9050:80'
      - '9000:443'
    stdin_open: true
    restart: always
    stop_grace_period: 120s
    command: bash -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && bash /app/onlyoffice/run-document-server.sh"
    volumes:

Added to configuration docker-compose.yml launched container docker-compose up -d

nextcloud: Error while downloading the document file to be converted.) (версия 7.1.0.215)

What am I doing wrong ? How to solve this error?

<!-- gh-comment-id:1137779566 --> @webagroprom commented on GitHub (May 25, 2022): ``` #- LARGER_FILE_LIMITS=true ports: - '9050:80' - '9000:443' stdin_open: true restart: always stop_grace_period: 120s command: bash -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && bash /app/onlyoffice/run-document-server.sh" volumes: ``` Added to configuration docker-compose.yml launched container docker-compose up -d nextcloud: **Error while downloading the document file to be converted.) (версия 7.1.0.215)** What am I doing wrong ? How to solve this error?
Author
Owner

@webagroprom commented on GitHub (May 26, 2022):

@mrwormo I think you can try to move running run-document-server.sh command to docker-compose.yml file and add something like

command: >
    bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false'
    && bash /app/onlyoffice/run-document-server.sh"

I didn't test it through

I got this working using a modified version of this suggestion, basically inserting the edit in the docker run command. Problem in the example above is trying to use /var/www/onlyoffice/documentserver/npm/node_modules/.bin/json that doesn't exist. Instead need to use /var/www/onlyoffice/documentserver/npm/bin/json:

docker run -i -t -d -p 8443:443  -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data \
  --entrypoint "/bin/bash" \
  onlyoffice/documentserver \
  -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && /app/ds/run-document-server.sh"

Docker tag:6.4, input command after docker run.and it work

Can you show an example of how to correctly add (as you added) data to the docker-compose.yml configuration file ?

<!-- gh-comment-id:1138246467 --> @webagroprom commented on GitHub (May 26, 2022): > > > @mrwormo I think you can try to move running `run-document-server.sh` command to `docker-compose.yml` file and add something like > > > ``` > > > command: > > > > bash -c "/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' > > > && bash /app/onlyoffice/run-document-server.sh" > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I didn't test it through > > > > > > I got this working using a modified version of this suggestion, basically inserting the edit in the docker run command. Problem in the example above is trying to use `/var/www/onlyoffice/documentserver/npm/node_modules/.bin/json` that doesn't exist. Instead need to use `/var/www/onlyoffice/documentserver/npm/bin/json`: > > ``` > > docker run -i -t -d -p 8443:443 -v /var/www/onlyoffice/Data:/var/www/onlyoffice/Data \ > > --entrypoint "/bin/bash" \ > > onlyoffice/documentserver \ > > -c "/var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false' && /app/ds/run-document-server.sh" > > ``` > > Docker tag:6.4, input command after docker run.and it work **Can you show an example of how to correctly add (as you added) data to the docker-compose.yml configuration file ?**
Author
Owner

@ShockwaveNN commented on GitHub (May 26, 2022):

@webagroprom I think for you it's better to create new discusttion\new issue since your problem doesn't seem any relation to original issue with certificate verification

<!-- gh-comment-id:1138251248 --> @ShockwaveNN commented on GitHub (May 26, 2022): @webagroprom I think for you it's better to create new discusttion\new issue since your problem doesn't seem any relation to original issue with certificate verification
Author
Owner

@ghost commented on GitHub (Jun 7, 2022):

Hello,

To resolve the same problem with Let's encrypt cert, I didn't modify onlyoffice configuration file default.json.
I only change ssl_certificate in nginx configuration file /etc/nginx/conf.d/ds.conf (onlyoffice general server block) :
ssl_certificate /etc/ssl/certs/fullchain.pem;
ssl_certificate_key /etc/ssl/private/privkey.pem;

pem files are from let's encrypt folder, I just copied them in /etc/ssl/certs/ and /etc/private/
When having the problem, I used cert.pem, now I use fullchain.pem and problem is gone.

See attachment : ds.conf.txt

<!-- gh-comment-id:1148567420 --> @ghost commented on GitHub (Jun 7, 2022): Hello, To resolve the same problem with Let's encrypt cert, I didn't modify onlyoffice configuration file default.json. I only change ssl_certificate in nginx configuration file /etc/nginx/conf.d/ds.conf (onlyoffice general server block) : ssl_certificate /etc/ssl/certs/fullchain.pem; ssl_certificate_key /etc/ssl/private/privkey.pem; pem files are from let's encrypt folder, I just copied them in /etc/ssl/certs/ and /etc/private/ When having the problem, I used cert.pem, now I use fullchain.pem and problem is gone. See attachment : [ds.conf.txt](https://github.com/ONLYOFFICE/Docker-DocumentServer/files/8852952/ds.conf.txt)
Author
Owner

@douglascrp commented on GitHub (Jun 14, 2022):

You can now use docker env key USE_UNAUTHORIZED_STORAGE

Seccused! -e USE_UNAUTHORIZED_STORAGE=true

Yes, it works

<!-- gh-comment-id:1155195161 --> @douglascrp commented on GitHub (Jun 14, 2022): > > You can now use docker env key `USE_UNAUTHORIZED_STORAGE` > > Seccused! -e USE_UNAUTHORIZED_STORAGE=true Yes, it works
Author
Owner

@mirrornight commented on GitHub (Sep 3, 2024):

You can now use docker env key USE_UNAUTHORIZED_STORAGE

not work in docker image tags onlyoffice/documentserver-de:7.3.3.50.

<!-- gh-comment-id:2325671585 --> @mirrornight commented on GitHub (Sep 3, 2024): > You can now use docker env key `USE_UNAUTHORIZED_STORAGE` not work in docker image tags onlyoffice/documentserver-de:7.3.3.50.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#52
No description provided.