Help with HTTPS/SSL Certificates

[details=“Support intro”]
My domain registrar is Cloudflare, and after directing the domain toward my server and opening it in my browser, it shows that the connection is secure and it is using HTTPS. Then I noticed in the security panel of Nextcloud I was getting a warning saying.

You are accessing your instance over a secure connection. However, your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read the documentation page about this ↗.

I have no idea what to change the config variables to, and I’ve tried watching setup tutorials to see if I missed a step and the ones I found don’t seem to help.

Is this the first time you’ve seen this error? Yes

Steps to replicate it:

  1. Set up nextcloud on a VM w/ the ubuntu snap package
  2. Direct a domain toward it

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'log_type' => 'file',
  'logfile' => '/var/snap/nextcloud/current/logs/nextcloud.log',
  'logfilemode' => 416,
  'instanceid' => 'xx’,
  'passwordsalt' => ‘xx’,
  'secret' => ‘xx’,

  'trusted_domains' => 
  array (
    0 => ‘xxx,
    1 => ‘mydomain.com,
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '25.0.4.1',
  'overwrite.cli.url' => 'http://192.168.86.45',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => ‘xx>
  'installed' => true,
  'maintenance' => false,
);


Screenshot 2023-03-22 at 8.02.51 AM

There is this link at the end of your error. Read it. I think you must only set overwrite-parameter in config/config.php read at this position.

1 Like