How to connect your Nextcloud server to a federation

If you have access to two Nextcloud servers, you can connect them in a way that users can easily share files and folders between each deployment. Learn how to make the connection.

Image: Jack Wallen

One of the many amazing features in Nextcloud is Federation Sharing, which allows you to connect your Nextcloud server to another Nextcloud server. This connection enables the linking and sharing of files between Nextcloud servers, effectively creating a cloud of Nextclouds.

In order to pull this off, you must have access to two Nextcloud servers that can access one another's IP address. You will also need an administrator login to set up this feature.

Let's connect two Nextcloud servers via Federation Sharing.

SEE: Cloud Computing Policy (Tech Pro Research)

The setup

I will have one Nextcloud server (which I'll call the primary server) at IP address and another Nextcloud server (which I'll call the secondary server) at IP address I will create the Federation share on the .87 address. Here's how that is done.

The first step is to log into your primary server and ensure the Federation app is enabled. To do that, follow these steps.

  1. Click the Files drop-down in the upper left corner.
  2. Click the + button.
  3. In the resulting window, scroll down and make sure Federation is enabled (Figure A).

Figure A

Figure A

Federation is enabled and ready to go.

With Federation enabled, click the drop-down in the upper right corner, and click Admin. Locate and click Sharing in the left navigation and make sure that both Allow Users On This Server To Send Shares To Other Servers and Allow Users On This Server To Receive Shares From Other Servers are enabled (both are under Federation Cloud Sharing). Scroll down a bit further to the Federation section and click to enable Add Server Automatically Once A Federated Share Was Created Successfully (Figure B).

Figure B

Figure B

Enabling the connection between servers.

Now you can share files and folders.

How to share files and folders

To share a file or folder, follow these steps.

  1. Click the drop-down in the upper left corner.
  2. Click Files.
  3. Locate and click the sharing icon associated with the file to be shared.
  4. Click the Sharing tab.
  5. In the text box enter USERNAME@IP_OF_SECONDARY_SERVER/nextcloud (USERNAME is the username on the secondary server and IP_OF_SECONDARY_SERVER is the IP address of your secondary server - Figure C).
  6. Hit Enter on your keyboard.

Figure C

Figure C

Sharing a file to a Federation server.

Your file will be shared across to the Federation server and is ready to be used. As soon as you share a file, via Federation Sharing, that secondary server address will appear in the Admin | Sharing | Federation section.

Now you can easily share files and folders from one Nextcloud server to another. Configure the secondary server for the same setup, so the sharing can go both ways.

One flexible cloud

If you've ever had any doubt as to the flexibility of Nextcloud, Federation Sharing should go a long way to ease that concern. Give Federation Sharing a go on your Nextcloud servers and see if it doesn't extend your cloud deployment beyond your expectations.

Also see

By Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website