ownCloud - Link within automated created mail by ownCloud points to local server adress

Hi all,

really not a big thing, but I would like to understand if the link within automated created mails by ownCloud can be changed.

e.g.:
I add a new file to my ownCloud space and ownCloud will notify me about this in an automated created mail lateron - unfortunatley the link within this mail points to the local server adress instead of the external ownCloud-server adress that is also reachable from the internet.

I have allready checked if there is maybe a UCR variable available in order to change this, without success :slight_smile:

Any hint how to change this, would be much appreciated.

Best regards
Thomas

Hi,

as far as I remember these links are generated on base of the request host, which is the host name that you used to access the service. The URL in the email should not differ from the URL you see in the Web-UI, so you can give it a try yourself if there is a difference when accessing OC using the internal and the external name.

hth,
Dirk Ahrnke

Hello Dirk,

thank you for your reply.

We use the external secure URL (https) only. Nevertheless I gave it a try to upload another file from external - same result :frowning:

URL within the automated generated mail still points to internal unsecure server adress (http).

Here’s a screenshot of mail with wrong URL inside:

OC-wrong-URL

BR
Thomas

Hi,

ok, thats the activity notification. There are also notifications possible when you create a link which will (more or less) work in the context of the session itself.
Activity notification happens on the server itself, AFAIR cron-based. The server has obviously no knowledge about the URL you want to see.
I have seen mentions in https://github.com/owncloud/activity/ that the setting “overwritewebroot” (see https://doc.owncloud.com/server/10.0/admin_manual/configuration/server/config_sample_php_parameters.html?highlight=overwritewebroot) is recommended in such situations.

Best Regards,
Dirk Ahrnke

Dirk, thanks for the provided links and support.

I found this in the provided documentation:

’overwrite.cli.url’ => '’,
Use this configuration parameter to specify the base URL for any URLs which are generated within ownCloud using any kind of command line tools (cron or occ). The value should contain the full base URL: https://www.example.com/owncloud As an example, alerts shown in the browser to upgrade an app are triggered by a cron background process and therefore uses the url of this key, even if the user has logged on via a different domain defined in key trusted_domains. When the user clicks an alert like this, he will be redirected to that URL and must logon again.

This variable is currently set to my internal (wrong) server address in the config.php.
Not sure whether “overwrite.cli.url” or “overwritewebroot” must be changed.

Best regards
Thomas

Hi,

I can only check my test instance which is running inside Virtualbox and is not reachable from anywhere as as my workstation. The default after the installation was not changed:

root@ucs-8884:/var/lib/univention-appcenter/apps/owncloud/conf# grep cli config.php 
  'overwrite.cli.url' => 'http://localhost/owncloud',

This may work for basic tasks, but will probably cause comparable problems as you see on your system.

As long as you are using a trusted certificate and the owncloud instance can access itself by using the external name I would try to change overwrite.cli.url first.

hth,
Dirk

1 Like

Hi,

changing the value for “overwrite.cli.url” to my external server address did the trick :slight_smile:
Again, thx a lot Dirk for your help!

Best regards
Thomas

Hi,

sorry for bringing this topic up again.

I noticed that changing the value of “overwrite.cli.url” did the trick but it is not persistant. Whenever I restart the machine or the Docker-Container the value will be reset to the default (pointing to my internal local server-address).

Changes were made on this file: /var/lib/univention-appcenter/apps/owncloud/conf/config.php

Any hint how to make this value-change persistent, would be much appreciated.

Best regards
Thomas

An upcoming ownCloud App update will expose this as an App Setting, so changes will be persistent. App Versions 10.0.10 and up can be configured through the App Center. Open the App and click on App settings. To my knowledge, the 10.0.10. App update should be available this or next week.

damrose thank you for your feedback!
Looking forward now to the upcomming release :slight_smile:

Best regards
Thomas

Today ownCloud 10.0.10 for UCS was released and I can confirm that the value for “overwrite.cli.url” (equivalaent) can now be configured via the UCS App Center (OWNCLOUD_DOMAIN and OWNCLOUD_SUB_URL).

Very good :slight_smile:

Best regards
Thomas

Mastodon