• Increase font size
  • Default font size
  • Decrease font size
Living in a wooden world.
Home Geek stuff Synology Seafile 6 on ARMv7-based Synology DiskStation NAS

Seafile 6 on ARMv7-based Synology DiskStation NAS

Seafile is an open source Dropbox alternative that offer encryption on client-side (data is stored encrypted on the server and server don't have password). This article mostly follows Seafile manual installation process and describe how to install Seafile in a Debian chroot running on a Synology DiskStation NAS.

Install packages

As a reference, Seafile documentation to install this software from source is available from This procedure follows the official documentation to install Seafile 6.0.x with details specific to Debian distribution and packages; it assume you already set up a Debian chroot on Synology and you are running a Debian Jessie.

Install development libraries

Most of libraries are available as debian packages:

~$ aptitude libevent-dev libcurl4-openssl-dev libglib2.0-dev uuid-dev intltool libsqlite3-dev libarchive-dev libtool libjansson-dev valac libfuse-dev

Only exception is libevhtp: a special version of this library is required.

~$ mkdir libs
~$ cd libs
~$ wget

Decompress library and use cmake to compile and install it.

~$ aptitude install cmake
~$ cmake .
~$ make
~$ sudo make install

Next install packages for seahub, the Python web front end. Some python libraries aren't available from Debian packages and Seafile 6.0.x require Django 1.8.

~$ aptitude install python2.7 python-simplejson python-chardet gunicorn python-imaging python-six
~$ # Some python lib aren't available from Debian.
~$ aptitude install python-pip
~$ pip install django==1.8
~$ pip install # django-constance
~$ pip install django-compressor==1.4
~$ pip install django-statici18n==1.1.3
~$ pip install pytz==2014.3
~$ pip install flup==1.0.2
~$ pip install djangorestframework==3.6.2
~$ pip install django-post_office==2.0.8
~$ pip install openpyxl==2.4.5
~$ pip install django-picklefield==0.3.2

Prepare Seafile projects

Add user and prepare project layout. Fill ORGANIZATION_NAME with anything more suitable to describe your Seafile installation (company or domain name).

~$ adduser seafile
~$ su seafile
~$ cd
~$ mkdir -p $ORGANIZATION_NAME/seafile-server
~$ cd $ORGANIZATION_NAME/seafile-server

Get the source. This time, replace VERSION with Seafile latest version. I used version 3.1-latest for libsearpc and version 6.0.8 for seafile.

~$ mkdir src
~$ cd src

~$ VERSION=3.1-latest
~$ wget${VERSION}.tar.gz
~$ tar xf v${VERSION}.tar.gz
~$ rm v${VERSION}.tar.gz

~$ VERSION=6.0.8
~$ wget${VERSION}-server.tar.gz
~$ tar xf v${VERSION}-server.tar.gz
~$ rm v${VERSION}-server.tar.gz
~$ wget${VERSION}-server.tar.gz
~$ tar xf v${VERSION}-server.tar.gz
~$ rm v${VERSION}-server.tar.gz
~$ cd ..
~$ wget${VERSION}-server.tar.gz
~$ tar xf v${VERSION}-server.tar.gz
~$ rm v${VERSION}-server.tar.gz
~$ mv seahub-${VERSION}-server seahub

Compile Seafile

Build and install seafile projects. Autogen, configure and make commands can be run as user seafile but "make install" command require root privileges.

~$ VERSION=3.1-latest
~$ cd src/libsearpc-${VERSION}
~$ ./
~$ ./configure
~$ make
~$ make install

~$ VERSION=6.0.8
~$ ~$ cd ../ccnet-server-${VERSION}-server
~$ ./
~$ ./configure --without-mysql --without-postgresql # `export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig` if libsearpc is not found
~$ make
~$ make install
~$ cd ../seafile-server-${VERSION}-server

The seafile-controller executable require a small fix. At startup, this program define its configuration, bin and pids folders based on binary location. Being installed in /usr/local/bin instead of being in seafile-server subfolder, the startup fails. To fix it, edit init_seafile_path in controller/seafile-controller.c:

static void
init_seafile_path (char *config_dir)
topdir = g_path_get_dirname (config_dir);
installpath = g_build_filename (topdir, "seafile-server", NULL);

You also have to update the call to init_seafile_path in the first line of the seaf_controller_init function:

static int
seaf_controller_init (SeafileController *ctl,
char *config_dir,
char *seafile_dir,
char *logdir,
gboolean cloud_mode)
init_seafile_path (config_dir);

Now complete compilation of seafile-server with this small fix.

~$ ./
~$ ./configure --without-mysql --without-postgresql
~$ make
~$ make install

Deploy Seafile

As seafile user, go to top directory and start Seafile setup script

~$ export PYTHONPATH=/home/seafile/$ORGANIZATION_NAME/seafile-server/seahub/thirdpart
~$ seafile-admin setup

Answer some questions and finally start seafile

~$ seafile-admin setup

Seafile should now be launched and accessible from your NAS

Seafile auto startup

The seafile-admin command must be launched by user seafile from the top directory. As seafile user, create a script to launch this command.

~$ cat >> << EOF
~$ #!/bin/bash
~$ cd `dirname $0`
~$ seafile-admin start
~$ EOF
~$ chmod +x

Then as root install sudo

~$ aptitude install sudo

Latest part is to add this script to the Synology boot sequence. If you already have a script, just append to it:

~$ cat >> /usr/local/etc/rc.d/ << EOF
~$ # Start seafile
~$ chroot \$CHROOT /usr/bin/sudo -u seafile /bin/bash /home/seafile/<organization_name>/
~$ EOF
~$ chmod 755 /usr/local/etc/rc.d/

Add New Search
thanatos  - cmake libevhtp fails   | |2017-04-07 14:54:06
hey there,
found your guide and wanted to try it, but I'm failing miserably
when it comes to the libevhtp library.
cmake . gives me the
following error and I don'T know how to fix this:

cd libevhtp-1.1.6/
root@array:/libs/libevhtp-1.1. 6# cmake .
Error: CMake was unable to find a build program corresponding to
"Unix Makefiles". CMAKE_MAKE_PROGRAM is not set.  You
probably need to select a different build tool.
CMake Error: Error required
internal CMake variable not set, cmake may be not be
built correctly.
Missing variable is:
Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
Missing variable is:
CMake Error:
Could not find cmake
module file:/libs/libevhtp-1.1.6/CMakeFiles/CMakeCCompile r.cmake
e Error: Error required internal CMake variable not set, cmake may be not
be built correctly.
variable is:
CMake Error: Error required
internal CMake variable not set, cmake may be not be built
Missing variable is:
CMake Error: Could not
find cmake
module file:/libs/libevhtp-1.1.6/CMakeFiles/CMakeCXXCompi ler.cmake
ake Error: CMAKE_C_COMPILER not set, after EnableLanguage
Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring
incomplete, errors occurred!

any help appreciated,
neo73   | |2017-05-30 09:29:25
Hi thanatos, thanks for your feedback.
I might have missed a few packages
Please check you have the packages make and gcc installed on
your system using:
dpkg -l | grep -e make -e gcc

If not just run aptitude install make gcc and you should be able to
resume libevhtp compilation
Ati  - Mr   | |2019-02-10 16:21:32
Thanks for the super easy guide, managed to install it 6.5 seconds, went supper

Kudos to you and Seafile as well.

It is a shame though that seafile
made it too easy to install this brilliant piece of software.
Now every single
Synology owner will have it on their NAS. too bad
Write comment
[b] [i] [u] [url] [quote] [code] [img] 
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."