Access through untrusted domain Please contact your administrator. If you are an administrator, edit the "trusted_domains" setting in config/config.php like the example in config.sample.php

I have a nextcloud server that has been up and running smoothly since Jan of 2018. My ISP changed my IP address, I updated my router settings and port forwarding, now I get the untrusted domain error. I have looked through some of the post claiming to have the same issue, but I noticed that on my system in the nextcloud dir I don’t have a config.php file. There is a config.sample.php file which I added my trusted domain info to and saved as config.php and rebooted, but I still have the same issue. I don’t no what else to look for so any help would be appreciated.

Running Nextcloud 12.0.3 in Virtual Box with Ubuntu 16.0404 LTS on Windows 10.

The sample file is just a sample.
Somewhere on your disk there is a “config.php” file. Remove your copy of the sample file and grep your disk for this config.php file.
How did you install?
Manual or using ubuntu packages?

For my installation I followed the following tutorial https://www.linuxbabe.com/linux-server/install-apache-mariadb-and-php7-lamp-stack-on-ubuntu-16-04-lts.

I removed the config.php file I created this morning and did a grep config.php of my system and did’t get any results.

How did you install Nextcloud?
Manual or using ubuntu packages?

Dear @tomgrassi where you able to figure this out?

Also where in the GUI can you make these changes?

I see it on the opened page nextcloud.mydomain.com . What to do?

# Nextcloud
## Access through untrusted domain
Please contact your administrator. If you are an administrator, edit the “trusted_domains” setting in config/config.php like the example in config.sample.php.

Using:
VPS with Ubuntu Server 18.04
Nextcloud 17.0.1
Nginx
PHP_7.2
MariaD

root@mail # sudo nextcloud.occ config:system:get trusted_domains
nextcloud.mydomain.com
but:
root@mail # nextcloud.occ config:system:get trusted_domains
Command ‘nextcloud.occ’ is available in ‘/snap/bin/nextcloud.occ’
The command could not be located because ‘/snap/bin’ is not included in the PATH environment variable.
nextcloud.occ: command not found

Similar problem and same error when I changed the domain name

I have nextcloud self hosted so I ssh to my machine and edited the file: “/path/to/your/installation/nextcloud/config/config.php”

Here there is something like
‘trusted_domains’ =>
array (
0 => ‘your_trusted.domain.com’,
),

I changed this value and everything now is ok

Hope it helps

1 Like

This topic was automatically closed after 4 days. New replies are no longer allowed.