Trusted domains issue

Nextcloud version: 18.0.0
Operating system and version : raspbian
Apache or nginx version:  apache2 (just installed yesterday)
PHP version _(eg, 7.1)_: 7.3

Hello everyone! I got nextcloud up and running yesterday. I am on pi and I could connect to nextcloud via monitor. Today I moved my pi to my second router where I can not use monitor anymore. I tried to connect via ip address (from browser) and got trusted domain issue.

I opened /var/www/html/nextcloud/config and then config.php

here is what I have there:

'trusted_domains' =>

array (

0 => 'localhost',

1 => '',


I rebooted pi, but I saw the same issue again. I opened uo config again and saw ‘overwrite.cli.url’ => . There were written old ip address from my first router, so I changed it and rebooted again. I see the same issue.

What I need is local access cause then I would use vpn to connect to my local network.
Could you please help me out, cause I wrote everything like it is in documentation. Do not know what to do now actually.

ok, I understand now that I should use servers ip, not client. Sorry for opened topic