Onlyoffice ne fonctionne plus avec Nextcloud

I’ve set rejectUnauthorised to false (though that seems unrelated to the issue #2617, since it was set to true previously). The EINVAL error persists. Could this be related to the fact that my server doesn’t have a valid IPv6 address?

It might be possible. You could try adding this to your YNH server /etc/hosts to see if it solves the problem.

<YNH ipv4> your.onlyoffice.domain.tld

Something seems strange to me : I can’t see the "allowPrivateIPAddress" key in a fresh OnlyOffice installation local.json file.

Could you share your local.json file after removing any sensitive data?

I added the line 142.4.209.38 office.crissp.be to etc/hosts, but this seems to have no effect on the EINVAL error.

The contents of the local.json file are pasted below:

{
  "services": {
    "CoAuthoring": {
      "server": {
            "port": 8096
      },
      "sql": {
        "type": "postgres",
        "dbHost": "127.0.0.1",
        "dbPort": "5432",
        "dbName": "onlyoffice",
        "dbUser": "onlyoffice",
        "dbPass": "6e43bdf13ef87c1d185263da"
      },
      "redis": {
        "name": "redis",
        "prefix": "onlyoffice:",
        "host": "127.0.0.1",
        "port": 6379,
        "options": {
            "database": 1
        },
        "optionsCluster": {},
        "iooptions": {
            "lazyConnect": true
        },
        "iooptionsClusterNodes": [],
        "iooptionsClusterOptions": {
            "lazyConnect": true
        }
      },
      "request-filtering-agent" : {
        "allowPrivateIPAddress": true,
        "allowMetaIPAddress": false
      },
      "token": {
        "enable": {
          "request": {
            "inbox": true,
            "outbox": true
          },
          "browser": true
        },
        "inbox": {
          "header": "Authorization"
        },
        "outbox": {
          "header": "Authorization"
        }
      },
      "secret": {
        "browser": {
          "string": "key (redacted)"
        },
        "inbox": {
          "string": "key (redacted)"
        },
        "outbox": {
          "string": "key (redacted)"
        },
        "session": {
          "string": "key (redacted)"
        }
      },
      "autoAssembly": {
        "enable": true,
        "interval": "1m",
        "step": "1m"
      },
      "requestDefaults": {
        "rejectUnauthorized": false
      }
    }
  },
  "storage": {
    "fs": {
      "secretString": "3C0KlwxAkrltCvigvy6XleGl"
    }
  },
  "rabbitmq": {
    "url": "amqp://onlyoffice:vEyCC2o6QTaPyZhSWhhDIIcN@localhost/onlyoffice"
  }
}

You could also try with local ipv4.
Other thing to try: setting allowMetaIPAddress": false to true

      "request-filtering-agent" : {
        "allowPrivateIPAddress": true,
        "allowMetaIPAddress": true

and then

sudo systemctl restart onlyoffice

We’re really fumbling around here, but I don’t have anything better to suggest, sorry…

maybe its not about onlyoffice, as i said, humhub connector works flawless and nextcloud connector from outside too.

It seems to be an issue related to how Nextcloud and OnlyOffice communicate when they are on the same server.
Are the errors the same in your logs?

Note that i run onlyoffice and nextcloud on the same server with success, with the same version as listed in this topic…

The boolean issue in config panel

So a part of the problem should be fixed by [fix] Boolean are transform into string by ynh_write_var_in_file by zamentur · Pull Request #2186 · YunoHost/yunohost · GitHub

So for now my problem is that this part of the code is not in stable version, so i guess i should write a workaround for the current config_panel…

error downloadFile - error EINVAL

On that part, except an issue related to local ip rejected or certificate rejected, i don’t see.

Your setup are on a domain without subpath ?

yes

Same here: it works as expected.
The local.json file does not contain this parameter

      "request-filtering-agent" : {
...
}

my onlyoffice is on subdomain without subpath
my humhub is on subdomain without subpath
my yunohost nextcloud is on subpath
my outside nextcloud is on subpath (here i have to open documents often twice, til onlyoffice works)

Bonjour,

Non je suis en certificat let’s encrypt valide.

Ce qui est curieux c’est que cela fonctionne avec un onlyoffice d’un autre yunohost

Salut @ljf

J’ai remarqué un autre petit bug : quand on modifie la liste des adresses des CSP frame-ancestors dans le panneau de configuration, toute valeur entrée écrase la fin de la ligne et vire donc le "; final.

    ynh_replace --match="frame-ancestors .*" --replace="frame-ancestors 'self' $allowed_urls" --file="/etc/nginx/conf.d/$domain.d/$app.conf"

=> la chaîne de caractères ne passe pas le double-quote ni le point-virgule finaux.

L’erreur est un peu silencieuse car nginx ne fait que se recharger et ne tombe donc pas mais l’erreur de syntaxe empêchera tout redémarrage ultérieur.

nginx -t
2025/09/22 19:49:03 [emerg] 403311#403311: unexpected "C" in /etc/nginx/conf.d/only.yuno.local.d/onlyoffice.conf:67
nginx: configuration file /etc/nginx/nginx.conf test failed

Est-ce que tu arrives à reproduire cette erreur et est-ce que d’autres ont constaté la même chose ?

No, I don’t get that error. But perhaps these lines could give a lead?

2025/09/22 18:24:44 [warn] 2074233#2074233: conflicting server name "" on 0.0.0.0:80, ignored
2025/09/22 18:24:44 [warn] 2074233#2074233: conflicting server name "" on 0.0.0.0:80, ignored

No luck, same error …

@stephanem
Est-ce que, tout comme @Guido, ton onlyoffice problématique est connecté à une autre application que nextcloud?

J’ai installé Humhub sur les mêmes serveurs que nextcloud et onlyoffice.

  • Serveur 1 avec certificats autosignés : aucun problème pour connecter onlyoffice à nextcloud et humhub.

  • Serveur 2 avec certificats LE :

-onlyoffice se connecte sans problème à nextcloud;
-humhub pose exactement le même problème que nextcloud pour vous : pour un obscure raison, la connexion tente de s’établir sur l’ipv6 locale de la machine.
Ce serait lié au comportement de Node.js.

Comme solution, voici ce qui a fonctionné pour moi : forcer node à passer par ipv4.
Dans local.json:

      "requestDefaults": {
        "rejectUnauthorized": 1,
        "family": 4
      }

puis

sudo systemctl restart onlyoffice
2 Likes

works for me!
thank u very much

It’s a workaround, but it does the trick for tonight… :yawning_face:

1 Like