Seafile 4.X introduce a major feature: synchronization over HTTP/HTTPS protocol. This makes it easier to configure Seafile when server is behind a router and also easier to use when syncing over a firewall.

The way to compile and get Seafile 4.X working on Synology is almost the same compared to Seafile 3.X. Please refer to Seafile 3.1 on ARMv7-based Synology DiskStation NAS and Seafile 3.1 with http proxy on Synology as this article will just list the few differences from previous version.

Install packages

Obviously, replace the VERSION variable with a newer seafile version: I installed VERSION=4.2.3.

The libevhtp library has to be upgraded to version 2.0. My setup does not use HTTPS so I skipped the SSL part.

~$ aptitude upgrade libevent-dev
~$ make
~$ make install

Also, seahub has a few more dependencies

~$ pip install django-compressor==1.4
~$ pip install django-statici18n==1.1.3
~$ aptitude install python-dateutil

That's it for the install and compilation part! All the other steps are left untouched.

Run upgrade scripts

Running the upgrade scripts from their inital location in source folder won't work and will prompt you an error message:

/home/seafile/<ORGANIZATION_NAME>/seafile-server/src/seafile-<VERSION>-server/ccnet/seafile.ini not found. Now quit To run them properly, please copy upgrades to proper folder.

As instructed, just copy the upgrade folder to seafile-server folder and run the scripts from there:

~$ cp -R ./seafile-server/src/seafile-${VERSION}-server/scripts/upgrade ./seafile-server
~$ ./upgrade/
~$ rm -Rf upgrade