Wrong domain in password reset link

Nextcloud version: 17.0.3
Apache
PHP version: 7.3.11

The issue you are facing:
If a user wants to reset his password, the URL of the password reset link is broken. The link in the password reset email contains two dots between the third and second level domain and looks like this: https://nextcloud…example.com/index.php/lostpassword/reset/form/12345/username
(the third dot is inserted by the forum software, the password reset link contains only two dots between nextcloud and example)

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

<?php
$CONFIG = array (
  'instanceid' => '12345',
  'passwordsalt' => '12345',
  'secret' => '12345',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.example.com',
  ),
  'datadirectory' => '/www/htdocs/nextcloud/nc_data',
  'dbtype' => 'mysql',
  'version' => '17.0.3.1',
  'default_language' => 'de',
  'default_locale' => 'de',
  'dbname' => 'dbname',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user',
  'dbpassword' => 'pass',
  'installed' => true,
  'mail_smtpmode' => 'sendmail',
  'mail_sendmailmode' => 'pipe',
  'mail_from_address' => 'webmaster',
  'mail_domain' => 'example.com',
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'skeletondirectory' => '',
  'app_install_overwrite' => 
  array (
    0 => 'polls',
  ),
  'mail_smtphost' => 'mail.example.com',
  'mail_smtpport' => '25',
  'updater.secret' => '12345',
);

I currently have the same problem, but can’t find a solution.

There is an option in the config file that you can set this value:

/**
 * The automatic hostname detection of Nextcloud can fail in certain reverse
 * proxy and CLI/cron situations. This option allows you to manually override
 * the automatic detection; for example ``www.example.com``, or specify the port
 * ``www.example.com:8080``.
 */
'overwritehost' => '',
1 Like

Hello,

I have the same problem (see Link to password reset failled).
Can you explain more how the solution works?
What shall I overwrite with what?

Thanks, Mark

… that is because you didn’t bother to format your post properly. It’s → markdown ← , just like in Nextcloud text. One should actually be familiar with this in 2023 as if handwriting!

If you put it between backticks, it looks like this (and is not clickable!):

https://nextcloud..example.com/index.php/lostpassword/reset/form/12345/username

SCNR :wink: :pray: :heartbeat:

much luck

"… that is because you didn’t bother to format your post properly. "

what are you talking about??
My post is here: Link to password reset failled

Instead of defining the knowledge level in 2023 why don’t you just answer clearly what’s wrong with MY config.php?