Seafile is a GPL v3-licensed software designed to host files privately and securely on servers with access to the Web, in a fashion similar to some popular proprietary solutions. As of Kolab version 16, Chwala, the file storage component of Kolab, can use Seafile as a backend to store files.
This document outlines the steps needed to interface Chwala with Seafile.
Prerequisites
- Kolab Groupware, kolab 16 or later (chwala 0.5.5-4.1 or later)
- Installed on RedHat Enterprise Linux
- Seafile version 4 or later, running on a top level domain (
files.example.com
in this guide)
Deploying Kolab
Deploying Seafile
In case the services reside on different hosts, the Seafile instance needs to be accessible from the host running Kolab (e.g. via port 80/443 if Seafile is running via apache).
Configuring Roundcube to access Seafile
The integration can be configured in two different ways:
- Using Seafile as the sole storage mechanism;
- Using Seafile as an add-on to the existing storage.
The first method has the advantage of being set by default for all users, but it depends on the Seafile instance being always accessible. The second still relies on Kolab core components and is easier to set up, but requires users to manually add their Seafile storage.
NOTE: Please note that unless you are using the LDAP integration below you will have to create the same user-account in seafile as in kolab, with a matching password. This can be done by simply logging in to the Seafile webinterface, or can alternatively be automated via the Seafile API.
Using Seafile as an exclusive storage mechanism
Edit /etc/roundcubemail/config.inc.php and add the following lines, adjusting them to match your setup:
# Seafile $config['fileapi_backend'] = 'seafile'; $config['fileapi_seafile_host'] = 'files.example.com'; $config['fileapi_seafile_ssl_verify_peer'] = false; $config['fileapi_seafile_ssl_verify_host'] = false; $config['fileapi_seafile_debug'] = false;
The next time you try to access Files in the Kolab web client, Kolab will attempt to authenticate towards Seafile with the same username / password combination as your account and use Seafile as storage.
Using Seafile as an add-on to the existing Kolab storage
Edit /etc/roundcubemail/config.inc.php and add the following lines, adjusting them to match your setup:
# Seafile $config['fileapi_backend'] = 'kolab'; $config['fileapi_drivers'] = array('seafile'); $config['fileapi_seafile_host'] = 'files.example.com'; $config['fileapi_seafile_ssl_verify_peer'] = false; $config['fileapi_seafile_ssl_verify_host'] = false; $config['fileapi_seafile_debug'] = false;
In this configuration, an additional step is required to access Seafile. Chwala needs to be made aware of the additional storage. Access your Roundcube webmail and go to the Files component. Click on the gearbox icon and select Add additional storage. Fill in all the necessary details in the dialog box, and click on OK. A new Seafile
folder will be made available, pointing at your Seafile library.
Enabling debug output
In case of errors, enable the debug logging for chwala in /etc/roundcubemail/config.inc.php by setting:
$config['fileapi_seafile_debug'] = true
…and inspect the logs in /var/log/chwala/
NOTE: You may have to logout and login again if you are in an existing roundcube session.
Configuring Seafile to interface with LDAP
If the Pro edition of Seafile is installed, and the LDAP interface is enabled, then it can be configured to authenticate against Kolab’s LDAP database. Locate the ccnet.conf file in the ccnet subdirectory of your Seafile root installation (e.g. ‘/home/seafile/conf/ccnet.conf‘), and add the following lines at the bottom:
[LDAP] HOST = ldap://localhost # Change the following to your primary domain base DN BASE = ou=People,dc=example,dc=com FILTER = &(objectclass=kolabinetorgperson) # Put in the details of the Kolab service account USER_DN = uid=kolab-service,ou=Special Users,dc=example,dc=com PASSWORD = <password of the Kolab service account> LOGIN_ATTR = mail
Restart Seafile using the scripts:
/path/to/seafile/seafile-server-latest/seafile.sh restart /path/to/seafile/seafile-server-latest/seahub.sh restart