How to fix Access through untrusted domain Please contact your administrator NextCloud Error

3 years ago
30

IN this video I show you how to solve "Access through untrusted domain Please contact your administrator" that is if your IP address changed and you cannot access your next cloud server.
The issue is with trusted domains
rusted domains
All URLs used to access your Nextcloud server must be whitelisted in your config.php file, under the trusted_domains setting. Users are allowed to log into Nextcloud only when they point their browsers to a URL that is listed in the trusted_domains setting. You may use IP addresses and domain names. A typical configuration looks like this: (Please note i have removed angled brackets due to youtube not allowing me to add them, where there is an equal sigh please add an angle bracket that's the greater than sigh)
'trusted_domains' =
array (
0 = 'localhost',
1 = 'server1.example.com',
2 = '192.168.1.50',
3 = 'additional ip address',
),
The loopback address, 127.0.0.1, is automatically whitelisted, so as long as you have access to the physical server you can always log in. In the event that a load balancer is in place there will be no issues as long as it sends the correct X-Forwarded-Host header. When a user tries a URL that is not whitelisted the following error appears: Access through untrusted domain

Follow this simple steps.
1.sudo nextcloud.occ config:system:get trusted_domains (to see the current IP address and trusted domain)
2.sudo nextcloud.occ config:system:set trusted_domains 1 --value=your ip address or domain
3.Go to your web browser and use the new ip address

Loading comments...