Untrusted_domains after changing Ip address

I use a Virtualbox VM 7 (migration from 6 to 7 long term worked) with the suggested installation of Nextcloud AIO on Kubuntu.

Since a few days i reorganized my server and changed the IP from 192.168.x.23 to 192.168.x.4. After reboot the Nextcloud comes up and is accessable via local network and internet but always show the " Access through untrusted domain" message.

As it is hard to find, but I did, changed the config.php as recommended in the documentation with no effect.
Maybe it is the point that I don’t know what exactly to add there.
By “default” it is configured:
0 => ‘192.168.x.4’,
I added
1 => ‘192.168.x.2’, ###that is the VM Server machine
2 => ‘localhost’,
3 => ‘192.168.x.*’,
From Internet I only access my network with Wireguard, so I will treat everything from outside of the network as bad. With Wireguard my IP is local. And that is my problem. It worked for nearly 6 months and I don’t understand what untrusted domain means as I expect that my domain is my local network, what I mean, I configured before in the Frontend, allowing access from inside the network. Physically login on a machine does not make much sense.

There is also a line with overwrite DHCP IP with the given IP on 0, so I changed this too.
When I changed the IP on Router back to the old x.x.x.23 all works fine. But I can’t live with a unconfigurable server like this, where you even can’t made a minor change as changing the IP.

My workaorund so far is, setting back the old ip address as there are some cross effects influencing or redircting to the old IP.
In addition I added
3 => ‘nextcloud’,
to the trusted_domains, so as far as I have fixed this issue I can move the IP location to anywhere and the server is still available as “nextcloud” in the local network.
(This means one time change the calendars and refrences to nextcloud instead of doing this several times from when moving from x.x.x.2 to x.x.x.47 to x.x.x.11.

The config directive is trusted_domains (not untrusted_domains).

Are you accessing your instance via an IP address?

All it should contain is the hostname (or IP if unavoidable) of the Nextcloud URL you’re using to reach Nextcloud. It has nothing to do with the source IP address of clients, where they’re located, etc.

Of course if you’re using more than one URL to access your instance, you’ll need to include each.

Since you’re using AIO there are some other factors though. Please post your actual config by running occ config:list system. Or, in your case, slightly adapted form for running occ via AIO as described here: GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

1 Like

Thanks for your reply.

The UNtrusted thing is the error message and the trusted thing is the config.

I’m using only the nextcloud hostname and the nextcloud ip to redirect to the nextcloud server. Hostname works after I added it to the config. Before nextcloud was only accessed by IP. I changed this for the users to keep their nextcloud access independet what I do with the server.

I marked my workaround as solution as it is the fasted way to keep it running. Changing the IP was my personal feeling of getting server IP sorted. But in production it doesn’t matter.
What I found out is interesting is, that IPv6 addresses often are treated as “being external”. This external mark I had also on another server application. After I blocked IPv6 addresses in local network, the servers are now fine even with WireGuard accessing devices from “real” external.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.