Nextcloud: download-link includes servername

NethServer Version: 7.6.1810 (final)
Module: nextcloud

Hi all,

when I want to share a file on nextcloud (NC) with someone, I have the option to create a downloadlink: rightclick on the file, select “generate downloadlink”, and then follow the steps.
This however results in a link “http://hostname-of-server.mydomain.tld/webtop/public/…”.

And that’s not resolvable from the internet: I’d expect a URL without the hostname of the server.
Is this fixable? If so, how & where?

Maybe not relevant, but:
In config.php I see

‘trusted_domains’ =>
array (
0 => ‘localhost’,
1 => ‘hostname.mydomain.tld’,
2 => ‘192.168.1.2’,
3 => ‘sub.mydomain.tld’,
4 => ‘sub.mydomain2.tld’,
),
‘datadirectory’ => ‘/usr/share/nextcloud/data’,
‘overwrite.cli.url’ => ‘https://sub.mydomain.tld/nextcloud’,

The download-URL is written as per entry 1 in the trusted domains list. Does the order of this array matter?

Why would you expect that? It’s the name of the server, and it’s the hostname Nextcloud has been told to use.

Of course it is–create a DNS entry for hostname.mydomain.tld.

Because the internet does not need to know what the hostname of my server is. In the same way as the Webtop runs on the same server, and my mailaddress is not rolf@servername.mydomain.tld…

so maybe it’s the wrong hostname from your perception.
Becaus internet need to know the hostname for get the content of a URL.

Do NethServer knows which is it’s public hostname?
Do NextCloud knows which is it’s public hostname?

There’s something wrong with me…
Did you activate Nextcloud inside the Webtop cloud and are you creating the link from inside the
Webtop cloud?

Yes, that is what I do:

  • login to my webmail on https://sub.mydomain.tld/webtop,
  • click on the cloud-icon in the left vertical bar,
  • expand the nextcloud-resource (my resources - localhost (rolf) )
  • rightclick on a file, choose generate downloadlink.
  • This results in a download URL http://servername.mydomain.tld
    (where “sub” of course is not the same as “servername” :wink: )

Ok but servername.mydomain.tld must be the same server as sub.mydomain.tld

  • Log on Webtop as admin (not admin@mydomain.tld)
  • At the left bar select the icon with the gear, then select “Properties (system)” in the central column.
  • In the right column, under “com.sonicle.webtop.core service” go to “public.url” item, then you make a double click on the link at the right of that item and change it in http://servername.mydomain.tld/webtop or https://servername.mydomain.tld/webtop if you have the 443 port exposed.
  • Log out the log on with your user and try again.
2 Likes

OK, did as instructed.
The generated URL is now correct (made it https while I was at it), and the file can be downloaded from the internet by clicking the link.
No drawbacks noticed (so far…?)
Thanks for your help!

1 Like