Federation share uses local IP. Why not the global IP?

Nextcloud version (eg, 20.0.5): 29
Operating system and version (eg, Ubuntu 20.04): 18.04 & 22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.newest
PHP version (eg, 7.4): 8.1

The goal is to share a folder between two nextcloud instances, which are separated geographically.

For clarity, I’ll refer to the Nextcloud instances as NC1 and NC2.

Steps to replicate it:

  1. Both, NC1 and NC2, have federation app installed
  2. NC2 shares a folder with NC1, using “Sharing” and a username and address of NC1, which is myuser@https://nextcloudonfire.ddns.net/nextcloud
  3. myuser on NC1 receives a notification, that dennis@ is sharing a folder
  4. NC1 accepts the share
  5. Error! NC1 cannot connect to NC2 share. The shared folder is not visible for NC1 and the Log is getting spammed with connection errors.

The output of your Nextcloud log in Admin > Logging:

 ConnectException cURL error 7: Failed to connect to port 80: Network is unreachable (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for
error while discovering ocm provider 

Why does NC2 start the federation share with it’s local IP? Obviously, NC1 can’t reach NC2 that way.

Is it possible for NC2 to simply push files onto NC1? Currently, it seems like it’s pull only.

I just want some files from NC2 to be available on NC1.

files_external with dav mounts could work.

It seems like a configuration issue to me that nc2 is using the internal api. The last time I had a look we usually try to use overwrite.cli.url or overwritehost.

1 Like

Right, we only added overwrite.cli.url parameter to config.php on NC1, not NC2. That explains a lot. Best regards for the input.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.