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.
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).
In the resulting window, scroll down to Trusted Servers. In that section (Figure B) click Add Trusted Server.
In the resulting text box, type the full address of the trusted server. In other words, if your Nextcloud server is at https://www.example.com/nextcloud, 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:
- Log into a Nextcloud user account.
- Go to Files.
- Locate a directory or file to be shared.
- Click on the share icon associated with the file or directory.
- 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.
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).
And that’s all there is to adding and using a trusted server to Nextcloud. Enjoy this added flexibility.