Can't connect to OnlyOffice document server after update to NC19

Get errors:

Error onlyoffice OCP\Http\Client\LocalServerException: Host violates local access rules
Warning no app in context Host 192.168.0.50 was not connected to because it violates local access rules

Everything was working before update to NC19.
I have added in my config.php:

‘onlyoffice’ =>
array (
‘verify_peer_off’ => true,
),

3 Likes

It happens in new version of nextcloud, that checks local for dot (.) in adress if there it is: /lib/private/Http/Client.php -> preventLocalAddress // Disallow hostname only
if (substr_count($host, ‘.’) === 0) {
…

The solution:
change local address with dot included address: for example local.cloud

Solution is:

add this to config.php:

‘allow_local_remote_servers’ => true,

8 Likes

Hi,

thank you for the solution,

What is the right way?

   ‘onlyoffice’ =>
      array (
      ‘verify_peer_off’ => true,
      ‘allow_local_remote_servers’ => true,
    ),

or outside of the array in root?

‘allow_local_remote_servers’ => true,

thank you.

1 Like

Outside, in the root

Thank you for your reply.

./occ config:system:set allow_local_remote_servers --value true --type bool
2 Likes

Hello
I have a question that I know is a bit silly but I really need an answer for it.
where can I find this config.php file
I have set everything up and I received this error in the end so I need to find this file and add this
allow_local_remote_servers’ => true,

Hi @Eyad_Ahmed!
which type of installation do you use?? snap? docker? basic installation? You can find this file in your nextcloud directory ( /.../nextcloud/config/config.php). but the way to access to nextcloud directory depends on the installation type.
for a basic installation ( in the nextcloud documentation ) : sudo nano /var/www/nextcloud/config/config.php

Thank you, i love you so much, you are the best!!!

be careful and us ' not the ‘ ones in the post…

1 Like