Configuring Federation Sharing
Introduction
Federated Cloud Sharing is managed by the Federation app. When you enable the Federation app you can easily and securely link file shares between ownCloud servers, in effect creating a "cloud" of ownCloud installations.
For security reasons federated sharing strictly requires HTTPS (SSL/TLS). |
We strongly recommend using HTTP for development and testing purposes.
However, to do so, you have to set 'sharing.federation.allowHttpFallback' ⇒ true, in config/config.php.
|
Configuration
Follow these steps to establish a trusted connection between two servers.
-
Verify that both servers have SSL certificates. If you open the server URL in your browser and see a lock icon on the left-hand side of the address bar, the certificate is valid.
Lock icon in the address bars in Firefox, Google Chrome, and Safari. -
Verify that the
'overwrite.cli.url' ⇒ 'https://<SERVER_URL>' setting is configured to the correct URL, instead of `localhost
, in config.php. -
Reset the federation job in your
oc_jobs
table. This job is required to get the verification token from the other server to establish a federation connection between two servers. The resetting ensures that it will be executed when we run system:cron later.mysql -u root -e "update oc_jobs set last_run=0 where class='OCA\\Federation\\SyncJob';" owncloud; mysql -u root -e "update oc_jobs set last_checked=0 where class='OCA\\Federation\\SyncJob';" owncloud;
-
Navigate to admin settings → sharing → Federation
-
Add server 1 to the trusted servers on server 2.
-
Add server 2 to the trusted servers on server 1.
-
Now run the cron job in your ownCloud directory (for example
/var/www/owncloud/
).{occ-command-example-prefix} system cron
-
Now the check should be green
-
Sync now your users with
occ dav:sync-system-addressbook occ federation:sync-addressbook
-
Configure automatic acceptance of new federated shares.
occ config:app:set federation auto_accept_trusted --value '0' occ config:app:set federatedfilesharing auto_accept_trusted --value 'yes'
Working With Proxies
There are ownCloud instances that are not connected to the internet. They have no possibility to reach the public network. Therefore Federation will not work without a proxy.
To set the proxy
and proxyuserpwd
configuration variables, in config/config.php
.
proxy
sets the proxy’s hostname, and proxyuserpwd
sets the username and password credentials, in username:password
format.
Creating a New Federation Share
Follow these steps to create a new Federation share between two ownCloud servers. This requires no action by the user on the remote server; all it takes is a few steps on the originating server.
-
Enable the Federation app.
-
Then, create a federated share by entering username@serveraddress in the sharing dialog (for example
freda@https://example.com/owncloud
). When ownCloud verifies the link, it displays it with the (remote) label. Click on this label to establish the link. -
When the link is successfully completed, you have a single share option, and that is can edit.
You may disconnect the share at any time by clicking the trash can icon.
Known Issues
Persistent Locks Are Not Guaranteed
There is a known bug propagated persistent locks to federated instances. If a user creates an exclusive lock on a share, no other users should be able to modify it, nor its contents, and all users should see a lock icon on the share.
However, this isn’t the case. The following functionality has been recorded:
-
The user who created the lock sees the lock icon throughout the share.
-
The top-level of the share for receivers shows the lock icon.
-
Sub-items of the share do not show the lock icon.
-
The share and its contents can still be modified by all users; specifically:
-
Sub-items can be deleted.
-
Sub-items can be created.
-