Ubuntu server - Trusted_domains

Salve a tutti, gestisco Nextcloud in intranet montato su una macchina virtuale con Ubuntu Server. Voglio accedere al cloud anche senza essere nell’intranet, quindi ho aperto le porte 80 e 443. L’unico problema è che mi dice che il dominio non è attendibile di modificare quindi il file config/config.sample.php fatto sta che nel mio Ubuntu Server non esiste tale directory quindi che file devo modificare? Grazie

Hello! I have been installed Nextcloud on Ubuntu Server in Virtual Machines. I want to log in my cloud not only by the intranet but by internet. I have opened the network port 80 and 443. The problem is that: when I go at I see the error of the trusted_domains. The system tell me to go in the directory config/config.sample.php but in Ubuntu Server that directory doesn’t exist! How do i change it? Thanks and sorry for any errors because I’m Italian man.

You must configure the file config/config.php


You should use TLS/SSL also.

1 Like

There are a few ways this can come about, but usually it’s due to accessing via IP to set it up and then trying to access it by name.

You need to add the name you’re using to access it to the trusted domains. This is in config/config.php under the Nextcloud web root.


Thanks devnull but there isn’t in my Ubuntu Server the folder config

Every nextcloud installation uses a cofig.cfg-file in a config-folder in the nextcloud folder.


You can also use the name:


if you use


If it is a dynamic ip you must use a dyndns-service and then add the dyndns-name.
Don t you have a name for your ip-addess?

1 Like

For the system the directory ‘var/www/nextcloud/config’ doesn’t exist!

Can you list your NextCloud subfolders ? With ls -all /var/www/nextcloud

the directory is protected, so you need to use sudo. This is also the reason you can´t autocomplete the directory.

sudo -u www-data nano /var/www/nextcloud/config/config.php