SSL Error When Connect To OnlyOffice Document Server

I have install only office document server with self signed certificate and when i try the connection with next cloud I get this error : (cURL error 60: SSL certificate problem: self signed certificate (see
And I have no ideas to solve this problem. If you can help me please <3

HINT (for self signed ssl environments only!):
Enhance your Nextcloud config.php by issuing 
sudo -u www-data vi /var/www/nextcloud/config/config.php and paste the following rows before the last *);* ... 

'onlyoffice' => array ( 'verify_peer_off' => TRUE, ), );
1 Like

Thanks !
It work, but now I have another exception :confused:
When I try to connect I have this error : (Invalid token)
So I have follow this tutorial( to enable the token. But I have the same error. However I have write the the correct token.

do you need ssl connection to your onlyoffice server/container?

if you run everything on one server in docker containers you can set it up without. afaik.

Yes I need it, because if i’m not in ssl nextcloud don’t wan’t connect to onlyoffice server.
And I don’t use docker, I use ESXI with a single vm for onlyoffice server and single vm for nextcloud.
I know this is not the best way to work. But, I’m not realy comfortable with docker.

sorry. to get a working setup with selfsigned certs is still on my todo list.

using docker I found this setting:

in this case nexctloud is reachable via http://nginx/ inside the docker network. and both, the DocumentServerInternalUrl and the StorageUrl, are http. the ssl stuff is handle by traefik as an ingress router.

and as far as i remember onlyoffice complains if nextcloud is using another protocol than nextcloud. or?

if you don’t find any solution you could add a “onlyoffice network” to your ESXi and add a virtual host to your nextcloud webserver to get a similar setup.

Thanks for your help, but I want test everything with my actual setup. And if nothing of all that works, I test it on docker ^^.

this is the code how onlyoffice sets the JWT_SECRET in the docker container. and you have to enter as the secret key at settings nextcloud onlyoffice.

that should be the missing token.

Ok so I have fund where the error come from. And I have resolve without docker container ^^.

The problem com from the document server secret settings.

So, first I have edit the config.php like you said to authorize self-signed certificate.

Then I have change JWT settings in /etc/onlyoffice/documentserver/local.json , here is example how it look like :

      "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          "browser": true
        "inbox": {
          "header": "Authorization"
        "outbox": {
          "header": "Authorization"
      "secret": {
        "inbox": {
          "string": "my_secret"
        "outbox": {
          "string": "my_secret"
        "session": {
          "string": "my_secret"

“my_secret” value should be same as in Nextcloud connector settings and in the default.json. After edit local.json I just have restart document service like that :

supervisorctl restart all

After this modification everything works !!!

1 Like

Hello MrSolarius, I can’t find default.json file in /etc/onlyoffice/documentserver/ or other paths.
Nextcloud version 17.
Operating system: Ubuntu 18.4 LTS.