Using two IP's (v4) to access nextcloud


I’m very new to nextcloud. Installed it couple of days ago and already integrated onlyoffice. everything works fine.
But I need to access cloud from two different IP’s. I need it because of VLAN restrictions, to make it available for to different networks.
as I understand I have to add second address to config.php, but cannot realize how to do that correctly.

‘trusted_domains’ =>
array ( 0 => ‘’, ),
‘datadirectory’ => ‘/var/www/html/nextcloud/data’,
‘dbtype’ => ‘sqlite3’,
‘version’ => ‘’,
‘overwrite.cli.url’ =>’,
‘installed’ => true,

could you please help?

I assume there is no way to make Nextcloud work as “split brain”. I suggest you address the issue using different DNS records. configure Nextcloud using hostname ‘overwrite.cli.url’ => ‘’ and setup the DNS name to the respective ip within you VLANs say

  • VLAN1 =
  • VLAN2 =

thanks a lot. I’ll try