Error when sharing from drop down

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2):
Operating system and version (eg, Ubuntu 17.04):
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1):

The issue you are facing:
When I share a file and click on the second share icon from within the dropdown, I get the following error message.
Error: Sharing Untitled.txt failed, could not find, maybe the server is currently unreachable or uses a self-signed certificate.
This is not generating any logs from the apache side or server side.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Select File
  2. Select Share
  3. Type user email
  4. Select Share icon from drop down

The output of your Nextcloud log in Admin > Logging:


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


The output of your Apache/nginx/system log in /var/log/____:


That sounds like a email sending problem. You should double-check the email settings (Settings>Management>Basic Settings). Similar problems a already discussed here:

Thanks for replying to me, however, unfortunately, this post does not have answers to what I am looking for. I have posted a picture below that shows the actual error and what I mean by “second share” icon.

Hello j-ed!

Same error here.

Nextcloud version 15.0.4
Operating system and version RHEL 7.5
Apache or nginx version Apache 2.4.6
PHP version 7.0.33

Steps to reproduce:

  1. Login as a normal user (no admin)
  2. click on a file’s share symbol. The right panel opens.
  3. entering an email address from a user which exists in the system. After entering the full address we get one hit for the emailaddress with the Share-Symbol (not Email-Symbol).
  4. Clicking on the search field hit the error message occured to the user: Sharing failed, could not find , maybe the server is currently unreachable or uses a self-signed certificate.

Do you have any hints for me?

We noticed that we only get the error as well when sharing externally. Once we noticed that we never got the error internally. Hope that helps

Nextcloud usually sends email with the user under which the web server is running, e.g. www-data, independently which address you’ve entered in the email server configuration. Due to the fact that internal email is sent I would assume that the mentioned user is not allowed to send email to an external address. You should check the log file of your email server to find out where the email get stuck.

I am getting the same error while trying to share a file to an external email address
My email is setup as type sendmail and i have the below in my /var/www/nextcloud/config/config.php. I did noticed some smtp stuff in config.php probably leftover from before but it is set to type sendmail, and test emails work perfectly using sendmail. Also internal shares also work correctly with sendmail

So I do not think it is necessarily an email issue but when i try to send to external share there is absolutely no entries in the mail.log at all

‘mail_from_address’ => ‘admin’,
‘mail_smtpmode’ => ‘sendmail’,
‘mail_domain’ => ‘’,
‘mail_smtpauthtype’ => ‘PLAIN’,
‘mail_smtpauth’ => 1,
‘mail_smtphost’ => ‘’,
‘mail_smtpport’ => ‘587’,
‘mail_smtpname’ => ‘’,
‘mail_smtppassword’ => ‘secret’,

@c0mputerking It is a strange behavior that you couldn’t find any information in your mail.log. If the email is processed by your server you should see information in your mail.log, reject.log etc. I would recommend to enable debug logging on your email server to get an idea what is going on on the background. You can also debug sendmail itself by checking if the command is called, which parameters are parsed etc. by e.g. temporarily replacing it by a batch file. Additionally you should also check the nextcloud.log file for further information.

When I send a test email or an internal email i always the mail and get a message like below in the mail.log … However when i try to send an email to an external address i get absolutely nothing in the mail.log … It makes me think that it is more a problem with nextcloud before the email even gets created not the email system.

Apr 25 18:47:45 cloud postfix/smtpd[6544]: connect from localhost[]
Apr 25 18:47:45 cloud postfix/smtpd[6544]: D77982D6E9: client=localhost[]
Apr 25 18:47:45 cloud postfix/smtpd[6544]: disconnect from localhost[] helo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr 25 18:47:45 cloud postfix/pickup[6517]: DEF522DB12: uid=33 from=<>
Apr 25 18:47:45 cloud postfix/cleanup[6546]: DEF522DB12: message-id=<>
Apr 25 18:47:45 cloud postfix/qmgr[578]: DEF522DB12: from=<>, size=15789, nrcpt=1 (queue active)
Apr 25 18:47:46 cloud postfix/smtp[6548]: DEF522DB12: to=<>,[]:25, delay=0.19, delays=0.05/0.01/0.07/0.07, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 13FD9A3360C)
Apr 25 18:47:46 cloud postfix/qmgr[578]: DEF522DB12: removed

sorry, but I have to come back to this issue. I upgraded from 15.0.10 to 16.0.4 now. But sadly I found the same behaviour again.

In my opinion this has nothing to do with general mail sending config, because it works very well (internally and externally) which I tested right now.

This must have something to do with this multifunctional sharing search input field. The error above comes only, when entering an email address and using this shown option with the “Share” symbol. This confuses many of our users.

I searched in the code and found one line, that uses this error message:

  • apps/federatedfilesharing/lib/FederatedShareProvider.php

    • class FederatedShareProvider implements IShareProvider
      • protected function createFederatedShare(IShare $share)

    if($failure) {
    $message_t = $this->l->t(‘Sharing %1$s failed, could not find %2$s, maybe the server is currently unreachable or uses a self-signed certificate.’,
    [$share->getNode()->getName(), $share->getSharedWith()]);
    throw new \Exception($message_t);

Now i understand what this option in the search field does! When I enter an email address but use this option with the “Share” symbol it tries to reach a federated server with the username from the left part of the email address and the nextcloud instance reachable under the right part of the email address. It’s not a bug, it’s a feature! :crazy_face:

Is there a way to find out, how many federated shares are already created/in use?