Project

General

Profile

Actions

Trusted Domains

I've observed that sometimes Nextcloud requests users to enter their passwords twice before granting access. To resolve this behavior, you can add your domain to the list of trusted domains in the Nextcloud configuration file.

Adding your domain to the list of trusted domains in the Nextcloud configuration file is a straightforward process. This configuration helps Nextcloud recognize legitimate incoming requests. To do this, follow these steps:

Access the Configuration File:

Log in to your Nextcloud server as a user with administrative privileges or SSH access.
Locate the Configuration File:

Navigate to the directory where Nextcloud is installed. The configuration file is typically named config.php and is located in the config directory within your Nextcloud installation. The full path is often /var/www/html/nextcloud/config/, but it may vary depending on your server setup.
Edit the Configuration File:

Use a text editor to open the config.php file. You may need to use a command like sudo nano /path/to/config.php if you have limited permissions.
Add Your Domain to the 'trusted_domains' Array:

Inside the config.php file, locate the 'trusted_domains' array. It should look something like this:

'trusted_domains' =>
array (
  0 => '10.0.2.21', // IP address of the reverse proxy if you have one.
  1 => 'your-current-domain',  // Add your domain here
),

Save the Configuration File:

Save the changes you made to the config.php file and exit the text editor.
Restart the Web Server:

After making changes to the configuration file, it's essential to restart your web server for the changes to take effect. The specific command to restart the web server depends on the web server software you're using. For Apache, you can use:

sudo systemctl restart apache2

Updated by Gareth Eaton over 1 year ago · 2 revisions