How to add and use a trusted server on Nextcloud

Nextcloud allows you to share files and directories with local users as well as users on a remote, trusted server.

How to add and use a trusted server on Nextcloud

If you manage more than one Nextcloud server, you might have a need to join them together as a federated share. By doing this, your users are then able to share directories and folders across servers, thereby expanding the ability of your on-premises private cloud. For anyone hoping to make use of multiple Nextcloud servers in one business, this should be considered a must.

But how do you accomplish this? It's actually quite simple. Let me show you.

SEE: Hybrid cloud: A guide for IT pros (TechRepublic download)

What you'll need

In order to connect a trusted server, you'll need the following:

  • At least two Nextcloud servers, both of which use SSL and can connect to one another (either via LAN or WAN)
  • A Nextcloud user with admin privileges

How to add the trusted server

The first thing you must do is add the trusted server. To do this, log into your Nextcloud server with an admin account and click on the profile icon in the top right corner. From the drop-down menu select Settings.

In the resulting window, click Sharing from the left navigation (Figure A).

Figure A


The Nextcloud Settings sidebar. 

In the resulting window, scroll down to Trusted Servers. In that section (Figure B) click Add Trusted Server. 

Figure B


In the resulting text box, type the full address of the trusted server. In other words, if your Nextcloud server is at, the address to type would be just that. Once you type the address, hit Enter and the address will be accepted as a federated server.

How to share user files/directories on the trusted server

What can you do with that trusted server? One of the most important things you can do is have your users share files/directories to user accounts on the trusted server. How does a user do this? It's actually quite simple. Here's how:

  1. Log into a Nextcloud user account.
  2. Go to Files.
  3. Locate a directory or file to be shared.
  4. Click on the share icon associated with the file or directory.
  5. Type the share in the form USER@https://DOMAIN/NEXTCLOUD (Figure C), where USER is a user on the remote Nextcloud server, DOMAIN in the domain of the server, and NEXTCLOUD is the directory housing the Nextcloud installation.

Figure C


Adding a trusted server.

Once you've typed a valid user@domain, two options should appear--a user and a remote group. Make sure to select the user entry. Once you've done that, the connection will be made and the remote user should then have access to the shared file or directory.

If you then go to your user account and click Files | Shares, you should see the share listed as well as who you've shared the file/directory with (Figure D).

Figure D


A directory shared to both a remote trusted server and a local user.

And that's all there is to adding and using a trusted server to Nextcloud. Enjoy this added flexibility.

Also see


Image: Jack Wallen

By Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic, The New Stack, and Linux New Media. He's covered a variety of topics for over twenty years and is an avid promoter of open source. For more news about Jack Wallen, visit his website jackwallen....